[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 11 Dec 2002 22:04:44 -0000
albertel Wed Dec 11 17:04:44 2002 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
- was unable to print selected resources from a sequence
- BUG#1059
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.97 loncom/interface/lonprintout.pm:1.98
--- loncom/interface/lonprintout.pm:1.97 Wed Dec 11 16:33:16 2002
+++ loncom/interface/lonprintout.pm Wed Dec 11 17:04:44 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.97 2002/12/11 21:33:16 albertel 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 @@
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('<br /><input type=checkbox name="whatfile'.$inc.'" value="'.$master_seq[$i].'"> '.
+ $r->print('<br /><input type=checkbox name="whatfile'.$inc.'" value="'.$master_seq[$i].'"> '."\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)$/) {
@@ -498,7 +498,7 @@
$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/) {
@@ -725,7 +725,13 @@
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) {