--- loncom/interface/londocs.pm 2021/12/17 16:38:35 1.484.2.92
+++ loncom/interface/londocs.pm 2024/07/03 15:15:00 1.484.2.95
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.484.2.92 2021/12/17 16:38:35 raeburn Exp $
+# $Id: londocs.pm,v 1.484.2.95 2024/07/03 15:15:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1031,7 +1031,11 @@ sub docs_change_log {
}
$r->print('');
if ($docslog{$id}{'logentry'}{'parameter_res'}) {
- $r->print(&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'}))[0]).':
');
+ my ($title,$url) = split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'},3);
+ if ($title eq '') {
+ ($title) = ($url =~ m{/([^/]+)$});
+ }
+ $r->print(&LONCAPA::map::qtescape($title).':');
foreach my $parameter ('randompick','hiddenresource','encrypturl','randomorder') {
if ($docslog{$id}{'logentry'}{'parameter_action_'.$parameter}) {
# FIXME: internationalization seems wrong here
@@ -1327,7 +1331,7 @@ sub print_paste_buffer {
}
$pasteitems .= '';
if ($nopaste) {
- $pasteitems .= $nopaste;
+ $pasteitems .= ' '.$nopaste.'';
} else {
if ($othercrs) {
$pasteitems .= $othercrs;
@@ -2563,6 +2567,15 @@ sub apply_fixups {
$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 = '';
+ }
if ($mapcontent eq '-1') {
if (ref($errors) eq 'HASH') {
$errors->{$key} = 1;
@@ -2845,7 +2858,7 @@ sub update_parameter {
my ($name,$url)=split(/\:/,$LONCAPA::map::resources[$res]);
$name=&LONCAPA::map::qtescape($name);
$url=&LONCAPA::map::qtescape($url);
- next unless ($name && $url);
+ next unless ($url);
my $is_map;
if ($url =~ m{/uploaded/.+\.(page|sequence)$}) {
$is_map = 1;
@@ -3427,7 +3440,7 @@ sub multiple_check_form {
return unless (ref($listsref) eq 'HASH');
my $disabled;
unless ($canedit) {
- $disabled = 'disabled="disabled"';
+ $disabled = ' disabled="disabled"';
}
my $output =
'
SUPDOCFORM
@@ -6602,7 +6619,7 @@ sub editing_js {
if ($backtourl =~ m{^\Q/public/$coursedom/$coursenum/syllabus\E}) {
if (($ENV{'SERVER_PORT'} == 443) &&
($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://})) {
- unless (&Apache::lonnet::uses_sts()) {
+ unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
if ($hostname ne '') {
$backtourl = 'http://'.$hostname.$backtourl;
}
@@ -6611,7 +6628,7 @@ sub editing_js {
}
} elsif ($backtourl =~ m{^/adm/wrapper/ext/(?!https:)}) {
if (($ENV{'SERVER_PORT'} == 443) && ($hostname ne '')) {
- unless (&Apache::lonnet::uses_sts()) {
+ unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
if ($hostname ne '') {
$backtourl = 'http://'.$hostname.$backtourl;
}