--- loncom/interface/lonsupportreq.pm 2017/10/13 19:59:11 1.92 +++ loncom/interface/lonsupportreq.pm 2019/06/16 05:49:43 1.95 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Helpdesk request form # -# $Id: lonsupportreq.pm,v 1.92 2017/10/13 19:59:11 raeburn Exp $ +# $Id: lonsupportreq.pm,v 1.95 2019/06/16 05:49:43 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -67,7 +67,9 @@ sub handler { } } my $origurl = $env{'form.origurl'}; - $origurl =~ s{^https?://}{}; + if ($origurl =~ m{^https?://[^/]+(.*)$}) { + $origurl =~ $1; + } $origurl =~ s/(`)//g; $origurl =~ s/\$/\(\$\)/g; my $command = $env{'form.command'}; @@ -393,7 +395,7 @@ ENDJS } } } - unless ($helpform{'user'} eq 'no') { + unless (($helpform{'user'} eq 'no') || ($env{'request.lti.login'})) { $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'unme'}/$html_lt{'doma'}",undef,$css[$i]); my $udom_input = '&').'" />'."\n"; @@ -430,12 +432,14 @@ ENDJS } $output .= &Apache::lonhtmlcommon::row_closure(); $num ++; + $i = $num%2; + } + unless ($env{'request.lti.login'}) { + $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'urlp'}",undef,$css[$i]). + $server."\n".'&').'" />'."\n". + &Apache::lonhtmlcommon::row_closure(); } - $i = $num%2; - $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'urlp'}",undef,$css[$i]). - $server."\n".'&').'" />'."\n". - &Apache::lonhtmlcommon::row_closure(); unless ($helpform{'phone'} eq 'no') { my $reqd; if ($helpform{'phone'} eq 'req') { @@ -447,7 +451,7 @@ ENDJS $num ++; $i = $num%2; } - unless ($helpform{'course'} eq 'no') { + unless (($helpform{'course'} eq 'no') || ($env{'request.lti.login'})) { $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'crsd'}$details_title",undef,$css[$i]); if ($totcodes > 0) { my $numtitles = @codetitles; @@ -522,7 +526,7 @@ ENDJS $num ++; $i = $num%2; } - unless ($helpform{'section'} eq 'no') { + unless (($helpform{'section'} eq 'no') || ($env{'request.lti.login'})) { $output .= &Apache::lonhtmlcommon::row_title($html_lt{'secn'},undef,$css[$i]); if ($sectionlist) { $output .= "