--- loncom/interface/statistics/lonstudentsubmissions.pm 2004/09/23 14:55:24 1.24 +++ loncom/interface/statistics/lonstudentsubmissions.pm 2004/10/08 16:40:54 1.25 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentsubmissions.pm,v 1.24 2004/09/23 14:55:24 matthew Exp $ +# $Id: lonstudentsubmissions.pm,v 1.25 2004/10/08 16:40:54 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -109,7 +109,7 @@ sub BuildStudentSubmissionsPage { my $resource = $navmap->getBySymb($symb); push(@Problems,$resource); } - # + # if (! scalar(@Problems) || ! defined($Problems[0])) { $r->print('resource is undefined'); } else { @@ -458,6 +458,9 @@ sub html_results { sub html_format_sub { my ($submission,$resptype) = @_; return '' if (! defined($submission) || $submission eq ''); + $submission = &HTML::Entities::decode($submission); + $submission =~ s/\\\"/\"/g; + $submission =~ s/\\\'/\'/g; if ($resptype eq 'essay') { $submission =~ s|\\r\\n|$/|g; $submission = &HTML::Entities::encode($submission,'<>&"'); @@ -465,16 +468,20 @@ sub html_format_sub { $submission =~ s|\\||g; $submission = '

'.$submission.'

'; } elsif ($resptype eq 'radiobutton') { + $submission = &HTML::Entities::encode($submission,'<>&"'); $submission =~ s/=([^=])$//; } elsif ($resptype =~ /^(option|match|rank)$/) { $submission = '