Diff for /loncom/interface/lonprintout.pm between versions 1.639 and 1.643

version 1.639, 2014/02/08 23:49:12 version 1.643, 2014/09/21 16:26:20
Line 3612  sub print_resources { Line 3612  sub print_resources {
     #      #
   
     my $syllabus_first = 0;      my $syllabus_first = 0;
     my $assessment_first = 0;  
     my $current_assignment = "";      my $current_assignment = "";
     my $assignment;      my $assignment;
     my $courseidinfo = &get_course();      my $courseidinfo = &get_course();
       my $possprint = scalar(@{$master_seq});
   
     foreach my $curresline (@{$master_seq})  {      foreach my $curresline (@{$master_seq})  {
  if (defined $page_breaks{$curresline}) {   if (defined $page_breaks{$curresline}) {
Line 3634  sub print_resources { Line 3634  sub print_resources {
     if ($print_incomplete && !&incomplete($username, $userdomain, $res_url)) {      if ($print_incomplete && !&incomplete($username, $userdomain, $res_url)) {
  next;   next;
     }      }
             if ((!$actually_printed) && ($curresline =~ m/$LONCAPA::assess_re/)) {  
                 $assessment_first = 1;  
             }  
     $actually_printed++; # we're going to print one.      $actually_printed++; # we're going to print one.
   
     if (&Apache::lonnet::allowed('bre',$res_url)) {      if (&Apache::lonnet::allowed('bre',$res_url)) {
Line 3760  sub print_resources { Line 3757  sub print_resources {
     #      #
   
     if ($actually_printed == 0) {      if ($actually_printed == 0) {
  $current_output  = &encapsulate_minipage("\\vskip -10mm \nNo incomplete resources\n \\vskip 100 mm { }\n");          my $message = &mt('No resources to print');
           if (!$possprint) {
               if ($perm{'pav'} || $perm{'pfo'}) {
                   $message = &mt('There are no unhidden resources to print.')."\n\n".
                              &mt('The most likely reason is one of the following: ')."\n".
                              '\begin{itemize}'."\n".
                              '\item '.&mt("The 'Resource hidden from students' parameter is set for the folder being printed.")."\n".
                              '\item '.&mt("'Hidden' is checked in the Course Editor individually for each resource in the folder being printed.")."\n".
                              '\end{itemize}'."\n\n".
                              &mt("Note: to print a bubblesheet exam which you want to hide from students, ".
                                  "use the Course Editor to check the 'Hidden' checkbox for the exam folder itself.")."\n";
               }
           } elsif ($print_incomplete) {
               $message = &mt('No incomplete resources');
           }
           if ($message) { 
       $current_output  = &encapsulate_minipage("\\vskip -10mm \n$message\n \\vskip 100 mm { }\n");
           }
  if ($remove_latex_header eq "NO") {   if ($remove_latex_header eq "NO") {
     $current_output = &print_latex_header() . $current_output;      $current_output = &print_latex_header() . $current_output;
  } else {   } else {
Line 3771  sub print_resources { Line 3785  sub print_resources {
     if ($syllabus_first) {      if ($syllabus_first) {
         $current_output =~ s/\\\\ Last updated:/Last updated:/          $current_output =~ s/\\\\ Last updated:/Last updated:/
     }      }
     my $newheader;      my $currentassignment=&Apache::lonxml::latex_special_symbols($helper->{VARS}->{'assignment'},'header');
     unless ($assessment_first) {      my $header_line =
  my $currentassignment=&Apache::lonxml::latex_special_symbols($helper->{VARS}->{'assignment'},'header');      &format_page_header($LaTeXwidth, $parmhash{'print_header_format'},
  my $header_line =                          $currentassignment, $courseidinfo, $fullname, $usersection);
     &format_page_header($LaTeXwidth, $parmhash{'print_header_format'},      my $header_start = ($columns_in_format == 1) ? '\lhead' : '\fancyhead[LO]';
  $currentassignment, $courseidinfo, $fullname, $usersection);      my $newheader = $header_start.'{'.$header_line.'}';
  my $header_start = ($columns_in_format == 1) ? '\lhead'  
     : '\fancyhead[LO]';  
  $newheader = $header_start.'{'.$header_line.'}';  
     }  
     if ($current_output=~/\\documentclass/) {      if ($current_output=~/\\documentclass/) {
  $current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm} \\begin{document}\\noindent\\parbox{\\minipagewidth}{\\noindent$newheader$namepostfix}\\vskip 5 mm /;   $current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm} \\begin{document}\\noindent\\parbox{\\minipagewidth}{\\noindent$newheader$namepostfix}\\vskip 5 mm /;
   
Line 5034  sub render { Line 5044  sub render {
     my $PaperType=&mt('Paper type');      my $PaperType=&mt('Paper type');
     my $landscape=&mt('Landscape');      my $landscape=&mt('Landscape');
     my $portrait=&mt('Portrait');      my $portrait=&mt('Portrait');
     my $pdfFormLabel=&mt('PDF-Formfields');      my $pdfFormLabel=&mt('PDF Form Fields');
     my $with=&mt('with Formfields');      my $with=&mt('with Form Fields');
     my $without=&mt('without Formfields');      my $without=&mt('without Form Fields');
           
   
     $result.='<h3>'.&mt('Layout Options').'</h3>'      $result.='<h3>'.&mt('Layout Options').'</h3>'

Removed from v.1.639  
changed lines
  Added in v.1.643


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