--- loncom/interface/lonprintout.pm 2003/09/25 18:19:34 1.239 +++ loncom/interface/lonprintout.pm 2003/09/29 13:42:02 1.241 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.239 2003/09/25 18:19:34 bowersj2 Exp $ +# $Id: lonprintout.pm,v 1.241 2003/09/29 13:42:02 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -655,9 +655,7 @@ ENDPART $currentURL=$helper->{'VARS'}->{'postdata'}; } else { #prints resource from the construction space - $currentURL=$helper->{'VARS'}->{'filename'}; - $currentURL=~s/\/home\//\/~/; - $currentURL=~s/public_html\///; + $currentURL='/'.$helper->{'VARS'}->{'filename'}; if ($currentURL=~/([^?]+)/) {$currentURL=$1;} } $selectionmade = 1; @@ -1047,9 +1045,9 @@ sub printHelper { if ($r->header_only) { if ($ENV{'browser.mathml'}) { - $r->content_type('text/xml'); + &Apache::loncommon::content_type($r,'text/xml'); } else { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); } $r->send_http_header; return OK; @@ -1057,9 +1055,9 @@ sub printHelper { # Send header, nocache if ($ENV{'browser.mathml'}) { - $r->content_type('text/xml'); + &Apache::loncommon::content_type($r,'text/xml'); } else { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); } &Apache::loncommon::no_cache($r); $r->send_http_header; @@ -1162,7 +1160,7 @@ sub printHelper { my $printChoices = []; my $paramHash; - if ($resourceTitle && $helper->{VARS}->{'postdata'}) { + if ($resourceTitle) { push @{$printChoices}, ["$resourceTitle (what you just saw on the screen)", 'current_document', 'PAGESIZE']; }