--- loncom/interface/lonprintout.pm 2016/12/06 03:28:29 1.651 +++ loncom/interface/lonprintout.pm 2017/05/29 22:43:07 1.658 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.651 2016/12/06 03:28:29 raeburn Exp $ +# $Id: lonprintout.pm,v 1.658 2017/05/29 22:43:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2962,10 +2962,10 @@ ENDPART if ($flag_latex_header_remove eq 'NO') { $texversion.=&print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'}); # RF unless (($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'only') || - (($i==0) && ($extension !~ /^x?html?$/) && + (($i==0) && (($urlp=~/\.page$/) || ($print_type eq 'map_problems_in_page') || - ($print_type eq 'map_resources_in_page')))) { + (($print_type eq 'map_resources_in_page') && ($extension !~ /^x?html?$/))))) { $flag_latex_header_remove = 'YES'; } } @@ -3448,7 +3448,13 @@ ENDPART $URLback=$helper->{'VARS'}->{'filename'}; } elsif ($helper->{VARS}{'symb'}) { my ($map, $id, $url) = &Apache::lonnet::decode_symb($helper->{VARS}{'symb'}); - $URLback = &Apache::lonnet::clutter($url); + $url = &Apache::lonnet::clutter($url); + if ($env{'request.enc'}) { + $url = &Apache::lonenc::encrypted($url); + } + if ($url ne '') { + $URLback = $url.(($url =~ /\?/) ? '&':'?').'symb='.$helper->{VARS}{'symb'}; + } } # # Final adjustment of the font size: @@ -3532,7 +3538,7 @@ ENDPART 'cgi.'.$identifier.'.role' => $perm{'pav'}, 'cgi.'.$identifier.'.numberoffiles' => $#print_array, 'cgi.'.$identifier.'.studentnames' => $student_names, - 'cgi.'.$identifier.'.backref' => $URLback,}); + 'cgi.'.$identifier.'.backref' => &escape($URLback),}); &Apache::lonnet::appenv({"cgi.$identifier.user" => $env{'user.name'}, "cgi.$identifier.domain" => $env{'user.domain'}, "cgi.$identifier.courseid" => $cnum,