Diff for /loncom/interface/lonprintout.pm between versions 1.316.2.2 and 1.317

version 1.316.2.2, 2004/09/22 20:49:45 version 1.317, 2004/07/21 19:49:30
Line 629  sub print_latex_header { Line 629  sub print_latex_header {
 }  }
   
 sub path_to_problem {  sub path_to_problem {
     my ($urlp,$colwidth)=@_;      my ($urlp,$LaTeXwidth)=@_;
     my $newurlp = '';      my $newurlp = '';
     $colwidth=~s/\s*mm\s*$//;      $LaTeXwidth=~s/\s*mm\s*$//;
 #characters average about 2 mm in width      my $HowMany = length($urlp)*2;
     if (length($urlp)*2 > $LaTeXwidth) {      if ($HowMany > $LaTeXwidth) {
  my @elements = split '/',$urlp;   my @temporrary = split '/',$urlp;
  my $curlength=0;   my $HowManyNew = 0;
  foreach my $element (@elements) {   for (my $ii=0;$ii<=$#temporrary;$ii++) {
     if ($curlength+(length($element)*2) > $colwidth) {      if ($temporrary[$ii] ne '') {
  $newurlp .=  '|\vskip -1 mm \noindent \verb|';   $HowManyNew += length($temporrary[$ii])*2;
  $curlength=0;   if ($HowManyNew < $LaTeXwidth ) {
     } else {      $newurlp .=  '/'.$temporrary[$ii];
  $curlength+=length($element)*2;   } else {
       $HowManyNew = 0;
       $newurlp .=  '|\vskip -1 mm \noindent \verb|';
       $ii--;
    }
     }      }
     $newurlp.='/'.$element;  
  }   }
     } else {      } else {
  $newurlp=$urlp;   $newurlp=$urlp;
Line 1031  ENDPART Line 1034  ENDPART
  #loop over students   #loop over students
  my $flag_latex_header_remove = 'NO';    my $flag_latex_header_remove = 'NO'; 
  my %moreenv;   my %moreenv;
          $moreenv{'instructor_comments'}='hide';  
  $moreenv{'textwidth'}=&get_textwidth($helper,$LaTeXwidth);   $moreenv{'textwidth'}=&get_textwidth($helper,$LaTeXwidth);
  $moreenv{'print_discussions'}=$helper->{'VARS'}->{'PRINT_DISCUSSIONS'};   $moreenv{'print_discussions'}=$helper->{'VARS'}->{'PRINT_DISCUSSIONS'};
  if ($helper->{'VARS'}->{'PRINT_DISCUSSIONS'} eq 'yes') {$moreenv{'problem_split'}='yes';}   if ($helper->{'VARS'}->{'PRINT_DISCUSSIONS'} eq 'yes') {$moreenv{'problem_split'}='yes';}
Line 1261  ENDPART Line 1263  ENDPART
                             'cgi.'.$identifier.'backref' => $URLback,);                              'cgi.'.$identifier.'backref' => $URLback,);
     
 $r->print(<<FINALEND);  $r->print(<<FINALEND);
   <br />
 <meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$identifier" />  <meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$identifier" />
   <a href="/cgi-bin/printout.pl?$identifier">Continue</a>
 </body>  </body>
 </html>  </html>
 FINALEND  FINALEND

Removed from v.1.316.2.2  
changed lines
  Added in v.1.317


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