version 1.723, 2014/02/27 02:28:51
|
version 1.724, 2014/08/25 20:23:01
|
Line 406 sub cleanRecord {
|
Line 406 sub cleanRecord {
|
$env{'form.kwstyle'} = $keyhash{$loginuser.'_kwstyle'} ne '' ? $keyhash{$loginuser.'_kwstyle'} : ''; |
$env{'form.kwstyle'} = $keyhash{$loginuser.'_kwstyle'} ne '' ? $keyhash{$loginuser.'_kwstyle'} : ''; |
$env{'form.'.$symb} = 1; # so that we don't have to read it from disk for multiple sub of the same prob. |
$env{'form.'.$symb} = 1; # so that we don't have to read it from disk for multiple sub of the same prob. |
} |
} |
$answer =~ s-\n-<br />-g; |
|
return '<br /><br /><blockquote><tt>'.&keywords_highlight(&HTML::Entities::encode($answer, '"<>&')).'</tt></blockquote>'; |
return '<br /><br /><blockquote><tt>'.&keywords_highlight(&HTML::Entities::encode($answer, '"<>&')).'</tt></blockquote>'; |
|
|
} elsif ( $response eq 'organic') { |
} elsif ( $response eq 'organic') { |
Line 2227 sub submission {
|
Line 2226 sub submission {
|
foreach my $submission (@$string) { |
foreach my $submission (@$string) { |
my ($partid,$respid) = ($submission =~ /^resource\.([^\.]*)\.([^\.]*)\.submission/); |
my ($partid,$respid) = ($submission =~ /^resource\.([^\.]*)\.([^\.]*)\.submission/); |
if (join('_',@{$part}) ne ($partid.'_'.$respid)) { next; } |
if (join('_',@{$part}) ne ($partid.'_'.$respid)) { next; } |
my ($ressub,$hide,$subval) = split(/:/,$submission,3); |
my ($ressub,$hide,$draft,$subval) = split(/:/,$submission,4); |
# Similarity check |
# Similarity check |
my $similar=''; |
my $similar=''; |
my ($type,$trial,$rndseed); |
my ($type,$trial,$rndseed); |
Line 2296 sub submission {
|
Line 2295 sub submission {
|
if ($hide eq 'anon') { |
if ($hide eq 'anon') { |
$lastsubonly.='<br /><b>'.&mt('Anonymous Survey').'</b>'; |
$lastsubonly.='<br /><b>'.&mt('Anonymous Survey').'</b>'; |
} else { |
} else { |
$lastsubonly.='<br /><b>'.&mt('Submitted Answer:').' </b>'. |
$lastsubonly.='<br /><b>'.&mt('Submitted Answer:').' </b>'; |
|
if ($draft) { |
|
$lastsubonly.= ' <span class="LC_warning">'.&mt('Draft Copy').'</span>'; |
|
} |
|
$subval = |
&cleanRecord($subval,$responsetype,$symb,$partid, |
&cleanRecord($subval,$responsetype,$symb,$partid, |
$respid,\%record,$order,undef,$uname,$udom,$type,$trial,$rndseed); |
$respid,\%record,$order,undef,$uname,$udom,$type,$trial,$rndseed); |
|
if ($responsetype eq 'essay') { |
|
$subval =~ s{\n}{<br />}g; |
|
} |
|
$lastsubonly.=$subval."\n"; |
} |
} |
if ($similar) {$lastsubonly.="<br /><br />$similar\n";} |
if ($similar) {$lastsubonly.="<br /><br />$similar\n";} |
$lastsubonly.='</div>'; |
$lastsubonly.='</div>'; |
Line 2545 sub get_last_submission {
|
Line 2552 sub get_last_submission {
|
} |
} |
} |
} |
my ($partid,$foo) = split(/submission$/,$key); |
my ($partid,$foo) = split(/submission$/,$key); |
my $draft = $lasthash{$partid.'awarddetail'} eq 'DRAFT' ? |
my $draft = $lasthash{$partid.'awarddetail'} eq 'DRAFT' ? 1 : 0; |
'<span class="LC_warning">'.&mt('Draft Copy').'</span> ' : ''; |
|
#push(@string, join(':', $key, $hide, $draft.$lasthash{$key})); |
#push(@string, join(':', $key, $hide, $draft.$lasthash{$key})); |
push(@string, join(':', $key, $hide, $draft.( |
push(@string, join(':', $key, $hide, $draft, ( |
ref($lasthash{$key}) eq 'ARRAY' ? |
ref($lasthash{$key}) eq 'ARRAY' ? |
join(',', @{$lasthash{$key}}) : $lasthash{$key}) )); |
join(',', @{$lasthash{$key}}) : $lasthash{$key}) )); |
} |
} |