--- loncom/homework/essayresponse.pm 2011/10/17 12:41:35 1.116
+++ loncom/homework/essayresponse.pm 2014/12/04 15:41:30 1.119
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.116 2011/10/17 12:41:35 raeburn Exp $
+# $Id: essayresponse.pm,v 1.119 2014/12/04 15:41:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -91,7 +91,7 @@ sub start_essayresponse {
'
';
+ ''.&HTML::Entities::encode($answer, '"<>&').'
';
}
return ''.$output.'
';
}
sub file_submission {
- my ($part,$id,$award,$uploadedflag,$totalsize,$deletions)=@_;
+ my ($part,$id,$award,$uploadedflag,$totalsize,$deletions,$context,$info)=@_;
my $files;
my $jspart=$part;
$jspart=~s/\./_/g;
@@ -513,6 +513,16 @@ sub file_submission {
$$uploadedflag=1;
}
}
+ if ($context eq 'externalresponse') {
+ my @todelete = keys(%port_delete);
+ if (@tolock || @todelete) {
+ if (ref($info) eq 'HASH') {
+ if ($info->{'ip'}) {
+ &Apache::lonnet::automated_portfile_access('ip',\@tolock,\@todelete,$info);
+ }
+ }
+ }
+ }
&Apache::lonnet::unmark_as_readonly($udom,$uname,[$symb,$crsid]);
&Apache::lonnet::mark_as_readonly($udom,$uname,[@tolock],[$symb,$crsid]);
&Apache::lonnet::clear_selected_files($uname);