Diff for /loncom/interface/lonprintout.pm between versions 1.597 and 1.598

version 1.597, 2011/09/15 12:09:44 version 1.598, 2011/09/15 16:02:18
Line 123  sub create_incomplete_folder_selstud_hel Line 123  sub create_incomplete_folder_selstud_hel
   
     my $format_chooser = &generate_format_selector($helper,      my $format_chooser = &generate_format_selector($helper,
  'Format of the print job',   'Format of the print job',
  '','CHOOSE_STUDENTS_INCOMPLETE_FORMAT'); # end state.   'CHOOSE_STUDENTS_INCOMPLETE_FORMAT'); # end state.
   
     return $resource_chooser . $student_chooser . $format_chooser;      return $resource_chooser . $student_chooser . $format_chooser;
 }    }  
Line 172  sub create_incomplete_course_helper { Line 172  sub create_incomplete_course_helper {
   
     my $format = &generate_format_selector($helper,      my $format = &generate_format_selector($helper,
    'Format of the print job',     'Format of the print job',
    '',  
    'INCOMPLETE_PROBLEMS_COURSE_FORMAT'); # end state.     'INCOMPLETE_PROBLEMS_COURSE_FORMAT'); # end state.
   
     return $resource_chooser . $people_chooser . $format;      return $resource_chooser . $people_chooser . $format;
Line 395  CHOOSE_ANON1 Line 394  CHOOSE_ANON1
    return $result;     return $result;
 }  }
   
   #  Returns the XML for choosing how assignments are to be formatted 
   #  that text must still be parsed by the helper xml parser.
   # Parameters: 3 (required)
   
   #   helper       - The helper; $helper->{'VARS'}->{'PRINT_TYPE'} used
   #                  to check if splitting PDFs by section can be offered.
   #   title        - Title for the current state. 
   #   this_state   - State name of the chooser.
   
 sub generate_format_selector {  sub generate_format_selector {
     my ($helper,$title,$nextstate, $thisstate) = @_;      my ($helper,$title,$this_state) = @_;
     my $secpdfoption;      my $secpdfoption;
     my $state = 'PRINT_FORMATTING';  
     if ($thisstate) {  
  $state = $thisstate;  
     }  
     unless (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_anon')     ||      unless (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_anon')     ||
             ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_anon_page') ||              ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_for_anon_page') ||
             ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'resources_for_anon')  ) {              ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'resources_for_anon')  ) {
         $secpdfoption =  '<choice computer="sections">Each PDF contains exactly one section</choice>';          $secpdfoption =  '<choice computer="sections">Each PDF contains exactly one section</choice>';
     }      }
     return <<RESOURCE_SELECTOR;      return <<RESOURCE_SELECTOR;
     <state name="$state" title="$title">      <state name="$this_state" title="$title">
     $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 3994  ALL_PROBLEMS Line 3997  ALL_PROBLEMS
   $isProblem, '', $symbFilter,    $isProblem, '', $symbFilter,
   $start_new_option);    $start_new_option);
  $resource_selector .=  &generate_format_selector($helper,   $resource_selector .=  &generate_format_selector($helper,
                                                          'How should results be printed?').                                                           'How should results be printed?',
                                                            'PRINT_FORMATTING').
                                &generate_resource_chooser('CHOOSE_STUDENTS_PAGE',                                 &generate_resource_chooser('CHOOSE_STUDENTS_PAGE',
  'Select Problem(s) to print',   'Select Problem(s) to print',
  "multichoice='1' addstatus='1' closeallpages ='1'",   "multichoice='1' addstatus='1' closeallpages ='1'",
Line 4128  ALL_PROBLEMS Line 4132  ALL_PROBLEMS
     </state>      </state>
 RESOURCE_SELECTOR  RESOURCE_SELECTOR
   
         my $nextstate = '<nextstate>NUMBER_PER_PDF</nextstate>';   
         $resource_selector .= &generate_format_selector($helper,          $resource_selector .= &generate_format_selector($helper,
                                                         'Format of the print job',                                                          'Format of the print job',
                                                         $nextstate);                                                          'PRINT_FORMATTING');
  &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">
     <choices variable='student_sort'>      <choices variable='student_sort'>

Removed from v.1.597  
changed lines
  Added in v.1.598


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>