Diff for /loncom/interface/lonprintout.pm between versions 1.497 and 1.498

version 1.497, 2007/04/17 15:45:03 version 1.498, 2007/04/20 20:13:58
Line 48  my %perm; Line 48  my %perm;
 my %parmhash;  my %parmhash;
 my $resources_printed;  my $resources_printed;
   
   # Fetch the contents of a resource, uninterpreted.
   # This is used here to fetch a latex file to be included
   # verbatim into the printout<
   # NOTE: Ask Guy if there is a lonnet function similar to this?
   #
   # Parameters:
   #   URL of the file
   #
   sub fetch_raw_resource {
       my ($url) = @_;
   
       my $filename  = &Apache::lonnet::filelocation("", $url);
       #
       # fetch if needed:
       #
       if (! -e $filename) {
    my $repcopy_result = &Apache::lonnet::repcopy($filename);
   
    if ($repcopy_result ne 'ok') {
       return "File open failed for $filename";   # This will bomb the print.
    }
       }
       my $contents = &Apache::lonnet::readfile($filename);
   
       return $contents;
       
   }
   
 #  #
 #   printf_style_subst  item format_string repl  #   printf_style_subst  item format_string repl
 #    #  
Line 1455  ENDPART Line 1483  ENDPART
  $resources_printed .= $currentURL.':';   $resources_printed .= $currentURL.':';
  my $texversion=&Apache::lonnet::ssi($currentURL,%form);   my $texversion=&Apache::lonnet::ssi($currentURL,%form);
  $result .= $texversion;   $result .= $texversion;
    } elsif ($cleanURL =~/.tex$/) {
       # For this sort of print of a single LaTeX file,
       # We can just print the LaTeX file as it is uninterpreted in any way:
       #
   
       $result = &fetch_raw_resource($currentURL);
   
  } else {   } else {
     $result.=&unsupported($currentURL,$helper->{'VARS'}->{'LATEX_TYPE'},      $result.=&unsupported($currentURL,$helper->{'VARS'}->{'LATEX_TYPE'},
   $helper->{'VARS'}->{'symb'});    $helper->{'VARS'}->{'symb'});

Removed from v.1.497  
changed lines
  Added in v.1.498


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