--- loncom/interface/lonprintout.pm 2008/03/28 15:22:48 1.525
+++ loncom/interface/lonprintout.pm 2008/04/22 10:24:24 1.530
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.525 2008/03/28 15:22:48 www Exp $
+# $Id: lonprintout.pm,v 1.530 2008/04/22 10:24:24 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -150,7 +150,7 @@ sub ssi_with_retries {
$ssi_error = 1;
$ssi_last_error_resource = $resource;
$ssi_last_error = $response->code . " " . $response->message;
- $content='\section*{!!! An error occured !!!}';
+ $content='\section*{!!! An error occurred !!!}';
&Apache::lonnet::logthis("Error in SSI resource: $resource Error: $ssi_last_error");
}
@@ -164,12 +164,11 @@ sub get_student_view_with_retries {
my ($content, $response) = &Apache::loncommon::get_student_view_with_retries($curresline,$retries,$username,$userdomain,$courseid,$target,$moreenv);
if (!$response->is_success) {
$ssi_error = 1;
- $ssi_last_error_resource = $curresline;
+ $ssi_last_error_resource = $curresline.' for user '.$username.':'.$userdomain;
$ssi_last_error = $response->code . " " . $response->message;
- $content='\section*{!!! An error occured !!!}';
- &Apache::lonnet::logthis("Error in SSI (student view) resource: $curresline Error: $ssi_last_error");
+ $content='\section*{!!! An error occurred !!!}';
+ &Apache::lonnet::logthis("Error in SSI (student view) resource: $curresline Error: $ssi_last_error User: $username:$userdomain");
}
-
return $content;
}
@@ -630,7 +629,7 @@ sub character_chart {
$result =~ s/&(\#165|yen);/\\textyen /g;
$result =~ s/&(\#166|brvbar);/\\textbrokenbar /g;
$result =~ s/&(\#167|sect);/\\textsection /g;
- $result =~ s/&(\#168|uml);/\\texthighdieresis /g;
+ $result =~ s/&(\#168|uml);/\\"\{\} /g;
$result =~ s/&(\#169|copy);/\\copyright /g;
$result =~ s/&(\#170|ordf);/\\textordfeminine /g;
$result =~ s/&(\#172|not);/\\ensuremath\{\\neg\}/g;
@@ -641,7 +640,7 @@ sub character_chart {
$result =~ s/&(\#177|plusmn);/\\ensuremath\{\\pm\}/g;
$result =~ s/&(\#178|sup2);/\\ensuremath\{^2\}/g;
$result =~ s/&(\#179|sup3);/\\ensuremath\{^3\}/g;
- $result =~ s/&(\#180|acute);/\\textacute /g;
+ $result =~ s/&(\#180|acute);/\\'\{\} /g;
$result =~ s/&(\#181|micro);/\\ensuremath\{\\mu\}/g;
$result =~ s/&(\#182|para);/\\P/g;
$result =~ s/&(\#183|middot);/\\ensuremath\{\\cdot\}/g;
@@ -1144,6 +1143,11 @@ sub print_latex_header {
'\usepackage{wrapfig}'.
'\usepackage{picins}\usepackage{calc}'."\n".
'\usepackage[utf8]{inputenc}'."\n".
+ '\usepackage{amsmath}'.
+ '\usepackage{amssymb}'.
+ '\usepackage{amsfonts}'.
+ '\usepackage{amsthm}'.
+ '\usepackage{amscd}'.
'\newenvironment{choicelist}{\begin{list}{}{\setlength{\rightmargin}{0in}'."\n".
'\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.05in}'."\n".
'\setlength{\itemsep}{0.022in}\setlength{\parsep}{0in}'."\n".
@@ -2181,26 +2185,26 @@ ENDPART
"cgi.$identifier.resources" => $resources_printed});
my $end_page = &Apache::loncommon::end_page();
+ my $continue_text = &mt('Continue');
# If there's been an unrecoverable SSI error, report it to the user
if ($ssi_error) {
my $helpurl = &Apache::loncommon::top_nav_help('Helpdesk');
- my $end_page = &Apache::loncommon::end_page();
$r->print('
'.
- &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).'
'.$ssi_last_error.
- '
'.&mt('Make sure to carefully inspect your output file! The errors will be marked in the file.').'
'.
- &mt('You may be able to reprint the individual resources for which this error occured, as the issue may be temporary.').
+ &mt('At least one of the resources you chose to print could not be rendered due to an unrecoverable error when communicating with a server:').
+ '
'.$ssi_last_error_resource.'
'.$ssi_last_error.
+ '
'.&mt('You can continue using the link provided below, but make sure to carefully inspect your output file! The errors will be marked in the file.').'
'.
+ &mt('You may be able to reprint the individual resources for which this error occurred, as the issue may be temporary.').
'
'.&mt('If the error persists, please contact the [_1] for assistance.',$helpurl).'
'. &mt('We apologize for the inconvenience.').'
'. - 'Continue'.$end_page); + ''.$continue_text.''.$end_page); } else { $r->print(<