');
+ ''.
+ ' '.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).' '.
+ ' '."\n");
if ($env{'form.vProb'} eq 'all' or $env{'form.vAns'} eq 'all') {
my $mode;
@@ -1974,7 +1973,7 @@ KEYWORDS
$mode='answer';
}
&Apache::lonxml::clear_problem_counter();
- $request->print(&show_problem($request,$symb,$uname,$udom,1,1,$mode));
+ $request->print(&show_problem($request,$symb,$uname,$udom,1,1,$mode,{'request.prefix' => 'ctr'.$counter}));
}
my %record = &Apache::lonnet::restore($symb,$env{'request.course.id'},$udom,$uname);
@@ -1982,71 +1981,31 @@ 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.=''."\n");
# print student answer/submission
# Options are (1) Handgaded submission only
# (2) Last submission, includes submission that is not handgraded
@@ -2055,12 +2014,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) {
@@ -2083,16 +2044,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'}){
@@ -2122,31 +2083,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.=" $similar\n";}
+ $lastsubonly.=' ';
}
}
}
+ $lastsubonly.=''."\n";
}
- $lastsubonly.=' | '."\n";
$request->print($lastsubonly);
- } elsif ($env{'form.lastSub'} eq 'datesub') {
+ } elsif ($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)$/) {
@@ -2158,13 +2120,12 @@ KEYWORDS
$request->print(''."\n");
-
# return if view submission with no grading option
if ($env{'form.showgrading'} eq '' || (!&canmodify($usec))) {
my $toGrade.=' '."\n" if (&canmodify($usec));
- $toGrade.=' | |
|
'."\n";
+ $toGrade.=' '."\n";
if (($env{'form.command'} eq 'submission') ||
($env{'form.command'} eq 'processGroup' && $counter == $total)) {
$toGrade.=''.&show_grading_menu_form($symb);
@@ -2172,45 +2133,45 @@ KEYWORDS
$request->print($toGrade);
return;
} else {
- $request->print(' |