[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /auth lonroles.pm
raeburn
raeburn at source.lon-capa.org
Sun Jul 28 09:57:37 EDT 2019
raeburn Sun Jul 28 13:57:37 2019 EDT
Modified files: (Branch: version_2_11_X)
/loncom/auth lonroles.pm
Log:
- For 2.11
Backport 1.326, 1.327, 1.342
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.269.2.35 loncom/auth/lonroles.pm:1.269.2.36
--- loncom/auth/lonroles.pm:1.269.2.35 Tue Sep 4 01:55:01 2018
+++ loncom/auth/lonroles.pm Sun Jul 28 13:57:36 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.269.2.35 2018/09/04 01:55:01 raeburn Exp $
+# $Id: lonroles.pm,v 1.269.2.36 2019/07/28 13:57:36 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -688,6 +688,17 @@
}
}
}
+ if (($dest =~ m{^\Q/public/$cdom/$cnum/syllabus\E.*(\?|\&)usehttp=1}) ||
+ ($dest =~ m{^\Q/adm/wrapper/ext/\E(?!https:)})) {
+ if ($ENV{'SERVER_PORT'} == 443) {
+ unless (&Apache::lonnet::uses_sts()) {
+ my $hostname = $r->hostname();
+ if ($hostname ne '') {
+ $dest = 'http://'.$hostname.$dest;
+ }
+ }
+ }
+ }
if ($dest =~ m{^/enc/}) {
if ($env{'request.role.adv'}) {
$dest = &Apache::lonenc::unencrypted($dest);
@@ -720,7 +731,7 @@
unless (($dest =~ m{^/enc/}) || ($dest =~ /(\?|\&)symb=.+___\d+___.+/)) {
if (($destsymb ne '') && ($destsymb !~ m{^/enc/})) {
my $esc_symb = &escape($destsymb);
- $dest .= '?symb='.$esc_symb;
+ $dest .= (($dest =~/\?/)? '&':'?').'symb='.$esc_symb;
}
}
&redirect_user($r, &mt('Entering [_1]',
More information about the LON-CAPA-cvs
mailing list