[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 21 Feb 2002 04:12:16 -0000


albertel		Wed Feb 20 23:12:16 2002 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - should get all files through lonnet::ssi
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.13 loncom/interface/lonprintout.pm:1.14
--- loncom/interface/lonprintout.pm:1.13	Tue Jan 22 05:42:57 2002
+++ loncom/interface/lonprintout.pm	Wed Feb 20 23:12:16 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.13 2002/01/22 10:42:57 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.14 2002/02/21 04:12:16 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -96,20 +96,18 @@
     my $filename;
 
     if ($choice eq 'Standard LaTeX output for current document') {
-	$_ = $ENV{'form.url'};
-	if (/\.problem/) {
-	    my %moreenv;
-	    $moreenv{'form.grade_target'}='tex';
-	    &Apache::lonnet::appenv(%moreenv);
-	    my $texversion=&Apache::lonnet::ssi($ENV{'form.url'});
-	    &Apache::lonnet::delenv('form.grade_target');
-	    $texversion =~ s!\.gif!\.eps!;
-	    $result .= $texversion;        
-	} else { 
-	    my $file=&Apache::lonnet::filelocation("",$ENV{'form.url'});
-	    my $filecontents=&Apache::lonnet::getfile($file);
-	    $result = &Apache::lonxml::xmlparse('tex',$filecontents,'',%mystyle);
-	} 
+      my %moreenv;
+      my $currequest=$ENV{'request.filename'};
+      $moreenv{'form.grade_target'}='tex';
+      $moreenv{'request.filename'}=$ENV{'form.url'};
+      &Apache::lonnet::appenv(%moreenv);
+      my $texversion=&Apache::lonnet::ssi($ENV{'form.url'});
+      &Apache::lonnet::delenv('form.grade_target');
+      %moreenv = ();
+      $moreenv{'request.filename'}=$currequest;
+      &Apache::lonnet::appenv(%moreenv);
+      $texversion =~ s!\.gif!\.eps!;
+      $result .= $texversion;
     } elsif ($choice eq 'Standard LaTeX output for the primary sequence') {
 	my @master_seq = ();
 	my $keyword = 0;