[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Fri, 04 Apr 2008 16:36:55 -0000


raeburn		Fri Apr  4 12:36:55 2008 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - The past tense of the word "occur" is "occurred".
  - Removing superfluous $end_page definition
  - Adding missing &mt()
  - Replace call to &get_student_view() with call to &get_student_view_with_retries() for res_url continaing: smppg,syllabus,aboutme or bulletinboard
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.527 loncom/interface/lonprintout.pm:1.528
--- loncom/interface/lonprintout.pm:1.527	Mon Mar 31 05:51:11 2008
+++ loncom/interface/lonprintout.pm	Fri Apr  4 12:36:54 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.527 2008/03/31 09:51:11 foxr Exp $
+# $Id: lonprintout.pm,v 1.528 2008/04/04 16:36:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -150,7 +150,7 @@
 	$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");
     }
 
@@ -166,7 +166,7 @@
         $ssi_error               = 1;
         $ssi_last_error_resource = $curresline.' for user '.$username.':'.$userdomain;
         $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");
     }
     return $content;
@@ -2185,26 +2185,26 @@
 				"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('<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:').
                   '<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 />'.
-                  &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>'.
                   &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 {
 	$r->print(<<FINALEND);
 <br />
 <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
 FINALEND
-  }                                       # endif ssi errors.
+    }                                     # endif ssi errors.
 }
 
 
@@ -2319,7 +2319,7 @@
 		    $current_output .= $rendered;		    
 		} elsif ($res_url=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) {
 		    $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') {
 			my $url = &Apache::lonnet::clutter($res_url);
 			my $annotation = &annotate($url);