version 1.527, 2008/03/31 09:51:11
|
version 1.529, 2008/04/04 16:38:34
|
Line 150 sub ssi_with_retries {
|
Line 150 sub ssi_with_retries {
|
$ssi_error = 1; |
$ssi_error = 1; |
$ssi_last_error_resource = $resource; |
$ssi_last_error_resource = $resource; |
$ssi_last_error = $response->code . " " . $response->message; |
$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"); |
&Apache::lonnet::logthis("Error in SSI resource: $resource Error: $ssi_last_error"); |
} |
} |
|
|
Line 166 sub get_student_view_with_retries {
|
Line 166 sub get_student_view_with_retries {
|
$ssi_error = 1; |
$ssi_error = 1; |
$ssi_last_error_resource = $curresline.' for user '.$username.':'.$userdomain; |
$ssi_last_error_resource = $curresline.' for user '.$username.':'.$userdomain; |
$ssi_last_error = $response->code . " " . $response->message; |
$ssi_last_error = $response->code . " " . $response->message; |
$content='\section*{!!! An error occured !!!}'; |
$content='\section*{!!! An error occurred !!!}'; |
&Apache::lonnet::logthis("Error in SSI (student view) resource: $curresline Error: $ssi_last_error User: $username:$userdomain"); |
&Apache::lonnet::logthis("Error in SSI (student view) resource: $curresline Error: $ssi_last_error User: $username:$userdomain"); |
} |
} |
return $content; |
return $content; |
Line 2185 ENDPART
|
Line 2185 ENDPART
|
"cgi.$identifier.resources" => $resources_printed}); |
"cgi.$identifier.resources" => $resources_printed}); |
|
|
my $end_page = &Apache::loncommon::end_page(); |
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 there's been an unrecoverable SSI error, report it to the user |
if ($ssi_error) { |
if ($ssi_error) { |
my $helpurl = &Apache::loncommon::top_nav_help('Helpdesk'); |
my $helpurl = &Apache::loncommon::top_nav_help('Helpdesk'); |
my $end_page = &Apache::loncommon::end_page(); |
|
$r->print('<br /><h2>'.&mt('An unrecoverable network error occurred:').'</h2><p> '. |
$r->print('<br /><h2>'.&mt('An unrecoverable network error occurred:').'</h2><p> '. |
&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:'). |
&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:'). |
'<br />'.$ssi_last_error_resource.'<br />'.$ssi_last_error. |
'<br />'.$ssi_last_error_resource.'<br />'.$ssi_last_error. |
'</p><p>'.&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.').'<br />'. |
'</p><p>'.&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.').'<br />'. |
&mt('You may be able to reprint the individual resources for which this error occured, as the issue may be temporary.'). |
&mt('You may be able to reprint the individual resources for which this error occurred, as the issue may be temporary.'). |
'<br />'.&mt('If the error persists, please contact the [_1] for assistance.',$helpurl).'</p><p>'. |
'<br />'.&mt('If the error persists, please contact the [_1] for assistance.',$helpurl).'</p><p>'. |
&mt('We apologize for the inconvenience.').'</p>'. |
&mt('We apologize for the inconvenience.').'</p>'. |
'<a href="/cgi-bin/printout.pl?'.$identifier.'">Continue</a>'.$end_page); |
'<a href="/cgi-bin/printout.pl?'.$identifier.'">'.$continue_text.'</a>'.$end_page); |
} else { |
} else { |
$r->print(<<FINALEND); |
$r->print(<<FINALEND); |
<br /> |
<br /> |
<meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$identifier" /> |
<meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$identifier" /> |
<a href="/cgi-bin/printout.pl?$identifier">Continue</a> |
<a href="/cgi-bin/printout.pl?$identifier">$continue_text</a> |
$end_page |
$end_page |
FINALEND |
FINALEND |
} # endif ssi errors. |
} # endif ssi errors. |
} |
} |
|
|
|
|
Line 2319 sub print_resources {
|
Line 2319 sub print_resources {
|
$current_output .= $rendered; |
$current_output .= $rendered; |
} elsif ($res_url=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) { |
} elsif ($res_url=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) { |
$printed .= $curresline.':'; |
$printed .= $curresline.':'; |
my $rendered = &get_student_view($curresline,$ssi_retry_count,$username,$userdomain,$env{'request.course.id'},'tex',$moreenv); |
my $rendered = &get_student_view_with_retries($curresline,$ssi_retry_count,$username,$userdomain,$env{'request.course.id'},'tex',$moreenv); |
if ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes') { |
if ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes') { |
my $url = &Apache::lonnet::clutter($res_url); |
my $url = &Apache::lonnet::clutter($res_url); |
my $annotation = &annotate($url); |
my $annotation = &annotate($url); |