[LON-CAPA-cvs] cvs: loncom /homework grades.pm
bisitz
bisitz at source.lon-capa.org
Thu Jan 30 13:04:36 EST 2014
bisitz Thu Jan 30 18:04:36 2014 EDT
Modified files:
/loncom/homework grades.pm
Log:
Bug #5409:
- Also respect customresponse (multiple input fields possible, too)
- Display of answer after "Submitted Answer:" on grades screen
(Co-op with Stefan Droeschler and Marcel Kruse)
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.715 loncom/homework/grades.pm:1.716
--- loncom/homework/grades.pm:1.715 Wed Jan 29 16:31:20 2014
+++ loncom/homework/grades.pm Thu Jan 30 18:04:36 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.715 2014/01/29 16:31:20 bisitz Exp $
+# $Id: grades.pm,v 1.716 2014/01/30 18:04:36 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -437,7 +437,8 @@
$result.='</ul>';
return $result;
}
- } elsif ( $response =~ m/(?:numerical|formula)/) {
+ } elsif ( $response =~ m/(?:numerical|formula|custom)/) {
+ # Respect multiple input fields, see Bug #5409
$answer =
&Apache::loncommon::format_previous_attempt_value('submission',
$answer);
@@ -2514,7 +2515,10 @@
my ($partid,$foo) = split(/submission$/,$key);
my $draft = $lasthash{$partid.'awarddetail'} eq 'DRAFT' ?
'<span class="LC_warning">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.(
+ ref($lasthash{$key}) eq 'ARRAY' ?
+ join(',', @{$lasthash{$key}}) : $lasthash{$key}) ));
}
}
if (!@string) {
More information about the LON-CAPA-cvs
mailing list