--- loncom/homework/imageresponse.pm 2007/09/25 23:16:13 1.85 +++ loncom/homework/imageresponse.pm 2007/09/25 23:45:33 1.86 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # image click response style # -# $Id: imageresponse.pm,v 1.85 2007/09/25 23:16:13 albertel Exp $ +# $Id: imageresponse.pm,v 1.86 2007/09/25 23:45:33 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -376,8 +376,8 @@ sub gradefoils { sub stringify_submission { my ($response) = @_; - return - join("\0",map {$_."\1".$response->{$_}} (sort(keys(%{ $response })))); + return &Apache::lonnet::hash2str(%{ $response }); + } @@ -391,10 +391,10 @@ sub get_submission { $Apache::lonhomework::history{"resource.$part.$respid.submission"}; } - if ($string !~ /\0/) { + if ($string !~ /=/) { return split(':',$string); } else { - my %response = map { split("\1",$_,2) } (split("\0",$string)); + my %response = &Apache::lonnet::str2hash($string); return split(':',$response{$name}); } }