[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface londocs.pm
raeburn
raeburn at source.lon-capa.org
Thu Apr 11 12:32:34 EDT 2019
raeburn Thu Apr 11 16:32:34 2019 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface londocs.pm
Log:
- For 2.11
Backport 1.660.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.484.2.78 loncom/interface/londocs.pm:1.484.2.79
--- loncom/interface/londocs.pm:1.484.2.78 Thu Sep 6 02:52:33 2018
+++ loncom/interface/londocs.pm Thu Apr 11 16:32:33 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.484.2.78 2018/09/06 02:52:33 raeburn Exp $
+# $Id: londocs.pm,v 1.484.2.79 2019/04/11 16:32:33 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1632,14 +1632,7 @@
# Retrieve information about all course maps in main content area
my $allmaps = {};
- if ($folder =~ /^default/) {
- $allmaps =
- &Apache::loncommon::allmaps_incourse($coursedom,$coursenum,
- $env{"course.$env{'request.course.id'}.home"},
- $env{'request.course.id'});
- }
-
- my (@toclear,%mapurls,%lockerrs,%msgerrs,%results);
+ my (@toclear,%mapurls,%lockerrs,%msgerrs,%results,$donechk);
# Loop over the items to paste
foreach my $suffix (@dopaste) {
@@ -1657,6 +1650,13 @@
if ($is_map{$suffix}) {
# If pasting a map, check if map contains other maps
my (%hierarchy,%titles);
+ if (($folder =~ /^default/) && (!$donechk)) {
+ $allmaps =
+ &Apache::loncommon::allmaps_incourse($coursedom,$coursenum,
+ $env{"course.$env{'request.course.id'}.home"},
+ $env{'request.course.id'});
+ $donechk = 1;
+ }
&contained_map_check($url,$folder,\%removefrommap,\%removeparam,
\%addedmaps,\%hierarchy,\%titles,$allmaps);
if ($url=~ m{^/uploaded/}) {
More information about the LON-CAPA-cvs
mailing list