--- loncom/interface/londocs.pm 2018/05/29 19:33:48 1.655 +++ loncom/interface/londocs.pm 2018/12/29 23:24:39 1.658 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.655 2018/05/29 19:33:48 raeburn Exp $ +# $Id: londocs.pm,v 1.658 2018/12/29 23:24:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4171,7 +4171,9 @@ END } elsif ($url eq "/public/$coursedom/$coursenum/syllabus") { if (($ENV{'SERVER_PORT'} == 443) && ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://})) { - $url .= '?usehttp=1'; + unless (&Apache::lonnet::uses_sts()) { + $url .= '?usehttp=1'; + } $nomodal = 1; } } @@ -4237,8 +4239,11 @@ END $url = $1; $anchor = $2; if (($url =~ m{^(|/adm/wrapper)/ext/(?!https:)}) && ($ENV{'SERVER_PORT'} == 443)) { - if ($hostname ne '') { - $url = 'http://'.$hostname.$url; + unless (&Apache::lonnet::uses_sts()) { + if ($hostname ne '') { + $url = 'http://'.$hostname.$url; + } + $url .= (($url =~ /\?/) ? '&':'?').'usehttp=1'; } $nomodal = 1; } @@ -4246,10 +4251,12 @@ END } elsif ($url =~ m{^\Q/public/$coursedom/$coursenum/syllabus\E}) { if (($ENV{'SERVER_PORT'} == 443) && ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://})) { - if ($hostname ne '') { - $url = 'http://'.$hostname.$url; + unless (&Apache::lonnet::uses_sts()) { + if ($hostname ne '') { + $url = 'http://'.$hostname.$url; + } + $url .= (($url =~ /\?/) ? '&':'?').'usehttp=1'; } - $url .= (($url =~ /\?/) ? '&':'?').'usehttp=1'; $nomodal = 1; } } @@ -7272,14 +7279,21 @@ 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://})) { - if ($hostname ne '') { - $backtourl = 'http://'.$hostname.$backtourl; + unless (&Apache::lonnet::uses_sts()) { + if ($hostname ne '') { + $backtourl = 'http://'.$hostname.$backtourl; + } + $backtourl .= (($backtourl =~ /\?/) ? '&':'?').'usehttp=1'; } - $backtourl .= (($backtourl =~ /\?/) ? '&':'?').'usehttp=1'; } } elsif ($backtourl =~ m{^/adm/wrapper/ext/(?!https:)}) { if (($ENV{'SERVER_PORT'} == 443) && ($hostname ne '')) { - $backtourl = 'http://'.$hostname.$backtourl; + unless (&Apache::lonnet::uses_sts()) { + if ($hostname ne '') { + $backtourl = 'http://'.$hostname.$backtourl; + } + $backtourl .= (($backtourl =~ /\?/) ? '&':'?').'usehttp=1'; + } } } if ($anchor ne '') { @@ -8116,6 +8130,7 @@ function showPage(current, pageId, nav, current.className = 'right'; } activeTab = ''; + toggleExternal(); toggleUpload(); toggleMap(); toggleCrsRes(); @@ -8128,6 +8143,7 @@ function showPage(current, pageId, nav, currentData = document.getElementById(pageId); currentData.style.display = 'block'; activeTab = pageId; + toggleExternal(); toggleUpload(); toggleMap(); toggleCrsRes();