--- loncom/interface/lonprintout.pm 2002/12/03 22:05:08 1.94
+++ loncom/interface/lonprintout.pm 2002/12/11 22:04:44 1.98
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.94 2002/12/03 22:05:08 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.98 2002/12/11 22:04:44 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -193,7 +193,7 @@ ENDMENUOUT1
my $inc=0;
for (my $i=0;$i<=$#master_seq_view;$i++) {
if ($key_to==1 && $master_seq_view[$i]=~/\.(problem|exam|quiz|assess|survey|form|library)$/) {
- $r->print('
'.
+ $r->print('
'."\n".
$master_seq_view[$i]);
$inc++;
} elsif ($key_to==0 && $master_seq_view[$i]=~/\.(problem|exam|quiz|assess|survey|form|library|xml|htm|html|page)$/) {
@@ -465,8 +465,14 @@ ENDPART
if ($ENV{'form.url'}=~m/\.page\s*$/) {
($result,$number_of_columns) = &page_cleanup($result);
}
- } else{
- $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}You are trying to print eather sequence or something simular. Currently this option is not supported. Sorry for the inconvenience. Bye. Your current URL is '.$ENV{'form.url'}.' \end{document}'
+ } else {
+ $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';
+ if ($ENV{'form.url'}=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) {
+ $result.=$1;
+ } else {
+ $result.=$ENV{'form.url'};
+ }
+ $result.=' \end{document}'
}
} elsif ($choice eq 'Standard LaTeX output for the primary sequence' or
$choice eq 'Standard LaTeX output for whole primary sequence') {
@@ -492,7 +498,7 @@ ENDPART
$moreenv{'form.grade_target'}='tex';
$moreenv{'form.textwidth'}=$LaTeXwidth;
&Apache::lonnet::appenv(%moreenv);
- &Apache::lonnet::logthis("Trying to get $urlp with symb $symb");
+ #&Apache::lonnet::logthis("Trying to get $urlp with symb $symb");
my $texversion=&Apache::lonnet::ssi($urlp,('symb'=>$symb));
&Apache::lonnet::delenv('form.grade_target','form.textwidth');
if ($urlp =~ m/\.page/) {
@@ -719,7 +725,13 @@ sub coming_from_hash {
my $mapid = $hash{'map_pc_'.$mainsequence};
my $mapstart = $hash{'map_start_'.$mainsequence};
my $mapfinish = $hash{'map_finish_'.$mainsequence};
- my ($presymb) = split(/___/,$symb);
+ my ($presymb);
+ if ($symb) {
+ ($presymb)=split(/___/,$symb);
+ } else {
+ $presymb=$mainsequence;
+ $presymb=~s|^/res/||;
+ }
$presymb = $presymb.'___';
my $current_resource = $mapstart;
while ($current_resource ne $mapfinish) {