Diff for /loncom/interface/lonprintout.pm between versions 1.157 and 1.158

version 1.157, 2003/05/07 19:09:10 version 1.158, 2003/05/08 18:33:03
Line 1363  ENDPART Line 1363  ENDPART
     if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'current_document') {      if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'current_document') {
       #-- single document - problem, page, html, xml, ...        #-- single document - problem, page, html, xml, ...
  my $currentURL;   my $currentURL;
  if (not defined $helper->{'VARS'}->{'construction'}) {   if ($helper->{'VARS'}->{'construction'} ne '1') {
               #prins published resource
     $currentURL=$helper->{'VARS'}->{'postdata'};      $currentURL=$helper->{'VARS'}->{'postdata'};
  } else {   } else {
     $currentURL=$helper->{'VARS'}->{'construction'};              #prins resource from the construction space
       $currentURL=$helper->{'VARS'}->{'filename'};
       $currentURL=~s/\/home\//\/~/;
       $currentURL=~s/public_html\///;
  }   }
  $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)$/) {
         my %moreenv;      my %moreenv;
         $moreenv{'form.grade_target'}='tex';      $moreenv{'form.grade_target'}='tex';
  if (&Apache::lonnet::allowed('bre',$currentURL)) {      $moreenv{'request.filename'}=$currentURL;
     $currentURL=~s/http:\/\/[^\/]+//;      $moreenv{'form.textwidth'}=$LaTeXwidth;
  }      &Apache::lonnet::appenv(%moreenv);
         $moreenv{'request.filename'}=$currentURL;      my $texversion=&Apache::lonnet::ssi($currentURL);
         $moreenv{'form.textwidth'}=$LaTeXwidth;      &Apache::lonnet::delenv('form.grade_target','form.textwidth','form.counter');
         &Apache::lonnet::appenv(%moreenv);      $result .= $texversion;
         my $texversion=&Apache::lonnet::ssi($currentURL);      if ($currentURL=~m/\.page\s*$/) {
         &Apache::lonnet::delenv('form.grade_target','form.textwidth','form.counter');   ($result,$number_of_columns) = &page_cleanup($result);
         $result .= $texversion;      }
         if ($currentURL=~m/\.page\s*$/) {   } else {
   ($result,$number_of_columns) = &page_cleanup($result);  
         }  
       } else {  
 #  $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';  #  $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';
 #  if ($ENV{'form.url'}=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) {  #  if ($ENV{'form.url'}=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) {
 #      $result.=$1;  #      $result.=$1;
Line 1392  ENDPART Line 1393  ENDPART
 #      $result.=$ENV{'form.url'};  #      $result.=$ENV{'form.url'};
 #  }  #  }
 #  $result.=' \end{document}'  #  $result.=' \end{document}'
       }   }
   
   
     } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or      } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or
Line 1585  sub handler { Line 1586  sub handler {
   
 # my $key;   # my $key; 
 # foreach $key (keys %{$helper->{'VARS'}}) {  # foreach $key (keys %{$helper->{'VARS'}}) {
 #    $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<br />');  #    $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-<br />');
 # }  # }
 # return OK;  # return OK;
   

Removed from v.1.157  
changed lines
  Added in v.1.158


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