--- loncom/interface/lontrackstudent.pm 2010/06/06 21:34:23 1.32 +++ loncom/interface/lontrackstudent.pm 2014/11/24 02:36:30 1.38 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lontrackstudent.pm,v 1.32 2010/06/06 21:34:23 raeburn Exp $ +# $Id: lontrackstudent.pm,v 1.38 2014/11/24 02:36:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -186,11 +186,11 @@ sub get_max_time_in_db { ($r,$prog_state,&mt('Parsing results')); # if (! open(TIMEDATA,$results_file)) { - $r->print('<h2>'.&mt('Unable to read results file.').'</h2>'. + $r->print('<p class="LC_error">'.&mt('Unable to read results file.').'</p>'. '<p>'. - &mt('This is a serious error and has been logged. '. - 'You should contact your system administrator '. - 'to resolve this issue.'). + &mt('This is a serious error and has been logged.'). + '<br />'. + &mt('Please alert your LON-CAPA administrator.'). '</p>'); return; } @@ -251,15 +251,15 @@ sub output_results { ## if (! -s $results_file) { # 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('<p class="LC_info">'.&mt('So far, no data has been returned for your request').'</p>'); return -1; } if (! open(ACTIVITYDATA,$results_file)) { - $r->print('<h2>'.&mt('Unable to read results file.').'</h2>'. + $r->print('<p class="LC_error">'.&mt('Unable to read results file.').'</p>'. '<p>'. - &mt('This is a serious error and has been logged. '. - 'You should contact your system administrator '. - 'to resolve this issue.'). + &mt('This is a serious error and has been logged.'). + '<br />'. + &mt('Please alert your LON-CAPA administrator.'). '</p>'); return -2; } @@ -432,7 +432,7 @@ sub convert_timezone { sub display_values { my ($action,$values)=@_; my $result='<table>'; - if ($action eq 'CSTORE') { + if (($action eq 'CSTORE') || ($action eq 'PUTSTORE')) { my $is_anon; my %values=map {split('=',$_,-1)} split(/\&/,$values); foreach my $key (sort(keys(%values))) { @@ -573,7 +573,8 @@ sub handler { title=>'Student Activity', text =>'Student Activity', faq=>139, - bug=>'instructor interface'}); + bug=>'instructor interface', + help=>'View_recent_activity'}); # # Give the LON-CAPA page header my $args; @@ -586,16 +587,8 @@ sub handler { # # Begin form output $r->print('<form name="trackstudent" method="post" action="/adm/trackstudent">'); - $r->print('<br />'); - $r->print('<div name="statusline">'. - &mt('Status: [_1]', - '<input type="text" name="status" size="60" value="" readonly="readonly" />'). - '</div>'); $r->rflush(); - my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin - ($r,&mt('Student Activity Retrieval'), - &mt('Student Activity Retrieval'),undef,'inline',undef, - 'trackstudent','status'); + my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r); &Apache::lonhtmlcommon::Update_PrgWin ($r,\%prog_state,&mt('Contacting course home server')); # @@ -618,8 +611,11 @@ sub handler { &get_data($r,\%prog_state,$navmap, 'student:'.$env{'form.selected_student'}); } else { - $r->print('<h2>'.&mt('Unable to process for [_1]:[_2]', - $sname,$sdom).'</h2>'); + $r->print( + '<p class="LC_error">' + .&mt('Unable to process for [_1]:[_2]',$sname,$sdom) + .'</p>' + ); } } else { # For now, just show all the data instead of limiting it to one student