version 1.21, 2006/12/06 22:22:37
|
version 1.22, 2007/02/12 23:58:42
|
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 370 sub output_results {
|
Line 379 sub output_results {
|
} |
} |
$r->print('</table>'.$/);### if (! $count % 50); |
$r->print('</table>'.$/);### if (! $count % 50); |
close(ACTIVITYDATA); |
close(ACTIVITYDATA); |
return; |
return $count; |
} |
} |
|
|
################################################################### |
################################################################### |