'
+ .&Apache::loncommon::end_data_table_header_row()
+ );
+}
+
+sub gradeBox_end {
+ return (
+ &Apache::loncommon::end_data_table()
+ );
+}
#--- displays the grading box, used in essay type problem and grading by page/sequence
sub gradeBox {
my ($request,$symb,$uname,$udom,$counter,$partid,$record) = @_;
@@ -1730,7 +1749,7 @@ sub gradeBox {
if ($last_resets{$partid}) {
$aggtries = &get_num_tries($record,$last_resets{$partid},$partid);
}
- $result.='
';
+ $result.=&Apache::loncommon::start_data_table_row();
my $ctr = 0;
my $thisweight = 0;
my $increment = &get_increment();
@@ -1753,8 +1772,8 @@ sub gradeBox {
$wgt.')" />'."\n";
$line.='
';
$result.=''."\n";
+ '" value="'.$env{'form.fullname'}.'" />'."\n";
if ($env{'form.handgrade'} eq 'no') {
- $result.=''.
- &mt('Part(s) graded correct by the computer is marked with a [_1] symbol.',$checkIcon)."\n";
-
+ $result.='
'
+ .&mt('Part(s) graded correct by the computer is marked with a [_1] symbol.',$checkIcon)
+ ."
\n";
}
-
-
# If any part of the problem is an essay-response (handgraded), then check for collaborators
my $fullname;
my $col_fullnames = [];
@@ -2116,9 +2130,9 @@ KEYWORDS
$result.=$sub_result;
}
$request->print($result."\n");
- $request->print('
'."\n");
+
# print student answer/submission
- # Options are (1) Handgaded submission only
+ # Options are (1) Handgraded submission only
# (2) Last submission, includes submission that is not handgraded
# (for multi-response type part)
# (3) Last submission plus the parts info
@@ -2128,10 +2142,10 @@ KEYWORDS
my $lastsubonly;
- if ($$timestamp eq '') {
- $lastsubonly.='
'.$$string[0].'
';
- } else {
- $lastsubonly = '
Date Submitted: '.$$timestamp."\n";
+ if ($$timestamp eq '') {
+ $lastsubonly.='
'.$$string[0].'
';
+ } else {
+ $lastsubonly = '
Date Submitted: '.$$timestamp."\n";
my %seenparts;
my @part_response_id = &flatten_responseType($responseType);
@@ -2219,7 +2233,7 @@ KEYWORDS
}
}
}
- $lastsubonly.='
'."\n";
+ $lastsubonly.='
'."\n"; # End: LC_grade_submissions_body
}
$request->print($lastsubonly);
} elsif ($env{'form.lastSub'} eq 'datesub') {
@@ -2281,11 +2295,11 @@ KEYWORDS
my @partlist;
my @gradePartRespid;
my @part_response_id = &flatten_responseType($responseType);
- $request->print('
'.
-
- '
'.
- &mt('Assign Grades').'
'.
- '
');
+ $request->print(
+ '
'
+ .'
'.&mt('Assign Grades').'
'
+ );
+ $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 });
@@ -2297,7 +2311,8 @@ KEYWORDS
push(@gradePartRespid,$partid.'.'.$respid);
$request->print(&gradeBox($request,$symb,$uname,$udom,$counter,$partid,\%record));
}
- $request->print('
');
+ $request->print(&gradeBox_end()); #
+ $request->print('
');
$request->print('
');
if ($perm{'vgr'}) {
@@ -4485,11 +4500,13 @@ sub displayPage {
}
if (&canmodify($usec)) {
+ $studentTable.=&gradeBox_start();
foreach my $partid (@{$parts}) {
$studentTable.=&gradeBox($request,$symbx,$uname,$udom,$question,$partid,\%record);
$studentTable.=''."\n";
$question++;
}
+ $studentTable.=&gradeBox_end();
$prob++;
}
$studentTable.='';
@@ -7597,8 +7614,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);
@@ -7610,6 +7634,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) =
@@ -7693,6 +7727,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);
@@ -8475,7 +8515,7 @@ sub grading_menu {
icon => 'addClickerInfoFile.png',
linktitle => 'Specify a file containing the clicker information for this resource.'
},
- { linktext => 'Grade/Manage/Review Bubblesheet Forms',
+ { linktext => 'Grade/Manage/Review Bubblesheets',
url => $url4,
permission => 'F',
icon => 'stat.png',