--- loncom/interface/lonprintout.pm 2004/02/09 20:41:36 1.275 +++ loncom/interface/lonprintout.pm 2004/02/13 21:13:21 1.276 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.275 2004/02/09 20:41:36 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.276 2004/02/13 21:13:21 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1186,6 +1186,15 @@ ENDPART } } + my $URLback=''; #link to original document + if ($helper->{'VARS'}->{'construction'} ne '1') { + #prints published resource + $URLback=$helper->{'VARS'}->{'postdata'}; + } else { + #prints resource from the construction space + $URLback='/'.$helper->{'VARS'}->{'filename'}; + if ($URLback=~/([^?]+)/) {$URLback=$1;} + } my $identifier = time.'_'.int(rand(1000)); &Apache::lonnet::appenv('cgi.'.$identifier.'.file' => $filename, @@ -1196,9 +1205,9 @@ ENDPART 'cgi.'.$identifier.'tableofindex' => $helper->{'VARS'}->{'TABLE_INDEX'}, 'cgi.'.$identifier.'role' => $ENV{'request.role.adv'}, 'cgi.'.$identifier.'numberoffiles' => $#print_array, - 'cgi.'.$identifier.'studentnames' => $student_names,); + 'cgi.'.$identifier.'studentnames' => $student_names, + 'cgi.'.$identifier.'backref' => $URLback,); - $r->print(<