';
}
if ($symb) {
@@ -2618,7 +2661,7 @@ sub resource_info_box {
} else {
$return='
'.&mt('No context provided.').'
';
}
- if (($stuvcurrent ne '') || ($divforres)) {
+ if ($stuvcurrent ne '') {
$return .= '
';
}
return $return;
@@ -3349,18 +3392,12 @@ PARAMSONE
if (itemid != null) {
itemh = itemid.offsetHeight;
}
- var primaryheight = 0;
- if (document.getElementById('LC_nav_bar') != null) {
- primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
- }
- var secondaryheight = 0;
+ var primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
+ var secondaryheight;
if (document.getElementById('LC_secondary_menu') != null) {
secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight;
}
- var crumbsheight = 0;
- if (document.getElementById('LC_breadcrumbs') != null) {
- crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
- }
+ var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
var dccidheight = 0;
if (document.getElementById('dccid') != null) {
dccidheight = document.getElementById('dccid').offsetHeight;
@@ -3441,16 +3478,7 @@ function go(url) {
currentURL = null;
currentSymb= null;
var lcHostname = setLCHost();
- if (lcHostname!='' && lcHostname!= null) {
- var RegExp = /^https?\:/;
- if (RegExp.test(url)) {
- window.location.href=url;
- } else {
- window.location.href=lcHostname+url;
- }
- } else {
- window.location.href=url;
- }
+ window.location.href=lcHostname+url;
}
}
@@ -3490,20 +3518,18 @@ sub jump_to_editres {
}
} else {
unless ($cfile =~ m{^/priv/}) {
- if ($cfile =~ m{^(/adm/wrapper/ext/([^#]+))(?:|#([^#]+))$}) {
+ if ($cfile =~ m{^(/adm/wrapper/ext/([^#]+))#([^#]+)$}) {
$cfile = $1;
my $extlink = $2;
$anchor = $3;
$is_ext = 1;
if (($extlink !~ /^https:/) && ($ENV{'SERVER_PORT'} == 443)) {
- unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
- $usehttp = 1;
- }
+ $usehttp = 1;
} elsif ($env{'request.use_absolute'}) {
if ($env{'request.use_absolute'} =~ m{^https://}) {
$usehttps = 1;
}
- }
+ }
} elsif ($cfile =~ m{^/?public/($match_domain)/($match_courseid)/syllabus}) {
if ($ENV{'SERVER_PORT'} == 443) {
my ($cdom,$cnum) = ($1,$2);
@@ -3511,9 +3537,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()) || (&Apache::lonnet::waf_allssl($hostname))) {
- $usehttp = 1;
- }
+ $usehttp = 1;
}
}
} elsif ($env{'request.use_absolute'}) {
@@ -3553,7 +3577,9 @@ sub jump_to_editres {
if ($hostname ne '') {
$cfile = 'http://'.$hostname.(($cfile =~ /^\//)? '':'/').$cfile;
}
- $cfile .= (($cfile=~/\?/)?'&':'?').'usehttp=1';
+ unless ($is_ext) {
+ $cfile .= (($cfile=~/\?/)?'&':'?').'usehttp=1';
+ }
} elsif ($usehttps) {
$cfile = $env{'request.use_absolute'}.(($cfile =~ /^\//)? '':'/').$cfile;
}
@@ -3582,18 +3608,15 @@ sub jump_to_editres {
# javascript_valid_email
#
# Generates javascript to validate an e-mail address.
-# Returns a javascript function which accepts a form field as argument, and
+# Returns a javascript function which accetps a form field as argumnent, and
# returns false if field.value does not satisfy two regular expression matches
# for a valid e-mail address. Backwards compatible with old browsers without
# support for javascript RegExp (just checks for @ in field.value in this case).
sub javascript_valid_email {
my $scripttag .= <<'END';
-function validmail(field,suffix) {
+function validmail(field) {
var str = field.value;
- if (suffix != '' && suffix != undefined) {
- str += suffix;
- }
if (window.RegExp) {
var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; //"
@@ -3703,7 +3726,9 @@ sub scripttag {
Constructs a XHTML list from \@array.
-input:
+=over
+
+=item input:
=over
@@ -3717,7 +3742,9 @@ Attributes for