Diff for /loncom/interface/lonprintout.pm between versions 1.77 and 1.80

version 1.77, 2002/10/14 13:57:51 version 1.80, 2002/10/17 14:49:37
Line 225  sub additional_class_menu { Line 225  sub additional_class_menu {
 <input type="hidden" name="choice" value="$ENV{'form.choice'}">  <input type="hidden" name="choice" value="$ENV{'form.choice'}">
 <input type="hidden" name="layout" value="$ENV{'form.layout'}">  <input type="hidden" name="layout" value="$ENV{'form.layout'}">
 <input type="hidden" name="numberofcolumns" value="$ENV{'form.numberofcolumns'}">  <input type="hidden" name="numberofcolumns" value="$ENV{'form.numberofcolumns'}">
 <h1>Mark students which assignments you want to print</h1>  <h1>Select student(s) whose assignment you want to print</h1>
 ENDMENUOUT1  ENDMENUOUT1
     my %courselist=&Apache::lonnet::dump(      my %courselist=&Apache::lonnet::dump(
                    'classlist',                     'classlist',
Line 370  ENDPART Line 370  ENDPART
       $moreenv{'form.textwidth'}=$LaTeXwidth;        $moreenv{'form.textwidth'}=$LaTeXwidth;
       &Apache::lonnet::appenv(%moreenv);        &Apache::lonnet::appenv(%moreenv);
       my $texversion=&Apache::lonnet::ssi($ENV{'form.url'});        my $texversion=&Apache::lonnet::ssi($ENV{'form.url'});
       &Apache::lonnet::delenv('form.grade_target','form.textwidth');        &Apache::lonnet::delenv('form.grade_target','form.textwidth','form.counter');
       $result .= $texversion;        $result .= $texversion;
       if ($ENV{'form.url'}=~m/\.page\s*$/) {        if ($ENV{'form.url'}=~m/\.page\s*$/) {
   ($result,$number_of_columns) = &page_cleanup($result);    ($result,$number_of_columns) = &page_cleanup($result);
Line 475  ENDPART Line 475  ENDPART
  my $primary_sequence = '/res/'.$sequence[0];   my $primary_sequence = '/res/'.$sequence[0];
  my @master_seq = &coming_from_hash($primary_sequence,$sequence[0]);    my @master_seq = &coming_from_hash($primary_sequence,$sequence[0]); 
         #loop over students          #loop over students
  my $flag_latex_header_remove = 'NO';     my $flag_latex_header_remove = 'NO'; 
    my %moreenv;
    $moreenv{'form.textwidth'}=$LaTeXwidth;
    &Apache::lonnet::appenv(%moreenv);
  foreach my $person (@students) {   foreach my $person (@students) {
     my $current_output = '';       my $current_output = ''; 
     my ($usersection,$username,$userdomain) = split /:/,$person;      my ($usersection,$username,$userdomain) = split /:/,$person;
Line 504  ENDPART Line 507  ENDPART
  $current_output = '\\vskip 3mm\noindent\parbox{\minipagewidth}{\noindent\fbox{\textbf{'.$fullname.'}}\hskip 1.4in } \vskip 5 mm '.$current_output;   $current_output = '\\vskip 3mm\noindent\parbox{\minipagewidth}{\noindent\fbox{\textbf{'.$fullname.'}}\hskip 1.4in } \vskip 5 mm '.$current_output;
     }      }
     $result .= $current_output;      $result .= $current_output;
       &Apache::lonnet::delenv('form.counter');
  }   }
  $result .= '\end{document}';    $result .= '\end{document}';
    &Apache::lonnet::delenv('form.textwidth');
     } elsif ($choice eq 'Subdirectory print') {            } elsif ($choice eq 'Subdirectory print') {      
     #prints selected problems from the subdirectory       #prints selected problems from the subdirectory 
  $selectionmade = 6;   $selectionmade = 6;
Line 1075  sub page_format_transformation { Line 1080  sub page_format_transformation {
      if ($choice ne 'All class print') {        if ($choice ne 'All class print') { 
  $text =~ s/\\begin{document}/\\textheight 25\.9cm\\oddsidemargin = -0\.57in\\evensidemargin = -0\.57in\\textwidth= 9cm\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}\\noindent\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}}} \\hfill  $courseidinfo} \\vskip 5 mm /;   $text =~ s/\\begin{document}/\\textheight 25\.9cm\\oddsidemargin = -0\.57in\\evensidemargin = -0\.57in\\textwidth= 9cm\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}\\noindent\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}}} \\hfill  $courseidinfo} \\vskip 5 mm /;
     } else {      } else {
  $text =~ s/\\begin{document}/\\setlength{\\textheight}{$textheight}\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}\\setlength{\\textheight}{$textheight}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}  \\vskip 5 mm /;   $text =~ s/\\begin{document}/\\setlength{\\textheight}{$textheight}\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}\\setlength{\\textwidth}{$textwidth}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}  \\vskip 5 mm /;
     }      }
  }   }
  return $text;   return $text;
Line 1122  sub latex_corrections { Line 1127  sub latex_corrections {
   
     $result =~ s/\\includegraphics{/\\includegraphics\[width=\\minipagewidth\]{/g;      $result =~ s/\\includegraphics{/\\includegraphics\[width=\\minipagewidth\]{/g;
     $result =~ s/\$number_of_columns/$number_of_columns/g;      $result =~ s/\$number_of_columns/$number_of_columns/g;
     $result =~ s/(\\end{document})/\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny \\makebox\[1.5cm\]\[b\]{\\hfill}LON-CAPA\\copyright Michigan State University Board of Trustees $1/;      $result =~ s/(\\end{document})/\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny \\makebox\[1.5cm\]\[b\]{\\hfill}LON-CAPA\\copyright MSU  $1/;
     $result =~ s/(\\end{longtable}\s*)(\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill})/$2$1/g;      $result =~ s/(\\end{longtable}\s*)(\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill})/$2$1/g;
     $result =~ s/(\\end{longtable}\s*)\\newline/$1/g;      $result =~ s/(\\end{longtable}\s*)\\newline/$1/g;
 #-- LaTeX corrections       #-- LaTeX corrections     

Removed from v.1.77  
changed lines
  Added in v.1.80


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