[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Tue, 30 Sep 2003 17:29:26 -0000
bowersj2 Tue Sep 30 13:29:26 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Should fix the printout.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.243 loncom/interface/lonprintout.pm:1.244
--- loncom/interface/lonprintout.pm:1.243 Tue Sep 30 10:43:26 2003
+++ loncom/interface/lonprintout.pm Tue Sep 30 13:29:26 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.243 2003/09/30 14:43:26 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.244 2003/09/30 17:29:26 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1326,6 +1326,10 @@
if (!$helper->{VARS}->{'construction'}) {
push @$printChoices, ["Resources from <b>selected sequence</b> in course",
'map_problems_pages', 'CHOOSE_SEQUENCE'];
+ my $escapedSequenceName = $helper->{VARS}->{'SEQUENCE'};
+ #Escape apostrophes and backslashes for Perl
+ $escapedSequenceName =~ s/\\/\\\\/g;
+ $escapedSequenceName =~ s/'/\\'/g;
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_FROM_ANY_SEQUENCE);
<state name="CHOOSE_SEQUENCE" title="Select Sequence To Print From">
<message>Select the sequence to print resources from:</message>
@@ -1340,7 +1344,7 @@
<resource variable="RESOURCES" multichoice="1" toponly='1' addstatus="1">
<nextstate>PAGESIZE</nextstate>
<filterfunc>return $isProblem</filterfunc>
- <mapurl evaluate='1'>return $helper->{VARS}->{'SEQUENCE'};</mapurl>
+ <mapurl evaluate='1'>return '$escapedSequenceName';</mapurl>
<valuefunc>return $symbFilter;</valuefunc>
</resource>
</state>