--- loncom/interface/printout.pl 2008/03/18 09:48:11 1.133
+++ loncom/interface/printout.pl 2013/03/18 21:33:08 1.154
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.133 2008/03/18 09:48:11 foxr Exp $
+# $Id: printout.pl,v 1.154 2013/03/18 21:33:08 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,6 +44,16 @@ 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:
@@ -113,12 +123,12 @@ 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:
- my $subject = "Error [$badurl] Print failed for $user".'@'.$domain;
- my $message .= "Print failed to render LaTeX for $user".'@'."$domain\n";
+ my $subject = "Error [$badurl] Print failed for $user".':'.$domain;
+ my $message .= "Print failed to render LaTeX for $user".':'."$domain\n";
$message .= " User was attempting to print: \n";
foreach my $resource (split(/:/,$resources)) {
$message .= " $resource\n";
@@ -132,9 +142,9 @@ sub send_error_mail {
}
my (undef, %receivers) = &Apache::lonmsg::decide_receiver(undef, 0,
1,1,1);
- # print "
sending...section: $env{'request.course.sec'}";
+ &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];
@@ -161,14 +171,24 @@ Your cookie information is incorrect.