--- loncom/homework/grades.pm 2010/01/27 05:12:15 1.574.2.7
+++ loncom/homework/grades.pm 2010/04/01 02:28:27 1.574.2.10
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.574.2.7 2010/01/27 05:12:15 raeburn Exp $
+# $Id: grades.pm,v 1.574.2.10 2010/04/01 02:28:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -771,7 +771,7 @@ sub verifyreceipt {
my $title.=
'
'.
- &mt('Verifying Receipt No. [_1]',$receipt).
+ &mt('Verifying Receipt No. [_1]',$receipt).
' '."\n".
''.&mt('Resource: [_1]',$env{'form.probTitle'}).
' '."\n";
@@ -831,11 +831,11 @@ sub verifyreceipt {
}
}
if ($matches == 0) {
- $string = $title.&mt('No match found for the above receipt.');
+ $string = $title.&mt('No match found for the above receipt number.');
} else {
$string = &jscriptNform($symb).$title.
''.
- &mt('The above receipt matches the following [numerate,_1,student].',$matches).
+ &mt('The above receipt number matches the following [numerate,_1,student].',$matches).
'
'.
$header.
$contents.
@@ -1754,8 +1754,6 @@ sub gradeBox {
}
$line.=''.&mt('reset status').' '."\n";
-
- #&mt('Part: [_1] Points: [_2] or [_3] ',$display_part,$radio,$line);
$result .=
''.&mt('Part').': '.$display_part.' '.&mt('Points').': '.$radio.' '.&mt('or').' '.$line.' ';
$result.=''."\n";
@@ -7416,6 +7414,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);
@@ -7579,8 +7578,15 @@ sub scantron_process_students {
my (%grader_partids_by_symb,%grader_randomlists_by_symb);
&graders_resources_pass(\@resources,\%grader_partids_by_symb,
\%grader_randomlists_by_symb);
+ my $resource_error;
foreach my $resource (@resources) {
- my $ressymb = $resource->symb();
+ my $ressymb;
+ if (ref($resource)) {
+ $ressymb = $resource->symb();
+ } else {
+ $resource_error = 1;
+ last;
+ }
my ($analysis,$parts) =
&scantron_partids_tograde($resource,$env{'request.course.id'},
$env{'user.name'},$env{'user.domain'},1);
@@ -7592,6 +7598,10 @@ sub scantron_process_students {
}
}
}
+ if ($resource_error) {
+ $r->print(&navmap_errormsg());
+ return '';
+ }
my ($uname,$udom);
my $result= <symb();
+ my $ressymb;
+ if (ref($resource)) {
+ $ressymb = $resource->symb();
+ } else {
+ $res_error = 1;
+ last;
+ }
if ((exists($grader_randomlists_by_symb{$ressymb})) ||
(ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) {
my ($analysis,$parts) =
@@ -7675,6 +7691,12 @@ SCANTRONFORM
}
}
+ if ($res_error) {
+ &scantron_add_delay(\@delayqueue,$line,
+ 'An error occurred while grading student '.$uname,2);
+ next;
+ }
+
&Apache::lonxml::clear_problem_counter();
&Apache::lonnet::appenv($scan_record);
@@ -8452,7 +8474,7 @@ sub grading_menu {
$fields{'command'} = 'verify';
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
push(@menu, { url => "",
- name => &mt('Verify Receipt'),
+ name => &mt('Verify Receipt No.'),
short_description =>
&mt('')});
# Create the menu
@@ -8467,14 +8489,14 @@ sub grading_menu {
' '."\n".
' '."\n";
foreach my $menudata (@menu) {
- if ($menudata->{'name'} ne &mt('Verify Receipt')) {
+ if ($menudata->{'name'} ne &mt('Verify Receipt No.')) {
$Str .=' \n";
} else {
- $Str .=' {'jscript'}.
' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '.
' /> '.