[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface londocs.pm

raeburn raeburn at source.lon-capa.org
Sun Apr 29 13:29:24 EDT 2018


raeburn		Sun Apr 29 17:29:24 2018 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	londocs.pm 
  Log:
  - For 2.11
    Backport 1.646, 1.647
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.484.2.76 loncom/interface/londocs.pm:1.484.2.77
--- loncom/interface/londocs.pm:1.484.2.76	Sat Jan 27 03:46:52 2018
+++ loncom/interface/londocs.pm	Sun Apr 29 17:29:23 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.484.2.76 2018/01/27 03:46:52 raeburn Exp $
+# $Id: londocs.pm,v 1.484.2.77 2018/04/29 17:29:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2463,7 +2463,8 @@
                     }
                 }
             }
-            for (my $i=0; $i<@LONCAPA::map::order; $i++) {
+            my $total = scalar(@LONCAPA::map::order) - 1;
+            for (my $i=$total; $i>=0; $i--) {
                 my $idx = $LONCAPA::map::order[$i];
                 if (defined($LONCAPA::map::resources[$idx])) {
                     my $changed;
@@ -2473,7 +2474,7 @@
                         splice(@LONCAPA::map::order,$i,1);
                         if (ref($currparam{$idx}) eq 'ARRAY') {
                             foreach my $name (@{$currparam{$idx}}) {
-                                &LONCAPA::map::delparameter($idx,'parameter_'.$name);
+                                &LONCAPA::map::delparameter($idx,$name);
                             }
                         }
                         next;
@@ -2515,7 +2516,7 @@
             foreach my $idx (keys(%remparam)) {
                 if (ref($remparam{$idx}) eq 'ARRAY') {
                     foreach my $name (@{$remparam{$idx}}) {   
-                        &LONCAPA::map::delparameter($idx,'parameter_'.$name);
+                        &LONCAPA::map::delparameter($idx,$name);
                     }
                 }
             }




More information about the LON-CAPA-cvs mailing list