--- loncom/interface/printout.pl 2006/06/06 11:04:18 1.99
+++ loncom/interface/printout.pl 2011/10/26 02:09:42 1.150
@@ -1,6 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
+# $Id: printout.pl,v 1.150 2011/10/26 02:09:42 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -29,6 +30,7 @@ use lib '/home/httpd/lib/perl';
use LONCAPA::loncgi;
use File::Path;
use File::Basename;
+use File::Copy;
use IO::File;
use Image::Magick;
use Apache::lonhtmlcommon();
@@ -37,9 +39,21 @@ use Apache::loncommon();
use Apache::lonlocal;
use Apache::lonmsg();
use LONCAPA::Enrollment;
+use LONCAPA::Configuration;
use strict;
+my $busy_wait_timeout = 30;
+my $pdfs_converted = 0; # non zero if PDF includes (need to fixps).
+
+my $debugging = 0;
+
+sub debug {
+ if ($debugging) {
+ my ($text) = @_;
+ print "$text
\n";
+ }
+}
# Determine if a user is operating as a student for this course/domain.
#Parameters:
@@ -109,7 +123,7 @@ sub send_error_mail {
if (&is_student()) {
# build the subject and message body:
- # print "sending message to course coordinators.
";
+ &debug("sending message to course coordinators.");
# Todo: Convert badurl into a url from file path:
@@ -126,11 +140,11 @@ sub send_error_mail {
foreach my $line (@$texfile) {
$message .= "$line\n";
}
- my (undef, %receivers) = &Apache::lonfeedback::decide_receiver(undef, 0,
- 1,1,1);
- # print "
sending...section: $env{'request.course.sec'}";
+ my (undef, %receivers) = &Apache::lonmsg::decide_receiver(undef, 0,
+ 1,1,1);
+ &debug("sending...section: $env{'request.course.sec'}");
foreach my $dest (keys %receivers) {
- # print "
dest is $dest";
+ &debug("dest is $dest");
my @destinfo = split(/:/,$dest);
my $user = $destinfo[0];
my $dom = $destinfo[1];
@@ -157,149 +171,146 @@ Your cookie information is incorrect.