[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
raeburn
raeburn at source.lon-capa.org
Thu Apr 11 10:22:36 EDT 2019
raeburn Thu Apr 11 14:22:36 2019 EDT
Modified files:
/loncom/interface londocs.pm
Log:
- Only retrieve up to date information about all maps in a course when
pasting from clipboard if at least one item being pasted is a map.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.659 loncom/interface/londocs.pm:1.660
--- loncom/interface/londocs.pm:1.659 Sun Dec 30 19:47:02 2018
+++ loncom/interface/londocs.pm Thu Apr 11 14:22:35 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.659 2018/12/30 19:47:02 raeburn Exp $
+# $Id: londocs.pm,v 1.660 2019/04/11 14:22:35 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1819,14 +1819,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) {
@@ -1844,6 +1837,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,$coursenum,$coursedom,
\%removefrommap,\%removeparam,\%addedmaps,
\%hierarchy,\%titles,$allmaps);
More information about the LON-CAPA-cvs
mailing list