--- loncom/interface/londocs.pm 2017/12/18 22:56:45 1.645 +++ loncom/interface/londocs.pm 2017/12/29 15:04:11 1.646 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.645 2017/12/18 22:56:45 raeburn Exp $ +# $Id: londocs.pm,v 1.646 2017/12/29 15:04:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2795,7 +2795,8 @@ sub apply_fixups { } } } - 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;