[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Thu, 26 Apr 2007 09:32:25 -0000
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;
+
}