Diff for /loncom/interface/lonprintout.pm between versions 1.362 and 1.363

version 1.362, 2005/02/17 23:19:44 version 1.363, 2005/02/22 11:43:05
Line 781  sub unsupported { Line 781  sub unsupported {
 }  }
   
   
   #
   #   Retrieve the hash of page breaks.
   #
   #  Inputs:
   #    helper   - reference to helper object.
   #  Outputs
   #    A reference to a page break hash.
   #
   #
   
   sub get_page_breaks  {
       my ($helper) = @_;
       my %page_breaks;
   
   
       
       foreach my $break (split /\|\|\|/, $helper->{'VARS'}->{'FINISHPAGE'}) {
    $page_breaks{$break} = 1;
       }
       
       return \%page_breaks;
   }
   
 sub output_data {  sub output_data {
     my ($r,$helper,$rparmhash) = @_;      my ($r,$helper,$rparmhash) = @_;
     my %parmhash = %$rparmhash;      my %parmhash = %$rparmhash;
Line 819  $bodytag Line 842  $bodytag
 Please stand by while processing your print request, this may take some time ...  Please stand by while processing your print request, this may take some time ...
 ENDPART  ENDPART
   
   
       # fetch the pagebreaks and store them in the course environment
       # The page breaks will be pulled into the hash %page_breaks which is
       # indexed by symb and contains 1's for each break.
   
       $ENV{'form.pagebreaks'} = $helper->{'VARS'}->{'FINISHPAGE'};
       &Apache::loncommon::store_course_settings('print',
         {'pagebreaks' => 'scalar'});
   
       my $page_hashref = &get_page_breaks($helper);
       my %page_breaks  = %$page_hashref;
   
   
   
     my $format_from_helper = $helper->{'VARS'}->{'FORMAT'};      my $format_from_helper = $helper->{'VARS'}->{'FORMAT'};
     my ($result,$selectionmade) = ('','');      my ($result,$selectionmade) = ('','');
     my $number_of_columns = 1; #used only for pages to determine the width of the cell      my $number_of_columns = 1; #used only for pages to determine the width of the cell
Line 1012  ENDPART Line 1049  ENDPART
  my $flag_latex_header_remove = 'NO';   my $flag_latex_header_remove = 'NO';
  my $flag_page_in_sequence = 'NO';   my $flag_page_in_sequence = 'NO';
  my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'};   my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'};
  my %page_breaks;  
  foreach my $break (split /\|\|\|/, $helper->{'VARS'}->{'FINISHPAGE'}) {  
     $page_breaks{$break} = 1;  
  }  
  my $prevassignment='';   my $prevassignment='';
  &Apache::lonnet::delenv('form.counter');   &Apache::lonnet::delenv('form.counter');
  &Apache::lonxml::init_counter();   &Apache::lonxml::init_counter();
Line 1427  sub print_resources { Line 1460  sub print_resources {
  $namepostfix="\\\\Name: ";   $namepostfix="\\\\Name: ";
  $fullname = "CODE - ".$moreenv->{'CODE'};   $fullname = "CODE - ".$moreenv->{'CODE'};
     }      }
     my %page_breaks;  
     foreach my $break (split /\|\|\|/,$helper->{'VARS'}->{'FINISHPAGE'}) {  
  $page_breaks{$break} = 1;  
     }  
     my $i           = 0;      my $i           = 0;
     #goes through all resources, checks if they are available for       #goes through all resources, checks if they are available for 
     #current student, and produces output         #current student, and produces output   
     &Apache::lonnet::delenv('form.counter');      &Apache::lonnet::delenv('form.counter');
     &Apache::lonxml::init_counter();      &Apache::lonxml::init_counter();
   
       my $page_hashref = &get_page_breaks($helper);
       my %page_breaks  = %$page_hashref;
   
     foreach my $curresline (@{$master_seq})  {      foreach my $curresline (@{$master_seq})  {
  if (defined $page_breaks{$curresline}) {   if (defined $page_breaks{$curresline}) {
     if($i != 0) {      if($i != 0) {
Line 1609  sub printHelper { Line 1642  sub printHelper {
     $helper->declareVar('assignment');      $helper->declareVar('assignment');
     $helper->declareVar('style_file');      $helper->declareVar('style_file');
     $helper->declareVar('student_sort');      $helper->declareVar('student_sort');
       $helper->declareVar('FINISHPAGE');
   
       #  The page breaks can get loaded initially from the course environment:
       
       &Apache::loncommon::restore_course_settings('print',
    {'pagebreaks' => 'scalar'});
   
       $helper->{VARS}->{FINISHPAGE} = $ENV{'form.pagebreaks'};
           
     # This will persistently load in the data we want from the      # This will persistently load in the data we want from the
     # very first screen.      # very first screen.

Removed from v.1.362  
changed lines
  Added in v.1.363


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