--- loncom/interface/lonhtmlcommon.pm 2020/01/16 19:44:52 1.358.2.17.2.1
+++ loncom/interface/lonhtmlcommon.pm 2021/12/13 22:03:32 1.358.2.19
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.358.2.17.2.1 2020/01/16 19:44:52 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.358.2.19 2021/12/13 22:03:32 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1693,7 +1693,7 @@ sub show_return_link {
(($env{'request.noversionuri'}=~/^\/adm\//) &&
($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
($env{'request.noversionuri'}!~
- m{^/adm/.*/(smppg|bulletinboard|ext\.tool)($|\?)})
+ m{^/adm/.*/(smppg|bulletinboard)($|\?)})
));
}
@@ -2539,9 +2539,9 @@ sub course_custom_roles {
sub resource_info_box {
- my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp)=@_;
+ my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp,$divforres)=@_;
my $return='';
- if ($stuvcurrent ne '') {
+ if (($stuvcurrent ne '') || ($divforres)) {
$return = '
';
}
if ($symb) {
@@ -2570,7 +2570,7 @@ sub resource_info_box {
} else {
$return='
'.&mt('No context provided.').'
';
}
- if ($stuvcurrent ne '') {
+ if (($stuvcurrent ne '') || ($divforres)) {
$return .= '
';
}
return $return;
@@ -3301,12 +3301,18 @@ PARAMSONE
if (itemid != null) {
itemh = itemid.offsetHeight;
}
- var primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
- var secondaryheight;
+ var primaryheight = 0;
+ if (document.getElementById('LC_nav_bar') != null) {
+ primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
+ }
+ var secondaryheight = 0;
if (document.getElementById('LC_secondary_menu') != null) {
secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight;
}
- var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
+ var crumbsheight = 0;
+ if (document.getElementById('LC_breadcrumbs') != null) {
+ crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
+ }
var dccidheight = 0;
if (document.getElementById('dccid') != null) {
dccidheight = document.getElementById('dccid').offsetHeight;
@@ -3442,7 +3448,7 @@ sub jump_to_editres {
$anchor = $3;
$is_ext = 1;
if (($extlink !~ /^https:/) && ($ENV{'SERVER_PORT'} == 443)) {
- unless (&Apache::lonnet::uses_sts()) {
+ unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
$usehttp = 1;
}
} elsif ($env{'request.use_absolute'}) {
@@ -3457,7 +3463,7 @@ sub jump_to_editres {
($env{'course.'.$env{'request.course.id'}.'.num'} eq $cnum) &&
($env{'course.'.$env{'request.course.id'}.'.domain'} eq $cdom)) {
if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://}) {
- unless (&Apache::lonnet::uses_sts()) {
+ unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
$usehttp = 1;
}
}