--- loncom/homework/essayresponse.pm 2011/07/26 17:14:51 1.115
+++ loncom/homework/essayresponse.pm 2019/02/19 14:24:38 1.118.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.115 2011/07/26 17:14:51 raeburn Exp $
+# $Id: essayresponse.pm,v 1.118.2.1 2019/02/19 14:24:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -91,7 +91,7 @@ sub start_essayresponse {
'
';
+ ''.&HTML::Entities::encode($answer, '"<>&').'
';
}
return ''.$output.'
';
@@ -397,8 +411,11 @@ sub file_submission {
my ($path,$filename) = ($file =~ m{^(.*/)([^/]+)$});
my $fullpath = '/userfiles/portfolio'.$path;
if (!exists($dirlist{$fullpath})) {
- my @list = &Apache::lonnet::dirlist($fullpath,$udom,$uname,1);
- $dirlist{$fullpath} = \@list;
+ my ($listref,$listerror) =
+ &Apache::lonnet::dirlist($fullpath,$udom,$uname,1);
+ if (ref($listref) eq 'ARRAY') {
+ $dirlist{$fullpath} = $listref;
+ }
}
if (ref($dirlist{$fullpath}) eq 'ARRAY') {
foreach my $dir_line (@{$dirlist{$fullpath}}) {