[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lon-capa-cvs
Subject:    [LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
From:       foxr <lon-capa-cvs-allow () mail ! lon-capa ! org>
Date:       2007-04-26 9:32:25
Message-ID: cvsfoxr1177579945 () cvsserver
[Download RAW message or body]

foxr		Thu Apr 26 05:32:25 2007 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Use lonnet::getfile to fetch the raw latex file.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.499 loncom/interface/lonprintout.pm:1.500
--- loncom/interface/lonprintout.pm:1.499	Fri Apr 20 16:33:35 2007
+++ loncom/interface/lonprintout.pm	Thu Apr 26 05:32:23 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.499 2007/04/20 20:33:35 foxr Exp $
+# $Id: lonprintout.pm,v 1.500 2007/04/26 09:32:23 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -60,19 +60,13 @@
     my ($url) = @_;
 
     my $filename  = &Apache::lonnet::filelocation("", $url);
-    #
-    # fetch if needed:
-    #
-    if (! -e $filename) {
-	my $repcopy_result = &Apache::lonnet::repcopy($filename);
+    my $contents  = &Apache::lonnet::getfile($filename);
 
-	if ($repcopy_result ne 'ok') {
-	    return "File open failed for $filename";   # This will bomb the print.
-	}
+    if ($contents == -1) {
+	return "File open failed for $filename";      # This will bomb the print.
     }
-    my $contents = &Apache::lonnet::readfile($filename);
-
     return $contents;
+
     
 }
 


_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic