--- loncom/homework/grades.pm 2014/01/29 16:31:20 1.715 +++ loncom/homework/grades.pm 2014/01/30 18:04:36 1.716 @@ -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 @@ sub cleanRecord { $result.=''; 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 @@ sub get_last_submission { my ($partid,$foo) = split(/submission$/,$key); my $draft = $lasthash{$partid.'awarddetail'} eq 'DRAFT' ? 'Draft Copy ' : ''; - 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) {