[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Wed Sep 28 11:13:50 EDT 2022


raeburn		Wed Sep 28 15:13:50 2022 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Copy global arrays from LONCAPA::map to scoped arrays before recursion.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1388 loncom/interface/loncommon.pm:1.1389
--- loncom/interface/loncommon.pm:1.1388	Tue Sep 13 12:22:14 2022
+++ loncom/interface/loncommon.pm	Wed Sep 28 15:13:50 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1388 2022/09/13 12:22:14 raeburn Exp $
+# $Id: loncommon.pm,v 1.1389 2022/09/28 15:13:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -18477,9 +18477,11 @@
         if ($fatal) {
             $errors ++;
         } else {
-            if ($#LONCAPA::map::resources > 0) {
-                foreach my $res (@LONCAPA::map::resources) {
-                    my ($title,$src,$ext,$type,$status)=split(/\:/,$res);
+            my @order = @LONCAPA::map::order;
+            if (@order > 0) {
+                my @resources = @LONCAPA::map::resources;
+                foreach my $idx (@order) {
+                    my ($title,$src,$ext,$type,$status)=split(/\:/,$resources[$idx]);
                     if (($src ne '') && ($status eq 'res')) {
                         if ($src =~ m{^\Q/uploaded/$cdom/$cnum/\E(supplemental_\d+\.sequence)$}) {
                             ($numfiles,$numexttools,$errors) = &recurse_supplemental($cnum,$cdom,$1,




More information about the LON-CAPA-cvs mailing list