'."\n");
- if ($env{'form.handgrade'} eq 'no') {
- my $checkMark='
Note: Part(s) graded correct by the computer is marked with a '.
- $checkIcon.' symbol.'."\n";
- $request->print($checkMark);
- }
-
# option to display problem, only once else it cause problems
# with the form later since the problem has a form.
if ($env{'form.vProb'} eq 'yes' or $env{'form.vAns'} eq 'yes') {
@@ -1959,10 +1953,11 @@ KEYWORDS
}
# This is where output for one specific student would start
- my $bgcolor='#DDEEDD';
- if ($counter%2) { $bgcolor='#DDDDEE'; }
+ my $add_class = ($counter%2) ? 'LC_grade_show_user_odd_row' : '';
$request->print("\n\n".
- '
'."\n");
if ($env{'form.vProb'} eq 'all' or $env{'form.vAns'} eq 'all') {
my $mode;
@@ -1982,12 +1977,19 @@ KEYWORDS
# Display student info
$request->print(($counter == 0 ? '' : ' '));
- my $result='
'."\n".
- '
'."\n";
-
- $result.='Fullname: '.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).' '."\n";
+ my $result='
';
+
+ $result.='
';
+ $result.= &mt('Submissions');
$result.=''."\n";
+ if ($env{'form.handgrade'} eq 'no') {
+ $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;
@@ -1999,7 +2001,7 @@ KEYWORDS
$result.=$sub_result;
}
$request->print($result."\n");
-
+ $request->print('
'."\n");
# print student answer/submission
# Options are (1) Handgaded submission only
# (2) Last submission, includes submission that is not handgraded
@@ -2008,12 +2010,14 @@ KEYWORDS
# (4) The whole record for this student
if ($env{'form.lastSub'} =~ /^(lastonly|hdgrade)$/) {
my ($string,$timestamp)= &get_last_submission(\%record);
- my $lastsubonly=''.
- ($$timestamp eq '' ? '' : 'Date Submitted: '.
- $$timestamp)."
\n";
+
+ my $lastsubonly;
+
if ($$timestamp eq '') {
- $lastsubonly.='
'.$$string[0];
+ $lastsubonly.='
'.$$string[0].'
';
} else {
+ $lastsubonly = '
Date Submitted: '.$$timestamp."\n";
+
my %seenparts;
my @part_response_id = &flatten_responseType($responseType);
foreach my $part (@part_response_id) {
@@ -2036,16 +2040,16 @@ KEYWORDS
}
my $responsetype = $responseType->{$partid}->{$respid};
if (!exists($record{"resource.$partid.$respid.submission"})) {
- $lastsubonly.='
Part: '.
+ $lastsubonly.="\n".'
Part: '.
$display_part.' ( ID '.$respid.
' ) '.
- 'Nothing submitted - no attempts
';
+ ''.&mt('Nothing submitted - no attempts').'
';
next;
}
- foreach (@$string) {
- my ($partid,$respid) = /^resource\.([^\.]*)\.([^\.]*)\.submission/;
+ foreach my $submission (@$string) {
+ my ($partid,$respid) = ($submission =~ /^resource\.([^\.]*)\.([^\.]*)\.submission/);
if (join('_',@{$part}) ne ($partid.'_'.$respid)) { next; }
- my ($ressub,$subval) = split(/:/,$_,2);
+ my ($ressub,$subval) = split(/:/,$submission,2);
# Similarity check
my $similar='';
if($env{'form.checkPlag'}){
@@ -2075,31 +2079,32 @@ KEYWORDS
($env{'form.lastSub'} eq 'hdgrade' &&
$$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) {
my $display_part=&get_display_part($partid,$symb);
- $lastsubonly.='
Part: '.
+ $lastsubonly.='
Part: '.
$display_part.' ( ID '.$respid.
' ) ';
my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record);
if (@$files) {
- $lastsubonly.=' Like all files provided by users, this file may contain virusses ';
+ $lastsubonly.=' '.&mt('Like all files provided by users, this file may contain virusses').' ';
my $file_counter = 0;
foreach my $file (@$files) {
- $file_counter ++;
+ $file_counter++;
&Apache::lonnet::allowuploaded('/adm/grades',$file);
$lastsubonly.=' '.$file.'';
}
$lastsubonly.=' ';
}
- $lastsubonly.='Submitted Answer: '.
+ $lastsubonly.=''.&mt('Submitted Answer:').' '.
&cleanRecord($subval,$responsetype,$symb,$partid,
$respid,\%record,$order);
if ($similar) {$lastsubonly.="
');
+
$result=''."\n";
$result.=''."\n";
$ctr++;
}
- $request->print($result.''."\n");
+ $request->print($result.''."\n");
# Done with printing info for one student
- $request->print('');
+ $request->print('');#LC_grade_show_user_body
+ $request->print('');#LC_grade_show_user
# print end of form
@@ -4273,30 +4293,33 @@ sub displaySubByDates {
my $isCODE=0;
my $isTask = ($symb =~/\.task$/);
if (exists($record->{'resource.CODE'})) { $isCODE=1; }
- my $studentTable='
'.
- '
'.
- '
Date/Time
'.
- ($isCODE?'
CODE
':'').
- '
Submission
'.
- '
Status
';
+ my $studentTable=&Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ '
'.&mt('Date/Time').'
'.
+ ($isCODE?'
'.&mt('CODE').'
':'').
+ '
'.&mt('Submission').'
'.
+ '
'.&mt('Status').'
'.
+ &Apache::loncommon::end_data_table_header_row();
my ($version);
my %mark;
my %orders;
$mark{'correct_by_student'} = $checkIcon;
if (!exists($$record{'1:timestamp'})) {
- return ' Nothing submitted - no attempts ';
+ return ' '.&mt('Nothing submitted - no attempts').' ';
}
my $interaction;
for ($version=1;$version<=$$record{'version'};$version++) {
- my $timestamp = scalar(localtime($$record{$version.':timestamp'}));
+ my $timestamp =
+ &Apache::lonlocal::locallocaltime($$record{$version.':timestamp'});
if (exists($$record{$version.':resource.0.version'})) {
$interaction = $$record{$version.':resource.0.version'};
}
my $where = ($isTask ? "$version:resource.$interaction"
: "$version:resource");
- $studentTable.='
';
+ $studentTable.=&Apache::loncommon::end_data_table();
return $studentTable;
}
@@ -5216,6 +5239,7 @@ sub scan_data {
sub scantron_parse_scanline {
my ($line,$whichline,$scantron_config,$scan_data,$just_header)=@_;
+
my %record;
my $questions=substr($line,$$scantron_config{'Qstart'}-1); # Answers
my $data=substr($line,0,$$scantron_config{'Qstart'}-1); # earlier stuff
@@ -5254,7 +5278,9 @@ sub scantron_parse_scanline {
my $questnum=0;
my $ansnum =1; # Multiple 'answer lines'/question.
- while ($questions) {
+ chomp($questions); # Get rid of any trailing \n.
+ $questions =~ s/\r$//; # Get rid of trailing \r too (MAC or Win uploads).
+ while (length($questions)) {
my $answers_needed = $bubble_lines_per_response{$questnum};
my $answer_length = $$scantron_config{'Qlength'} * $answers_needed;
@@ -5297,9 +5323,8 @@ sub scantron_parse_scanline {
}
if (!&scan_data($scan_data,"$whichline.no_bubble.$questnum")) {
push(@{$record{"scantron.missingerror"}},$questnum);
- $ansnum += $answers_needed;
+ # $ansnum += $answers_needed;
}
-
} else {
for (my $ans = 0; $ans < $answers_needed; $ans++) {
$record{"scantron.$ansnum.answer"} = substr($currentquest, $ans, 1);
@@ -6457,7 +6482,8 @@ ENDSCRIPT
join(',',@{$arg}).'" />');
foreach my $question (@{$arg}) {
my $selected = &get_response_bubbles($scan_record, $question);
- &scantron_bubble_selector($r,$scan_config,$question);
+ my @select_array = split(/:/,$selected); # ought to be an array of empties.
+ &scantron_bubble_selector($r,$scan_config,$question, @select_array);
}
} else {
$r->print("\n
");
@@ -6477,7 +6503,7 @@ ENDSCRIPT
$r - Apache request object
$scan_config - hash from &get_scantron_config()
$quest - number of the bubble line to make a corrector for
- $lines - array of answer lines.
+ @lines - array of answer lines.
=cut
@@ -6848,6 +6874,9 @@ sub scantron_validate_missingbubbles {
$scan_data);
if (!defined($$scan_record{'scantron.missingerror'})) { next; }
my @to_correct;
+
+ # Probably here's where the error is...
+
foreach my $missing (@{$$scan_record{'scantron.missingerror'}}) {
if ($missing > $max_bubble) { next; }
push(@to_correct,$missing);
@@ -7361,9 +7390,8 @@ sub submit_options {
GRADINGMENUJS
&commonJSfunctions($request);
- my $result='
Manual Grading/View Submission
';
my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle);
- $result.=$table;
+ my $result;
my (undef,$sections) = &getclasslist('all','0');
my $savedState = &savedState();
my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'submission' : $$savedState{'saveCmd'});
@@ -7380,102 +7408,104 @@ GRADINGMENUJS
''."\n".
''."\n";
- $result.='