Diff for /loncom/interface/lonprintout.pm between versions 1.300 and 1.301

version 1.300, 2004/05/06 06:45:13 version 1.301, 2004/05/10 14:25:02
Line 676  sub get_textwidth { Line 676  sub get_textwidth {
 sub unsupported {  sub unsupported {
     my $currentURL=shift;      my $currentURL=shift;
     my $result.='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';      my $result.='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';
     if ($currentURL=~/\/(aboutme|syllabus|bulletinboard)$/) {      if ($currentURL=~/\/ext\//) {
  $result.='\textbf{'.$1.'}';  
     } elsif ($currentURL=~/\/ext\//) {  
  $result.=' \strut \\\\ THIS IS EXTERNAL RESOURCE WITH URL \strut \\\\ '.$currentURL.' ';   $result.=' \strut \\\\ THIS IS EXTERNAL RESOURCE WITH URL \strut \\\\ '.$currentURL.' ';
     } else {      } else {
  $result.=$currentURL;   $result.=$currentURL;
Line 754  ENDPART Line 752  ENDPART
  }   }
  $selectionmade = 1;   $selectionmade = 1;
  if ($currentURL=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {   if ($currentURL=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {
     &Apache::lonnet::logthis("II AMAM IN A WRONG PLACE");  
     my $rndseed=time;      my $rndseed=time;
     my $texversion='';      my $texversion='';
     if ($helper->{'VARS'}->{'ANSWER_TYPE'} ne 'only') {      if ($helper->{'VARS'}->{'ANSWER_TYPE'} ne 'only') {
Line 877  ENDPART Line 874  ENDPART
     }      }
     if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;}      if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;}
     $result .= '\end{document}';         $result .= '\end{document}';   
  } elsif ($currentURL=~/\/(smppg|syllabus)$/) {    } elsif ($currentURL=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) { 
  my %form;   my %form;
  $form{'grade_target'}='tex';   $form{'grade_target'}='tex';
  $form{'textwidth'}=&get_textwidth($helper,$LaTeXwidth);   $form{'textwidth'}=&get_textwidth($helper,$LaTeXwidth);
Line 886  ENDPART Line 883  ENDPART
  my $texversion=&Apache::lonnet::ssi($currentURL,%form);   my $texversion=&Apache::lonnet::ssi($currentURL,%form);
  $result .= $texversion;   $result .= $texversion;
  } else {   } else {
     &Apache::lonnet::logthis("IIII AMAM IN A WRONG PLACE");  
     $result.=&unsupported($currentURL);      $result.=&unsupported($currentURL);
  }   }
     } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or      } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or
Line 975  ENDPART Line 971  ENDPART
  }   }
  $result .= $texversion;   $result .= $texversion;
  $flag_latex_header_remove = 'YES';      $flag_latex_header_remove = 'YES';   
       } elsif ($urlp=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) { 
    my %form;
    $form{'grade_target'}='tex';
    $form{'textwidth'}=&get_textwidth($helper,$LaTeXwidth);
    $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
    if ($urlp=~/\/syllabus$/) {$urlp=~s/\/res//;}
    my $texversion=&Apache::lonnet::ssi($urlp,%form);
    if ($flag_latex_header_remove ne 'NO') {
       $texversion = &latex_header_footer_remove($texversion);
    } else {
       $texversion =~ s/\\end{document}/\\vskip 0\.5mm\\noindent\\makebox\[\\textwidth\/\$number_of_columns\]\[b\]\{\\hrulefill\}/;
    }
    $result .= $texversion;
    $flag_latex_header_remove = 'YES'; 
     } else {      } else {
  $texversion=&unsupported($urlp);   $texversion=&unsupported($urlp);
  if ($flag_latex_header_remove ne 'NO') {   if ($flag_latex_header_remove ne 'NO') {

Removed from v.1.300  
changed lines
  Added in v.1.301


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