--- loncom/interface/lontrackstudent.pm 2006/12/06 22:22:37 1.21
+++ loncom/interface/lontrackstudent.pm 2007/02/13 01:44:02 1.23
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lontrackstudent.pm,v 1.21 2006/12/06 22:22:37 albertel Exp $
+# $Id: lontrackstudent.pm,v 1.23 2007/02/13 01:44:02 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -110,12 +110,21 @@ sub get_data {
&Apache::lonhtmlcommon::Update_PrgWin
($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:(.*):(.*)$/);
- $r->print(&Apache::loncommon::track_student_link(
- 'View more activity by this student',
- $sname,$sdom,undef,
- ($env{'form.start'}+$num_records)));
+
+ my ($text,$inc);
+ if ( $last > 0 && (($last+1) >= $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('
');
+ }
+ $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!'));
return;
@@ -239,7 +248,7 @@ sub output_results {
if (! -s $results_file) {
# results file is empty, just let them know there is no data
$r->print('