[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
raeburn
raeburn at source.lon-capa.org
Wed Sep 28 23:59:29 EDT 2022
raeburn Thu Sep 29 03:59:29 2022 EDT
Modified files:
/loncom/interface londocs.pm
Log:
- Create "empty" sequence file when copying an empty folder from Supplemental
to Main Content using the Course Editor if original sequence file is absent
to avoid "Map not found" warning on Course Initialization.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.680 loncom/interface/londocs.pm:1.681
--- loncom/interface/londocs.pm:1.680 Tue Sep 13 13:54:02 2022
+++ loncom/interface/londocs.pm Thu Sep 29 03:59:29 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.680 2022/09/13 13:54:02 raeburn Exp $
+# $Id: londocs.pm,v 1.681 2022/09/29 03:59:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1495,7 +1495,7 @@
}
$pasteitems .= '<label><input type="checkbox" name="pasting" id="pasting_'.$suffix.'" value="'.$suffix.'" '.$onclick.'/>'.$buffer.'</label>';
if ($nopaste) {
- $pasteitems .= $nopaste;
+ $pasteitems .= ' <span class="LC_cusr_emph">'.$nopaste.'</span>';
} else {
if ($othercrs) {
$pasteitems .= $othercrs;
@@ -2800,6 +2800,15 @@
$storefn =~ s/^((?:default|supplemental)_)(\d+)/$1$newsubdir{$key}/;
}
my $mapcontent = &Apache::lonnet::getfile($key);
+ if (($mapcontent eq '-1') && ($before{'map'} eq 'supplemental') &&
+ ($after{'map'} eq 'default') &&
+ ($key =~ m{^/uploaded/$match_domain/$match_courseid/supplemental_\d+\.sequence$})) {
+ $mapcontent = '<map>'."\n".
+ '<resource id="1" src="" type="start" />'."\n".
+ '<link from="1" to="2" index="1" />'."\n".
+ '<resource id="2" src="" type="finish" />'."\n".
+ '</map>';
+ }
if ($mapcontent eq '-1') {
if (ref($errors) eq 'HASH') {
$errors->{$key} = 1;
More information about the LON-CAPA-cvs
mailing list