--- loncom/interface/lonsyllabus.pm 2017/02/20 18:29:23 1.143 +++ loncom/interface/lonsyllabus.pm 2018/12/27 20:10:31 1.145 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.143 2017/02/20 18:29:23 raeburn Exp $ +# $Id: lonsyllabus.pm,v 1.145 2018/12/27 20:10:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -306,14 +306,17 @@ sub handler { if ($allowed) { #---------------------------------- Print External URL Syllabus Info if editing if ($target ne 'tex') { + my $hostname = &Apache::lonnet::hostname($homeserver); my $protocol = $Apache::lonnet::protocol{$homeserver}; $protocol = 'http' if ($protocol ne 'https'); my $link = $r->uri; if (($protocol eq 'https') && ($external =~ m{^http://})) { - $link .= '?usehttp=1'; - $protocol = 'http'; + unless (&Apache::lonnet::uses_sts()) { + $link .= '?usehttp=1'; + $protocol = 'http'; + } } - $link = $protocol.'://'.&Apache::lonnet::hostname($homeserver).$link; + $link = $protocol.'://'.$hostname.$link; $r->print('