[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 14 Jul 2008 10:40:57 -0000
foxr Mon Jul 14 06:40:57 2008 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
BZ4320 - Add ability to print selected problems from the >entire< course
for selected students.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.535 loncom/interface/lonprintout.pm:1.536
--- loncom/interface/lonprintout.pm:1.535 Wed Jun 18 20:28:42 2008
+++ loncom/interface/lonprintout.pm Mon Jul 14 06:40:57 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.535 2008/06/19 00:28:42 raeburn Exp $
+# $Id: lonprintout.pm,v 1.536 2008/07/14 10:40:57 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -504,8 +504,9 @@
# Unmodified.
} else {
# Error!!!!
-
+
croak "bad SPLIT_PDFS: $split_pdf in lonprintout::adjust_number_to_print";
+
}
}
@@ -1664,7 +1665,8 @@
($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') or
($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems') or
($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_resources') or # BUGBUG
- ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'select_sequences')) {
+ ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'select_sequences')
+ ) {
#-- produce an output string
@@ -1672,7 +1674,8 @@
$selectionmade = 2;
} elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') {
$selectionmade = 3;
- } elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems') {
+ } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems')
+ ) {
$selectionmade = 4;
} elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_resources') { #BUGBUG
$selectionmade = 4;
@@ -1827,12 +1830,14 @@
}
$result .= '\end{document}';
} elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_students') ||
+ ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems_students') ||
($helper->{'VARS'}->{'PRINT_TYPE'} eq 'resources_for_students')){
#-- prints assignments for whole class or for selected students
my $type;
- if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_students') {
+ if (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_students') ||
+ ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems_students') ) {
$selectionmade=5;
$type='problems';
} elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'resources_for_students') {
@@ -2699,6 +2704,7 @@
push @{$printChoices}, [&mtn('Selected <b>Problems</b> from <b>entire course</b>'), 'all_problems', 'ALL_PROBLEMS'];
push @{$printChoices}, [&mtn('Selected <b>Resources</b> from <b>entire course</b>'), 'all_resources', 'ALL_RESOURCES'];
+ push @{$printChoices}, [&mtn('Selected <b>Problems</b> from <b>entire course</b> for <b>selected people</b>'), 'all_problems_students', 'ALL_PROBLEMS_STUDENTS'];
&Apache::lonxml::xmlparse($r, 'helper', <<ALL_PROBLEMS);
<state name="ALL_PROBLEMS" title="Select Problem(s) to print">
<resource variable="RESOURCES" toponly='0' multichoice="1"
@@ -2719,6 +2725,26 @@
$start_new_option
</resource>
</state>
+ <state name="ALL_PROBLEMS_STUDENTS" title="Select Problem(s) to print">
+ <resource variable="RESOURCES" toponly='0' multichoice="1"
+ suppressEmptySequences='0' addstatus="1" closeallpages="1">
+ <nextstate>STUDENTS1</nextstate>
+ <filterfunc>return $isProblemOrMap;</filterfunc>
+ <choicefunc>return $isNotMap;</choicefunc>
+ <valuefunc>return $symbFilter;</valuefunc>
+ $start_new_option
+ </resource>
+ </state>
+ <state name="STUDENTS1" title="Select People">
+ <message><b>Select sorting order of printout</b> </message>
+ <choices variable='student_sort'>
+ <choice computer='0'>Sort by section then student</choice>
+ <choice computer='1'>Sort by students across sections.</choice>
+ </choices>
+ <message><br /><hr /><br /> </message>
+ <student multichoice='1' variable="STUDENTS" nextstate="PRINT_FORMATTING" coursepersonnel="1"/>
+ </state>
+
ALL_PROBLEMS
if ($helper->{VARS}->{'assignment'}) {