version 1.21, 2006/12/06 22:22:37
|
version 1.23, 2007/02/13 01:44:02
|
Line 110 sub get_data {
|
Line 110 sub get_data {
|
&Apache::lonhtmlcommon::Update_PrgWin |
&Apache::lonhtmlcommon::Update_PrgWin |
($r,$prog_state,&mt('Parsing results')); |
($r,$prog_state,&mt('Parsing results')); |
# |
# |
&output_results($r,$results_file,$navmap,$mode); |
my $last = &output_results($r,$results_file,$navmap,$mode); |
my ($sname,$sdom) = ($mode=~/^student:(.*):(.*)$/); |
my ($sname,$sdom) = ($mode=~/^student:(.*):(.*)$/); |
$r->print(&Apache::loncommon::track_student_link( |
|
'View more activity by this student', |
my ($text,$inc); |
$sname,$sdom,undef, |
if ( $last > 0 && (($last+1) >= $env{'form.start'}+$num_records) ) { |
($env{'form.start'}+$num_records))); |
$text = 'View more activity by this student'; |
|
$inc = $num_records; |
|
$r->print(&Apache::loncommon::track_student_link($text,$sname,$sdom,undef, |
|
($env{'form.start'}+$inc) |
|
)); |
|
$r->print('<br />'); |
|
} |
|
$text = 'Resubmit last request to check for newer data'; |
|
$r->print(&Apache::loncommon::track_student_link($text,$sname,$sdom,undef, |
|
$env{'form.start'})); |
|
|
&Apache::lonhtmlcommon::Update_PrgWin($r,$prog_state,&mt('Finished!')); |
&Apache::lonhtmlcommon::Update_PrgWin($r,$prog_state,&mt('Finished!')); |
return; |
return; |
Line 239 sub output_results {
|
Line 248 sub output_results {
|
if (! -s $results_file) { |
if (! -s $results_file) { |
# results file is empty, just let them know there is no data |
# results file is empty, just let them know there is no data |
$r->print('<h2>'.&mt('So far, no data has been returned for your request').'</h2>'); |
$r->print('<h2>'.&mt('So far, no data has been returned for your request').'</h2>'); |
return; |
return -1; |
} |
} |
if (! open(ACTIVITYDATA,$results_file)) { |
if (! open(ACTIVITYDATA,$results_file)) { |
$r->print('<h2>'.&mt('Unable to read results file.').'</h2>'. |
$r->print('<h2>'.&mt('Unable to read results file.').'</h2>'. |
Line 248 sub output_results {
|
Line 257 sub output_results {
|
'You should contact your system administrator '. |
'You should contact your system administrator '. |
'to resolve this issue.'). |
'to resolve this issue.'). |
'</p>'); |
'</p>'); |
return; |
return -2; |
} |
} |
## |
## |
## |
## |
Line 307 sub output_results {
|
Line 316 sub output_results {
|
$title = $nav_res->compTitle(); |
$title = $nav_res->compTitle(); |
$src = $nav_res->src(); |
$src = $nav_res->src(); |
} else { |
} else { |
if ($src =~ m|^/res|) { |
$src = $symb; |
$title = $src; |
if ($src !~ m{/adm}) { |
} elsif ($values =~ /^\s*$/ && |
$title = &Apache::lonnet::gettitle($src); |
(! defined($src) || $src =~ /^\s*$/)) { |
} elsif ($values =~ /^\s*$/ && |
|
(! defined($src) || $src =~ /^\s*$/)) { |
next; |
next; |
} elsif ($values =~ /^\s*$/) { |
} elsif ($values =~ /^\s*$/) { |
$values = $src; |
$values = $src; |
Line 370 sub output_results {
|
Line 380 sub output_results {
|
} |
} |
$r->print('</table>'.$/);### if (! $count % 50); |
$r->print('</table>'.$/);### if (! $count % 50); |
close(ACTIVITYDATA); |
close(ACTIVITYDATA); |
return; |
return $count; |
} |
} |
|
|
################################################################### |
################################################################### |
Line 388 sub display_values {
|
Line 398 sub display_values {
|
} |
} |
$result.='</table>'; |
$result.='</table>'; |
} elsif ($action eq 'POST') { |
} elsif ($action eq 'POST') { |
my %values= |
my %values; |
map {split('=',&unescape($_),-1)} split(/\&/,$values); |
foreach my $pair (split(/\&/,$values)) { |
|
my ($key,$value) = split('=',&unescape($pair),-1); |
|
$values{$key} = $value; |
|
} |
foreach my $key (sort(keys(%values))) { |
foreach my $key (sort(keys(%values))) { |
if ($key eq 'counter') { next; } |
if ($key eq 'counter') { next; } |
$result.='<tr><td align="right">'.$key.'</td>'. |
$result.='<tr><td align="right">'.$key.'</td>'. |