[LON-CAPA-cvs] cvs: loncom /homework essayresponse.pm externalresponse.pm

raeburn raeburn at source.lon-capa.org
Sat Dec 6 15:08:16 EST 2014


raeburn		Sat Dec  6 20:08:16 2014 EDT

  Modified files:              
    /loncom/homework	externalresponse.pm essayresponse.pm 
  Log:
  - Bug 6690
    - IP based-access for files submitted to externalresponse not set 
      unless "Submit entries below as answer to receive credit" radio
      button is checked.
  
  
Index: loncom/homework/externalresponse.pm
diff -u loncom/homework/externalresponse.pm:1.28 loncom/homework/externalresponse.pm:1.29
--- loncom/homework/externalresponse.pm:1.28	Sat Dec  6 17:46:40 2014
+++ loncom/homework/externalresponse.pm	Sat Dec  6 20:08:16 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # external style responses
 #
-# $Id: externalresponse.pm,v 1.28 2014/12/06 17:46:40 raeburn Exp $
+# $Id: externalresponse.pm,v 1.29 2014/12/06 20:08:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -173,7 +173,9 @@
                 }
                 my $uploadedflag=0;
                 my $totalsize=0;
-                my %info;
+                my %info = (
+                             'is_submit' => $is_submit,
+                           );
                 my $url = &Apache::lonxml::get_param('url',$parstack,$safeeval);
                 if ($url =~ m{^https?://([^/]+)/}) {
                     use Socket;
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.121 loncom/homework/essayresponse.pm:1.122
--- loncom/homework/essayresponse.pm:1.121	Sat Dec  6 17:46:40 2014
+++ loncom/homework/essayresponse.pm	Sat Dec  6 20:08:16 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.121 2014/12/06 17:46:40 raeburn Exp $
+# $Id: essayresponse.pm,v 1.122 2014/12/06 20:08:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -534,7 +534,7 @@
         my @todelete = map { "/uploaded/$udom/$uname/portfolio".$_;  } keys(%port_delete);
         if (@tolock || @todelete) {
             if (ref($info) eq 'HASH') {
-                if ($info->{'ip'}) {
+                if (($info->{'ip'}) && ($info->{'is_submit'})) {
                     my @adds;
                     if (@tolock) {
                         @adds = map { "/uploaded/$udom/$uname/portfolio".$_;  } @tolock;




More information about the LON-CAPA-cvs mailing list