--- loncom/interface/lonprintout.pm 2017/01/29 23:34:58 1.654 +++ loncom/interface/lonprintout.pm 2017/11/12 23:06:10 1.659 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.654 2017/01/29 23:34:58 raeburn Exp $ +# $Id: lonprintout.pm,v 1.659 2017/11/12 23:06:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -889,7 +889,7 @@ sub include_pdf { my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; $file =~ s{(.*)/res/}{$londocroot/res/}; - open(FILE,">>$Apache::lonnet::perlvar{'lonPrtDir'}/$env{'user.name'}_$env{'user.domain'}_printout.dat"); + open(FILE,">>","$Apache::lonnet::perlvar{'lonPrtDir'}/$env{'user.name'}_$env{'user.domain'}_printout.dat"); print FILE ("$file\n"); close (FILE); @@ -3452,7 +3452,9 @@ ENDPART if ($env{'request.enc'}) { $url = &Apache::lonenc::encrypted($url); } - $URLback = $url.($url =~ /\?/) ? '&':'?'.'?symb='.$helper->{VARS}{'symb'}; + if ($url ne '') { + $URLback = $url.(($url =~ /\?/) ? '&':'?').'symb='.$helper->{VARS}{'symb'}; + } } # # Final adjustment of the font size: @@ -3536,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,