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

raeburn raeburn at source.lon-capa.org
Thu Dec 4 15:43:24 EST 2014


raeburn		Thu Dec  4 20:43:24 2014 EDT

  Modified files:              
    /loncom/homework	essayresponse.pm 
  Log:
  - Bug 6690
    - Prepend first part of url to files for which ip-based access is being
      added or deleted.
  
  
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.119 loncom/homework/essayresponse.pm:1.120
--- loncom/homework/essayresponse.pm:1.119	Thu Dec  4 15:41:30 2014
+++ loncom/homework/essayresponse.pm	Thu Dec  4 20:43:23 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.119 2014/12/04 15:41:30 raeburn Exp $
+# $Id: essayresponse.pm,v 1.120 2014/12/04 20:43:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -514,11 +514,15 @@
         }
     }
     if ($context eq 'externalresponse') {
-        my @todelete = keys(%port_delete);
+        my @todelete = map { "/uploaded/$udom/$uname/portfolio".$_;  } keys(%port_delete);
         if (@tolock || @todelete) {
             if (ref($info) eq 'HASH') {
                 if ($info->{'ip'}) {
-                    &Apache::lonnet::automated_portfile_access('ip',\@tolock,\@todelete,$info);
+                    my @adds;
+                    if (@tolock) {
+                        @adds = map { "/uploaded/$udom/$uname/portfolio".$_;  } @tolock;
+                    }
+                    &Apache::lonnet::automated_portfile_access('ip',\@adds,\@todelete,$info);
                 }
             }
         }




More information about the LON-CAPA-cvs mailing list