'
+ .'
'.&mt('Date Submitted:').' '.$$timestamp."\n";
my %seenparts;
my @part_response_id = &flatten_responseType($responseType);
@@ -2172,7 +2155,7 @@ KEYWORDS
$lastsubonly.="\n".'
'.
''.&mt('Part: [_1]',$display_part).''.
' '.
- '('.&mt('Part ID: [_1]',$respid).')'.
+ '('.&mt('Part ID: [_1]',$respid).')'.
' '.
''.&mt('Nothing submitted - no attempts.').'
';
next;
@@ -2180,7 +2163,7 @@ KEYWORDS
foreach my $submission (@$string) {
my ($partid,$respid) = ($submission =~ /^resource\.([^\.]*)\.([^\.]*)\.submission/);
if (join('_',@{$part}) ne ($partid.'_'.$respid)) { next; }
- my ($ressub,$subval) = split(/:/,$submission,2);
+ my ($ressub,$hide,$subval) = split(/:/,$submission,3);
# Similarity check
my $similar='';
if($env{'form.checkPlag'}){
@@ -2192,16 +2175,21 @@ KEYWORDS
&Apache::lonnet::coursedescription($ocrsid,
{'one_time' => 1});
- $similar="
".
- &mt('Essay is [_1]% similar to an essay by [_2] in course [_3] (course id [_4]:[_5])',
- $osim,
- &Apache::loncommon::plainname($oname,$odom).' ('.$oname.':'.$odom.')',
- $old_course_desc{'description'},
- $old_course_desc{'num'},
- $old_course_desc{'domain'}).
- '
'.
- &keywords_highlight($oessay).
- '
';
+ if ($hide) {
+ $similar='
'.&mt("Essay was found to be similar to another essay submitted for this assignment.").'
'.
+ &mt('As the current submission is for an anonymous survey, no other details are available.').'
';
+ } else {
+ $similar="
".
+ &mt('Essay is [_1]% similar to an essay by [_2] in course [_3] (course id [_4]:[_5])',
+ $osim,
+ &Apache::loncommon::plainname($oname,$odom).' ('.$oname.':'.$odom.')',
+ $old_course_desc{'description'},
+ $old_course_desc{'num'},
+ $old_course_desc{'domain'}).
+ '
'.
+ &keywords_highlight($oessay).
+ '
';
+ }
}
}
my $order=&get_order($partid,$respid,$symb,$uname,$udom);
@@ -2213,21 +2201,27 @@ KEYWORDS
'
'.&mt('Part: [_1]',$display_part).''.
'
'.
'('.&mt('Part ID: [_1]',$respid).')'.
- ' ';
+ ' ';
my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record);
if (@$files) {
- $lastsubonly.='
'.&mt('Like all files provided by users, this file may contain viruses').'';
- my $file_counter = 0;
- foreach my $file (@$files) {
- $file_counter++;
- &Apache::lonnet::allowuploaded('/adm/grades',$file);
- $lastsubonly.='
'.$file.'';
- }
+ if ($hide) {
+ $lastsubonly.='
'.&mt('[quant,_1,file] uploaded to this anonymous survey',scalar(@{$files}));
+ } else {
+ $lastsubonly.='
'.&mt('Like all files provided by users, this file may contain viruses').'';
+ foreach my $file (@$files) {
+ &Apache::lonnet::allowuploaded('/adm/grades',$file);
+ $lastsubonly.='
'.$file.'';
+ }
+ }
$lastsubonly.='
';
}
- $lastsubonly.='
'.&mt('Submitted Answer:').' '.
- &cleanRecord($subval,$responsetype,$symb,$partid,
- $respid,\%record,$order,undef,$uname,$udom);
+ if ($hide) {
+ $lastsubonly.='
'.&mt('Anonymous Survey').'';
+ } else {
+ $lastsubonly.='
'.&mt('Submitted Answer:').' '.
+ &cleanRecord($subval,$responsetype,$symb,$partid,
+ $respid,\%record,$order,undef,$uname,$udom);
+ }
if ($similar) {$lastsubonly.="
$similar\n";}
$lastsubonly.='
';
}
@@ -2237,7 +2231,9 @@ KEYWORDS
}
$request->print($lastsubonly);
} elsif ($env{'form.lastSub'} eq 'datesub') {
- my (undef,$responseType,undef,$parts) = &showResourceInfo($symb);
+# my (undef,$responseType,undef,$parts) = &showResourceInfo($symb);
+ my ($parts,$handgrade,$responseType) = &response_type($symb);
+
$request->print(&displaySubByDates($symb,\%record,$parts,$responseType,$checkIcon,$uname,$udom));
} elsif ($env{'form.lastSub'} =~ /^(last|all)$/) {
$request->print(&Apache::loncommon::get_previous_attempt($symb,$uname,$udom,
@@ -2251,7 +2247,7 @@ KEYWORDS
# return if view submission with no grading option
if ($env{'form.showgrading'} eq '' || (!&canmodify($usec))) {
my $toGrade.='