--- loncom/interface/lonprintout.pm 2009/10/06 11:02:12 1.560.2.4 +++ loncom/interface/lonprintout.pm 2009/10/12 10:59:48 1.560.2.5 @@ -1,17 +1,10 @@ # -# Issues: -# - Need to get the state flow for selected problems/resources for students -# correct -# - Need to do the CODEd stuff. -# - Need to regularize and figure out for each case who puts on the latex -# front matter and make sure it gets done. -# -# + # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.560.2.4 2009/10/06 11:02:12 foxr Exp $ +# $Id: lonprintout.pm,v 1.560.2.5 2009/10/12 10:59:48 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -99,7 +92,7 @@ sub generate_student_chooser { $sort_choice, $variable, $next_state) = @_; - + &Apache::lonnet::logthis("Student chooser next state: $next_state, this state: $this_state"); my $result = < Select sorting order of printout @@ -155,7 +148,7 @@ sub generate_resource_chooser { $value_func, $start_new_option) = @_; - + &Apache::lonnet::logthis("Top URL = $top_url"); my $result = < {'VARS'}->{'PRINT_TYPE'} eq 'problems_for_students') || + ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_students_from_page') || ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems_students') || ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'resources_for_students')){ @@ -2289,6 +2283,7 @@ ENDPART #-- prints assignments for whole class or for selected students my $type; if (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_students') || + ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_students_from_page') || ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'all_problems_students') ) { $selectionmade=5; $type='problems'; @@ -3281,10 +3276,10 @@ ALL_PROBLEMS if ($page_ispage) { push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from page [_3] for [_4]selected people[_5]', '', '', ''.$page_title.'', '', ''), - 'problems_for_students', 'CHOOSE_STUDENTS']; + 'problems_for_students_from_page', 'CHOOSE_TGT_STUDENTS_PAGE']; push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from page [_3] for [_4]CODEd assignments[_5]', '', '', ''.$page_title.'', '', ''), - 'problems_for_anon', 'CHOOSE_ANON1']; + 'problems_for_anon', 'CHOOSE_ANON1_PAGE']; } push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from folder [_3] for [_4]selected people[_5]', '','',''.$sequenceTitle.'','',''), @@ -3334,12 +3329,25 @@ ALL_PROBLEMS RESOURCE_SELECTOR + $resource_selector .= &generate_resource_chooser('CHOOSE_STUDENTS_PAGE', + 'Select Problem(s) to print', + "multichoice='1' addstatus='1' closeallpages ='1'", + 'RESOURCES', + 'PRINT_FORMATTING', + $url, + $isProblem, '', $symbFilter, + $start_new_option); -# Generate student choosers. +# Generate student choosers. + &Apache::lonxml::xmlparse($r, 'helper', + &generate_student_chooser('CHOOSE_TGT_STUDENTS_PAGE', + 'student_sort', + 'STUDENTS', + 'CHOOSE_STUDENTS_PAGE')); &Apache::lonxml::xmlparse($r, 'helper', &generate_student_chooser('CHOOSE_STUDENTS', 'student_sort',