[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
foxr
lon-capa-cvs@mail.lon-capa.org
Thu, 06 Apr 2006 22:32:14 -0000
foxr Thu Apr 6 18:32:14 2006 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Not 100% sure this is the best way to do this, but used the
relatedvalue/relateddefault I added to lonhelper.pm to put
the entry for the number of students/pdf on the same line as
the choice that makes you enter that. The alternative is probably
a custom helper element which is less re-usable.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.434 loncom/interface/lonprintout.pm:1.435
--- loncom/interface/lonprintout.pm:1.434 Wed Mar 29 06:47:03 2006
+++ loncom/interface/lonprintout.pm Thu Apr 6 18:32:07 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.434 2006/03/29 11:47:03 foxr Exp $
+# $Id: lonprintout.pm,v 1.435 2006/04/06 22:32:07 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2150,11 +2150,10 @@
my $helperFragment = <<HELPERFRAGMENT;
<state name="CHOOSE_PROBLEMS" title="Select Problem(s) to print">
<message>(mark them then click "next" button) <br /></message>
- <resource variable="RESOURCES" multichoice="1" toponly='0' addstatus="1"
+ <resource variable="RESOURCES" multichoice="1" toponly='1' addstatus="1"
closeallpages="1">
<nextstate>PAGESIZE</nextstate>
- <filterfunc>return $isProblemOrMap;</filterfunc>
- <choicefunc>return $isNotMap;</choicefunc>
+ <filterfunc>return $isProblem;</filterfunc>
<mapurl>$map</mapurl>
<valuefunc>return $symbFilter;</valuefunc>
<option text='Newpage' variable='FINISHPAGE' />
@@ -2163,10 +2162,10 @@
<state name="CHOOSE_PROBLEMS_HTML" title="Select Resource(s) to print">
<message>(mark them then click "next" button) <br /></message>
- <resource variable="RESOURCES" multichoice="1" toponly='0' addstatus="1"
+ <resource variable="RESOURCES" multichoice="1" toponly='1' addstatus="1"
closeallpages="1">
<nextstate>PAGESIZE</nextstate>
- <choicefunc>return $isNotMap;</choicefunc>
+ <filterfunc>return $isNotMap;</filterfunc>
<mapurl>$map</mapurl>
<valuefunc>return $symbFilter;</valuefunc>
<option text='Newpage' variable='FINISHPAGE' />
@@ -2235,7 +2234,6 @@
</resource>
</state>
<state name="PRINT_FORMATTING" title="How should results be printed?">
- <nextstate>NUMBER_PER_PDF</nextstate>
<message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message>
<choices variable="EMPTY_PAGES">
<choice computer='0'>Start each student\'s assignment on a new page/column (add a pagefeed after each assignment)</choice>
@@ -2243,17 +2241,15 @@
<choice computer='2'>Add two empty pages/column after each student\'s assignment</choice>
<choice computer='3'>Add three empty pages/column after each student\'s assignment</choice>
</choices>
- </state>
- <state name="NUMBER_PER_PDF" title="Number printed at once">
<nextstate>PAGESIZE</nextstate>
<message><hr width='33%' /><b>How do you want assignments split into PDF files? </b></message>
<choices variable="SPLIT_PDFS">
<choice computer="all">All assignments in a single PDF file</choice>
<choice computer="sections">Each PDF contains exactly one section</choice>
<choice computer="oneper">Each PDF contains exactly one assignment</choice>
- <choice computer="usenumber">Specify Number:</choice>
+ <choice computer="usenumber" relatedvalue="NUMBER_TO_PRINT" relateddefault="all">
+ Specify Number:</choice>
</choices>
- <string variable="NUMBER_TO_PRINT" maxlength="5" size="5"><defaultvalue>"all"</defaultvalue></string>
</state>
RESOURCE_SELECTOR
@@ -2404,17 +2400,15 @@
<choice computer='2'>Add two empty pages/column after each student\'s assignment</choice>
<choice computer='3'>Add three empty pages/column after each student\'s assignment</choice>
</choices>
- </state>
- <state name="NUMBER_PER_PDF" title="Number assignments per pdf">
<nextstate>PAGESIZE</nextstate>
<message><hr width='33%' /><b>How do you want assignments split into PDF files? </b></message>
<choices variable="SPLIT_PDFS">
<choice computer="all">All assignments in a single PDF file</choice>
<choice computer="sections">Each PDF contains exactly one section</choice>
<choice computer="oneper">Each PDF contains exactly one assignment</choice>
- <choice computer="usenumber">Specify Number:</choice>
+ <choice computer="usenumber" relatedvalue="NUMBER_TO_PRINT" relateddefault="all">
+ Specify Number:</choice>
</choices>
- <string variable="NUMBER_TO_PRINT" maxlength="5" size="5"><defaultvalue>"all"</defaultvalue></string>
</state>
RESOURCE_SELECTOR
@@ -2536,11 +2530,10 @@
</state>
<state name="CHOOSE_FROM_ANY_SEQUENCE" title="Select Resources To Print">
<message>(mark desired resources then click "next" button) <br /></message>
- <resource variable="RESOURCES" multichoice="1" toponly='0' addstatus="1"
+ <resource variable="RESOURCES" multichoice="1" toponly='1' addstatus="1"
closeallpages="1">
<nextstate>PAGESIZE</nextstate>
- <filterfunc>return $isProblemOrMap;</filterfunc>
- <choicefunc>return $isProblem;</choicefunc>
+ <filterfunc>return $isProblem</filterfunc>
<mapurl evaluate='1'>return '$escapedSequenceName';</mapurl>
<valuefunc>return $symbFilter;</valuefunc>
<option text='Newpage' variable='FINISHPAGE' />