--- loncom/interface/lonprintout.pm 2008/03/24 00:03:05 1.519.2.2
+++ loncom/interface/lonprintout.pm 2008/03/17 09:53:36 1.521
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.519.2.2 2008/03/24 00:03:05 raeburn Exp $
+# $Id: lonprintout.pm,v 1.521 2008/03/17 09:53:36 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1474,8 +1474,8 @@ ENDPART
}
if ($helper->{'VARS'}->{'style_file'}=~/\w/) {
- &Apache::lonnet::appenv('construct.style' =>
- $helper->{'VARS'}->{'style_file'});
+ &Apache::lonnet::appenv({'construct.style' =>
+ $helper->{'VARS'}->{'style_file'}});
} elsif ($env{'construct.style'}) {
&Apache::lonnet::delenv('construct\\.style');
}
@@ -1518,7 +1518,7 @@ ENDPART
$rndseed=$helper->{'VARS'}->{'curseed'};
}
$form{'rndseed'}=$rndseed;
- &Apache::lonnet::appenv(%moreenv);
+ &Apache::lonnet::appenv(\%moreenv);
&Apache::lonxml::clear_problem_counter();
@@ -1666,7 +1666,8 @@ ENDPART
my $pbreakresources = keys %page_breaks;
for (my $i=0;$i<=$#master_seq;$i++) {
- &Apache::lonenc::reset_enc();
+ &Apache::lonenc::reset_enc();
+
# Note due to document structure, not allowed to put \newpage
# prior to the first resource
@@ -1676,10 +1677,11 @@ ENDPART
$result.="\\newpage\n";
}
}
- my ($sequence,$middle_thingy,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]);
+ my ($sequence,$middle_thingy,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]);
$urlp=&Apache::lonnet::clutter($urlp);
$form{'symb'}=$master_seq[$i];
+
my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($sequence),'header'); #title of the assignment which contains this problem
if ($selectionmade==7) {$helper->{VARS}->{'assignment'}=$assignment;}
@@ -1989,7 +1991,7 @@ ENDPART
}
for (my $i=0;$i<=$#list_of_files;$i++) {
- &Apache::lonenc::reset_enc();
+ &Apache::lonenc::reset_enc();
my $urlp = $list_of_files[$i];
$urlp=~s|//|/|;
@@ -2090,25 +2092,27 @@ ENDPART
#
if ($ssi_error) {
-
- my $helpurl = &Apache::loncommon::top_nav_help('Helpdesk');
- my $end_page = &Apache::loncommon::end_page();
- $r->print('
+ my $end_page = &Apache::loncommon::end_page();
+ $r->print(<
+ I was not able to render one of the print resources ($ssi_last_error_resource)
+due to an unrecoverable error communicating with a server:
+
+$ssi_last_error;
-
- '.&mt('One of the resources ([_1]) you chose to print could not be rendered due to an unrecoverable error when communicating with a server:',$ssi_last_error_resource).'
+I recommend that you try printing again later as this may mean the server was just
+temporarily unavailable, or is down for maintenance. If this error persists, then
+please contact your LonCAPA support folks for assistance and diagnosis.
-'.$ssi_last_error.'
+
+We apologize for the inconvenience.
'.
-&mt('It is recommended that you try printing again later, as this error may mean the server was just temporarily unavailable, or is down for maintenance.').'
'.
-&mt('If the error persists, please contact the [_1] for assistance.',$helpurl).
-'
'. -&mt('We apologize for the inconvenience.'). -'
'. -$end_page); - +$end_page +ERROR_END } else { #-- writing .tex file in prtspool @@ -2173,7 +2177,7 @@ $end_page); # yet. my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; - &Apache::lonnet::appenv('cgi.'.$identifier.'.file' => $filename, + &Apache::lonnet::appenv({'cgi.'.$identifier.'.file' => $filename, 'cgi.'.$identifier.'.layout' => $laystyle, 'cgi.'.$identifier.'.numcol' => $numberofcolumns, 'cgi.'.$identifier.'.paper' => $papersize, @@ -2183,12 +2187,12 @@ $end_page); 'cgi.'.$identifier.'.role' => $perm{'pav'}, 'cgi.'.$identifier.'.numberoffiles' => $#print_array, 'cgi.'.$identifier.'.studentnames' => $student_names, - 'cgi.'.$identifier.'.backref' => $URLback,); - &Apache::lonnet::appenv("cgi.$identifier.user" => $env{'user.name'}, + 'cgi.'.$identifier.'.backref' => $URLback,}); + &Apache::lonnet::appenv({"cgi.$identifier.user" => $env{'user.name'}, "cgi.$identifier.domain" => $env{'user.domain'}, "cgi.$identifier.courseid" => $cnum, "cgi.$identifier.coursedom" => $cdom, - "cgi.$identifier.resources" => $resources_printed); + "cgi.$identifier.resources" => $resources_printed}); my $end_page = &Apache::loncommon::end_page(); $r->print(<