--- loncom/homework/grades.pm 2013/08/28 04:26:45 1.596.2.12.2.20
+++ loncom/homework/grades.pm 2013/12/14 00:22:27 1.596.2.12.2.24
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.596.2.12.2.20 2013/08/28 04:26:45 raeburn Exp $
+# $Id: grades.pm,v 1.596.2.12.2.24 2013/12/14 00:22:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -811,7 +811,7 @@ sub verifyreceipt {
'
'.
&mt('Verifying Receipt No. [_1]',$receipt).
'
'."\n".
- ''.&mt('Resource: [_1]',$env{'form.probTitle'}).
+ ''.&mt('[_1]Resource: [_2]','',''.$env{'form.probTitle'}).
'
'."\n";
my ($string,$contents,$matches) = ('','',0);
@@ -1162,7 +1162,7 @@ LISTJAVASCRIPT
if ($submitonly eq 'graded' ) { $submissions = 'ungraded submissions'; }
if ($submitonly eq 'queued' ) { $submissions = 'queued submissions'; }
$gradeTable='
'.
- &mt('No '.$submissions.' found for this resource for any students. ([_1] students checked for '.$submissions.')',
+ &mt('No '.$submissions.' found for this resource for any students. ([quant,_1,student] checked for '.$submissions.')',
$num_students).
'
';
}
@@ -2044,7 +2044,7 @@ sub submission {
&download_all_link($request, $symb);
}
$request->print(' '.&mt('Submission Record').'
'."\n".
- ' '.&mt('Resource: [_1]',$env{'form.probTitle'}).'
'."\n");
+ ' '.&mt('[_1]Resource: [_2]','',''.$env{'form.probTitle'}).'
'."\n");
# option to display problem, only once else it cause problems
# with the form later since the problem has a form.
@@ -2166,7 +2166,7 @@ KEYWORDS
if ($perm{'vgr'}) {
$request->print(
&Apache::loncommon::track_student_link(
- &mt('View recent activity'),
+ 'View recent activity',
$uname,$udom,'check')
.' '
);
@@ -2230,7 +2230,7 @@ KEYWORDS
# (for multi-response type part)
# (3) Last submission plus the parts info
# (4) The whole record for this student
- if ($env{'form.lastSub'} =~ /^(lastonly|hdgrade)$/) {
+
my ($string,$timestamp)= &get_last_submission(\%record);
my $lastsubonly;
@@ -2285,7 +2285,7 @@ KEYWORDS
$trial = $record{"resource.$partid.tries"};
$rndseed = $record{"resource.$partid.rndseed"};
}
- if($env{'form.checkPlag'}){
+ if ($env{'form.checkPlag'}) {
my ($oname,$odom,$ocrsid,$oessay,$osim)=
&most_similar($uname,$udom,$symb,$subval);
if ($osim) {
@@ -2313,9 +2313,8 @@ KEYWORDS
}
my $order=&get_order($partid,$respid,$symb,$uname,$udom,
undef,$type,$trial,$rndseed);
- if ($env{'form.lastSub'} eq 'lastonly' ||
- ($env{'form.lastSub'} eq 'hdgrade' &&
- $$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) {
+ if ($env{'form.lastSub'} eq 'lastonly' || $env{'form.lastSub'} eq 'datesub' || $env{'form.lastSub'} =~ /^(last|all)$/ || ($env{'form.lastSub'} eq 'hdgrade' &&
+ $$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) {
my $display_part=&get_display_part($partid,$symb);
$lastsubonly.='
'.
''.&mt('Part: [_1]',$display_part).''.
@@ -2358,10 +2357,11 @@ KEYWORDS
$lastsubonly.='
'."\n"; # End: LC_grade_submissions_body
}
$request->print($lastsubonly);
- } elsif ($env{'form.lastSub'} eq 'datesub') {
+ if ($env{'form.lastSub'} eq 'datesub') {
my (undef,$responseType,undef,$parts) = &showResourceInfo($symb);
$request->print(&displaySubByDates($symb,\%record,$parts,$responseType,$checkIcon,$uname,$udom));
- } elsif ($env{'form.lastSub'} =~ /^(last|all)$/) {
+ }
+ if ($env{'form.lastSub'} =~ /^(last|all)$/) {
$request->print(&Apache::loncommon::get_previous_attempt($symb,$uname,$udom,
$env{'request.course.id'},
$last,'.submission',
@@ -6593,7 +6593,7 @@ sub scantron_process_corrections {
''
.&mt('Unable to accept last correction, an error occurred: [_1]',
$errmsg)
- .'
';
+ .'');
} else {
&scantron_put_line($scanlines,$scan_data,$which,$line,$skip);
&scantron_putfile($scanlines,$scan_data);
@@ -8381,7 +8381,6 @@ sub scantron_process_students {
}
my $nav_error;
my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);
- my (%grader_partids_by_symb,%grader_randomlists_by_symb,%ordered);
if ($randomorder || $randompick) {
$nav_error = &get_master_seq(\@resources,\@master_seq,\%symb_to_resource);
if ($nav_error) {
@@ -8600,11 +8599,11 @@ SCANTRONFORM
&Apache::loncommon::end_data_table_header_row()."\n".
&Apache::loncommon::start_data_table_row().
''.&mt('Bubblesheet').' | '.
- ''.$studentdata.' | '.
+ ''.$studentdata.' | '.
&Apache::loncommon::end_data_table_row().
&Apache::loncommon::start_data_table_row().
''.&mt('Stored submissions').' | '.
- ''.$studentrecord.' | '."\n".
+ ''.$studentrecord.' | '."\n".
&Apache::loncommon::end_data_table_row().
&Apache::loncommon::end_data_table().'');
} else {