--- loncom/interface/londocs.pm 2017/02/18 14:16:47 1.620 +++ loncom/interface/londocs.pm 2017/02/18 23:39:15 1.621 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.620 2017/02/18 14:16:47 raeburn Exp $ +# $Id: londocs.pm,v 1.621 2017/02/18 23:39:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3970,7 +3970,7 @@ END } } - my ($editlink,$extresform,$anchor,$hiddenres); + my ($editlink,$extresform,$anchor,$hiddenres,$nomodal); my $orig_url = $url; $orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; $url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}; @@ -3992,6 +3992,12 @@ END $url='/adm/wrapper'.$url; } elsif ($url=~m{^/adm/$coursedom/$coursenum/\d+/exttools?$}) { $url='/adm/wrapper'.$url; + } elsif ($url eq "/public/$coursedom/$coursenum/syllabus") { + if (($ENV{'SERVER_PORT'} == 443) && + ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://})) { + $url .= '?usehttp=1'; + $nomodal = 1; + } } if (&Apache::lonnet::symbverify($symb,$url)) { my $shownsymb = $symb; @@ -4049,12 +4055,18 @@ END $url=''; } } - } elsif ($supplementalflag) { + } elsif ($supplementalflag) { if ($isexternal) { if ($url =~ /^([^#]+)#([^#]+)$/) { $url = $1; $anchor = $2; } + } elsif ($url =~ m{^\Q/public/$coursedom/$coursenum/syllabus\E}) { + if (($ENV{'SERVER_PORT'} == 443) && + ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://})) { + $url .= (($url =~ /\?/) ? '&':'?').'usehttp=1'; + $nomodal = 1; + } } } my ($rand_pick_text,$rand_order_text,$hiddenfolder); @@ -4205,6 +4217,7 @@ $form_end; $reinit = &mt('(re-initialize course to access)'); } $line.='