--- loncom/homework/grades.pm 2010/01/15 17:12:18 1.589 +++ loncom/homework/grades.pm 2010/02/05 14:52:28 1.592 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.589 2010/01/15 17:12:18 bisitz Exp $ +# $Id: grades.pm,v 1.592 2010/02/05 14:52:28 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -944,10 +944,18 @@ LISTJAVASCRIPT my $saveStatus = $stu_status eq '' ? 'Active' : $stu_status; $env{'form.Status'} = $saveStatus; $submission_options.= - ''."\n". - ''."\n". - ''."\n". - ''; + ''. + ''."\n". + ''. + ''."\n". + ''. + ''."\n". + ''. + ''; $gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Submissions')) .$submission_options .&Apache::lonhtmlcommon::row_closure(); @@ -2079,12 +2087,31 @@ KEYWORDS } # This is where output for one specific student would start - my $add_class = ($counter%2) ? 'LC_grade_show_user_odd_row' : ''; - $request->print("\n\n". - '
'. - '
'.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).'
'. - '
'."\n"); + my $add_class = ($counter%2) ? ' LC_grade_show_user_odd_row' : ''; + $request->print( + "\n\n" + .'
' + .'

'.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).'

' + ."\n" + ); + + # Show additional functions if allowed + if ($perm{'vgr'}) { + $request->print( + &Apache::loncommon::track_student_link( + &mt('View recent activity'), + $uname,$udom,'check') + .' ' + ); + } + if ($perm{'opa'}) { + $request->print( + &Apache::loncommon::pprmlink( + &mt('Set/Change parameters'), + $uname,$udom,$symb,'check')); + } + # Show Problem if ($env{'form.vProb'} eq 'all' or $env{'form.vAns'} eq 'all') { my $mode; if ($env{'form.vProb'} eq 'all' && $env{'form.vAns'} eq 'all') { @@ -2108,10 +2135,9 @@ KEYWORDS # Display student info $request->print(($counter == 0 ? '' : '
')); - my $result='
'; - - $result.='
' - .'

'.&mt('Submissions').'

'; + + my $result='
' + .'

'.&mt('Submissions').'

'; $result.=''."\n"; if ($env{'form.handgrade'} eq 'no') { @@ -2145,7 +2171,9 @@ KEYWORDS if ($$timestamp eq '') { $lastsubonly.='
'.$$string[0].'
'; } else { - $lastsubonly = '
Date Submitted: '.$$timestamp."\n"; + $lastsubonly = + '
' + .''.&mt('Date Submitted:').' '.$$timestamp."\n"; my %seenparts; my @part_response_id = &flatten_responseType($responseType); @@ -2299,7 +2327,7 @@ KEYWORDS '
' .'

'.&mt('Assign Grades').'

' ); - $request->print(&gradeBox_start()); #
+ $request->print(&gradeBox_start()); foreach my $part_response_id (@part_response_id) { my ($partid,$respid) = @{ $part_response_id }; my $part_resp = join('_',@{ $part_response_id }); @@ -2315,16 +2343,6 @@ KEYWORDS $request->print('
'); $request->print(''); $result=''."\n"; + my $endform='

'."\n"; $endform.='  '."\n"; @@ -2362,7 +2379,9 @@ KEYWORDS 'onclick="javascript:checksubmit(this.form,\'Previous\');" target="_self" />  '."\n". '  '; - $endform.=&mt('(Next and Previous (student) do not save the scores.)')."\n" ; + $endform.=''. + &mt('(Next and Previous (student) do not save the scores.)'). + ''."\n" ; $endform.=""; $endform.='
'; @@ -7452,6 +7471,7 @@ sub scantron_get_maxbubble { if (ref($nav_error)) { $$nav_error = 1; } + return; } my $map=$navmap->getResourceByUrl($sequence); my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);