version 1.423, 2006/02/24 22:37:45
|
version 1.424, 2006/03/01 11:20:37
|
Line 2169 ALL_PROBLEMS
|
Line 2169 ALL_PROBLEMS
|
push @{$printChoices}, ["<b>".&mt('Problems')."</b> ".&mt('from')." <b><i>$sequenceTitle</i></b> ".&mt('for')." <b>".&mt('selected students')."</b>", 'problems_for_students', 'CHOOSE_STUDENTS']; |
push @{$printChoices}, ["<b>".&mt('Problems')."</b> ".&mt('from')." <b><i>$sequenceTitle</i></b> ".&mt('for')." <b>".&mt('selected students')."</b>", 'problems_for_students', 'CHOOSE_STUDENTS']; |
push @{$printChoices}, ["<b>".&mt('Problems')."</b> ".&mt('from')." <b><i>$sequenceTitle</i></b> ".&mt('for')." <b>".&mt('anonymous students')."</b>", 'problems_for_anon', 'CHOOSE_ANON1']; |
push @{$printChoices}, ["<b>".&mt('Problems')."</b> ".&mt('from')." <b><i>$sequenceTitle</i></b> ".&mt('for')." <b>".&mt('anonymous students')."</b>", 'problems_for_anon', 'CHOOSE_ANON1']; |
} |
} |
|
|
|
# resource_selector will hold a few states that: |
|
# - Allow resources to be selected for printing. |
|
# - Determine pagination between assignments. |
|
# - Determine how many assignments should be bundled into a single PDF. |
|
# TODO: |
|
# Probably good to do things like separate this up into several vars, each |
|
# with one state, and use REGEXPs at inclusion time to set state names |
|
# and next states for better mix and match capability |
|
# |
my $resource_selector=<<RESOURCE_SELECTOR; |
my $resource_selector=<<RESOURCE_SELECTOR; |
|
<state name="SELECT_PROBLEMS" title="Select resources to print"> |
|
<nextstate>PRINT_FORMATTING</nextstate> |
<message><br /><big><i><b>Select resources for the assignment</b></i></big><br /></message> |
<message><br /><big><i><b>Select resources for the assignment</b></i></big><br /></message> |
<resource variable="RESOURCES" multichoice="1" addstatus="1" |
<resource variable="RESOURCES" multichoice="1" addstatus="1" |
closeallpages="1"> |
closeallpages="1"> |
Line 2178 ALL_PROBLEMS
|
Line 2190 ALL_PROBLEMS
|
<valuefunc>return $symbFilter;</valuefunc> |
<valuefunc>return $symbFilter;</valuefunc> |
<option text='New Page' variable='FINISHPAGE' /> |
<option text='New Page' variable='FINISHPAGE' /> |
</resource> |
</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> |
<message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message> |
<choices variable="EMPTY_PAGES"> |
<choices variable="EMPTY_PAGES"> |
<choice computer='0'>Start each student\'s assignment on a new page/column (add a pagefeed after each assignment)</choice> |
<choice computer='0'>Start each student\'s assignment on a new page/column (add a pagefeed after each assignment)</choice> |
Line 2185 ALL_PROBLEMS
|
Line 2200 ALL_PROBLEMS
|
<choice computer='2'>Add two empty pages/column after each student\'s assignment</choice> |
<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> |
<choice computer='3'>Add three empty pages/column after each student\'s assignment</choice> |
</choices> |
</choices> |
|
</state> |
|
<state name="NUMBER_PER_PDF" title="Number printed at once"> |
|
<nextstate>PAGESIZE</nextstate> |
<message><hr width='33%' /><b>Number of assignments printed at the same time: </b></message> |
<message><hr width='33%' /><b>Number of assignments printed at the same time: </b></message> |
<string variable="NUMBER_TO_PRINT" maxlength="5" size="5"><defaultvalue>"all"</defaultvalue></string> |
<string variable="NUMBER_TO_PRINT" maxlength="5" size="5"><defaultvalue>"all"</defaultvalue></string> |
|
</state> |
RESOURCE_SELECTOR |
RESOURCE_SELECTOR |
|
|
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS); |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS); |
<state name="CHOOSE_STUDENTS" title="Select Students and Resources"> |
<state name="CHOOSE_STUDENTS" title="Select Students and Resources"> |
<student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" coursepersonnel="1"/> |
<student multichoice='1' variable="STUDENTS" nextstate="SELECT_PROBLEMS" coursepersonnel="1"/> |
<message><b>Select sort order</b> </message> |
<message><b>Select sort order</b> </message> |
<choices variable='student_sort'> |
<choices variable='student_sort'> |
<choice computer='0'>Sort by section then student</choice> |
<choice computer='0'>Sort by section then student</choice> |
<choice computer='1'>Sort by students across sections.</choice> |
<choice computer='1'>Sort by students across sections.</choice> |
</choices> |
</choices> |
$resource_selector |
|
</state> |
</state> |
|
$resource_selector |
CHOOSE_STUDENTS |
CHOOSE_STUDENTS |
|
|
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
Line 2244 CHOOSE_STUDENTS
|
Line 2263 CHOOSE_STUDENTS
|
} |
} |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON1); |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON1); |
<state name="CHOOSE_ANON1" title="Select Students and Resources"> |
<state name="CHOOSE_ANON1" title="Select Students and Resources"> |
<nextstate>PAGESIZE</nextstate> |
<nextstate>SELECT_PROBLEMS</nextstate> |
<message><table><tr><td><b>Number of anonymous assignments to print:</b></td><td></message> |
<message><table><tr><td><b>Number of anonymous assignments to print:</b></td><td></message> |
<string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5"> |
<string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5"> |
<validator> |
<validator> |
Line 2290 CHOOSE_STUDENTS
|
Line 2309 CHOOSE_STUDENTS
|
</dropdown> |
</dropdown> |
<message></td></tr></table></message> |
<message></td></tr></table></message> |
<message><hr width='33%' /></message> |
<message><hr width='33%' /></message> |
$resource_selector |
|
</state> |
</state> |
|
$resource_selector |
CHOOSE_ANON1 |
CHOOSE_ANON1 |
|
|
|
|
Line 2302 CHOOSE_ANON1
|
Line 2321 CHOOSE_ANON1
|
|
|
|
|
$resource_selector=<<RESOURCE_SELECTOR; |
$resource_selector=<<RESOURCE_SELECTOR; |
|
<state name="SELECT_RESOURCES" title="Select Resources"> |
|
<nextstate>PRINT_FORMATTING</nextstate> |
<message><br /><big><i><b>Select resources for the assignment</b></i></big><br /></message> |
<message><br /><big><i><b>Select resources for the assignment</b></i></big><br /></message> |
<resource variable="RESOURCES" multichoice="1" addstatus="1" |
<resource variable="RESOURCES" multichoice="1" addstatus="1" |
closeallpages="1"> |
closeallpages="1"> |
Line 2310 CHOOSE_ANON1
|
Line 2331 CHOOSE_ANON1
|
<valuefunc>return $symbFilter;</valuefunc> |
<valuefunc>return $symbFilter;</valuefunc> |
<option text='Newpage' variable='FINISHPAGE' /> |
<option text='Newpage' variable='FINISHPAGE' /> |
</resource> |
</resource> |
|
</state> |
|
<state name="PRINT_FORMATTING" title="Format of the print job"> |
|
<nextstate>NUMBER_PER_PDF</nextstate> |
<message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message> |
<message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message> |
<choices variable="EMPTY_PAGES"> |
<choices variable="EMPTY_PAGES"> |
<choice computer='0'>Start each student\'s assignment on a new page/column (add a pagefeed after each assignment)</choice> |
<choice computer='0'>Start each student\'s assignment on a new page/column (add a pagefeed after each assignment)</choice> |
Line 2317 CHOOSE_ANON1
|
Line 2341 CHOOSE_ANON1
|
<choice computer='2'>Add two empty pages/column after each student\'s assignment</choice> |
<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> |
<choice computer='3'>Add three empty pages/column after each student\'s assignment</choice> |
</choices> |
</choices> |
|
</state> |
|
<state name="NUMBER_PER_PDF title="Number assingnments per pdf"> |
|
<nextstate>PAGESIZE</nextstate> |
<message><hr width='33%' /><b>Number of assignments printed at the same time: </b></message> |
<message><hr width='33%' /><b>Number of assignments printed at the same time: </b></message> |
<string variable="NUMBER_TO_PRINT" maxlength="5" size="5"><defaultvalue>"all"</defaultvalue></string> |
<string variable="NUMBER_TO_PRINT" maxlength="5" size="5"><defaultvalue>"all"</defaultvalue></string> |
|
</state> |
RESOURCE_SELECTOR |
RESOURCE_SELECTOR |
|
|
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS1); |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS1); |
<state name="CHOOSE_STUDENTS1" title="Select Students and Resources"> |
<state name="CHOOSE_STUDENTS1" title="Select Students and Resources"> |
<student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" coursepersonnel="1" /> |
<student multichoice='1' variable="STUDENTS" nextstate="SELECT_RESOURCES" coursepersonnel="1" /> |
<choices variable='student_sort'> |
<choices variable='student_sort'> |
<choice computer='0'>Sort by section then student</choice> |
<choice computer='0'>Sort by section then student</choice> |
<choice computer='1'>Sort by students across sections.</choice> |
<choice computer='1'>Sort by students across sections.</choice> |
</choices> |
</choices> |
|
|
$resource_selector |
|
</state> |
</state> |
|
$resource_selector |
CHOOSE_STUDENTS1 |
CHOOSE_STUDENTS1 |
|
|
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON2); |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON2); |
<state name="CHOOSE_ANON2" title="Select Students and Resources"> |
<state name="CHOOSE_ANON2" title="Select Students and Resources"> |
<nextstate>PAGESIZE</nextstate> |
<nextstate>SELECT_RESOURCES</nextstate> |
<message><table><tr><td><b>Number of anonymous assignments to print:</b></td><td></message> |
<message><table><tr><td><b>Number of anonymous assignments to print:</b></td><td></message> |
<string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5"> |
<string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5"> |
<validator> |
<validator> |
Line 2381 CHOOSE_STUDENTS1
|
Line 2409 CHOOSE_STUDENTS1
|
</dropdown> |
</dropdown> |
<message></td></tr></table></message> |
<message></td></tr></table></message> |
<message><hr width='33%' /></message> |
<message><hr width='33%' /></message> |
$resource_selector |
|
</state> |
</state> |
|
$resource_selector |
CHOOSE_ANON2 |
CHOOSE_ANON2 |
} |
} |
|
|