--- loncom/interface/lonmenu.pm 2018/05/10 04:06:13 1.492 +++ loncom/interface/lonmenu.pm 2018/12/29 23:24:40 1.494 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.492 2018/05/10 04:06:13 raeburn Exp $ +# $Id: lonmenu.pm,v 1.494 2018/12/29 23:24:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -605,11 +605,13 @@ sub secondary_menu { } if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://}) { if (($ENV{'SERVER_PORT'} == 443) || ($env{'request.use_absolute'} =~ m{^https://})) { - unless ($$menuitem[0] =~ m{^https?://}) { - $$menuitem[0] = 'http://'.$ENV{'SERVER_NAME'}.$$menuitem[0]; - } - unless ($$menuitem[0] =~ /(\&|\?)usehttp=1/) { - $$menuitem[0] .= (($$menuitem[0]=~/\?/) ? '&' : '?').'usehttp=1'; + unless (&Apache::lonnet::uses_sts()) { + unless ($$menuitem[0] =~ m{^https?://}) { + $$menuitem[0] = 'http://'.$ENV{'SERVER_NAME'}.$$menuitem[0]; + } + unless ($$menuitem[0] =~ /(\&|\?)usehttp=1/) { + $$menuitem[0] .= (($$menuitem[0]=~/\?/) ? '&' : '?').'usehttp=1'; + } } } } @@ -2087,13 +2089,16 @@ END sub utilityfunctions { my ($httphost) = @_; my $currenturl=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0])); - if ($currenturl =~ m{^/adm/wrapper/ext/} - && $env{'request.external.querystring'} ) { + my $currentsymb=&Apache::lonenc::check_encrypt($env{'request.symb'}); + if ($currenturl =~ m{^/adm/wrapper/ext/}) { + if ($env{'request.external.querystring'}) { $currenturl .= ($currenturl=~/\?/)?'&':'?'.$env{'request.external.querystring'}; + } + if ($currentsymb =~ /(\#[^\#]+)$/) { + $currenturl .= $1; + } } $currenturl=&Apache::lonenc::check_encrypt(&unescape($currenturl)); - - my $currentsymb=&Apache::lonenc::check_encrypt($env{'request.symb'}); my $dc_popup_cid; if ($env{'user.adv'} && exists($env{'user.role.dc./'. @@ -2125,6 +2130,10 @@ sub utilityfunctions { $ltitarget = $env{'request.lti.target'}; } + my $annotateurl = '/adm/annotation'; + if ($httphost) { + $annotateurl = '/adm/annotations'; + } my $hostvar = ' function setLCHost() { var lcHostname=""; @@ -2258,7 +2267,7 @@ function annotate() { annotator.document.write( '$start_page_annotate' +"
" + +"action='$annotateurl'>" +"" +"<\\/form>" +'$end_page_annotate');