[LON-CAPA-cvs] cvs: rat / lonpageflip.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 10 Nov 2005 19:16:07 -0000


www		Thu Nov 10 14:16:07 2005 EDT

  Modified files:              
    /rat	lonpageflip.pm 
  Log:
  Better and internationalized messages
  
  
Index: rat/lonpageflip.pm
diff -u rat/lonpageflip.pm:1.58 rat/lonpageflip.pm:1.59
--- rat/lonpageflip.pm:1.58	Wed Nov  9 06:39:00 2005
+++ rat/lonpageflip.pm	Thu Nov 10 14:16:02 2005
@@ -2,7 +2,7 @@
 #
 # Page flip handler
 #
-# $Id: lonpageflip.pm,v 1.58 2005/11/09 11:39:00 www Exp $
+# $Id: lonpageflip.pm,v 1.59 2005/11/10 19:16:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -401,18 +401,29 @@
 # --------------------------------------------------------- There was a problem
                   &Apache::loncommon::content_type($r,'text/html');
                   $r->send_http_header;
+		  my %lt=&Apache::lonlocal::texthash('title' => 'End of Sequence',
+						     'explain' =>
+						     'You have reached the end of the sequence of materials.',
+						     'back' => 'Go Back',
+						     'nav' => 'Navigate Course Content',
+						     'wherenext' =>
+						     'There are several possibilities of where to go next',
+						     'pick' =>
+						     'Please click on the the resource you intend to access',
+						     'titleheader' => 'Title',
+						     'type' => 'Type');
                   if ($#possibilities>0) {
 		      my $bodytag=
                              &Apache::loncommon::bodytag('Multiple Resources');
                      $r->print(<<ENDSTART);
 <head><title>Choose Next Location</title></head>
 $bodytag
-<h3>There are several possibilities of where to go next</h3>
+<h3>$lt{'wherenext'}</h3>
 <p>
-Please click on the the resource you intend to access:
+$lt{'pick'}:
 <p>
 <table border=2>
-<tr><th>Title</th><th>Type</th></tr>
+<tr><th>$lt{'titleheader'}</th><th>$lt{'type'}</th></tr>
 ENDSTART
                      foreach (@possibilities) {
                         $r->print(
@@ -423,26 +434,24 @@
                               '</a></td><td>'.$multichoicehash{'type_'.$_}.
 			      '</td></tr>');
                      }
-                     $r->print('</table></body></html>');
-		     return OK;
+                     $r->print('</table>');
                   } else {
 		      my $bodytag=&Apache::loncommon::bodytag('No Resource');
-                     $r->print(<<ENDNONE);
+		      $r->print(<<ENDNONE);
 <head><title>No Resource</title></head>
 $bodytag
-<h3>Next resource could not be identified.</h3>
-<p>You probably are at the <b>beginning</b> or the <b>end</b> of the 
-course.</p>
-<ul>
-<li><a href="/adm/flip?postdata=return:">Go Back</a></li>
-<li><a href="/adm/navmaps">Navigate Course Content</a></li>
-</ul>
-</body>
-</html>
+<h3>$lt{'title'}</h3>
+<p>$lt{'explain'}</p>
 ENDNONE
-                     return OK;
-	         }
-	     }
+		  }
+		  $r->print(<<ENDMENU);
+<ul>
+<li><a href="/adm/flip?postdata=return:">$lt{'back'}</a></li>
+<li><a href="/adm/navmaps">$lt{'nav'}</a></li>
+</ul></body></html>
+ENDMENU
+                  return OK;
+	      }
 	  } else {
 # ------------------------------------------------- Problem, could not tie hash
               $env{'user.error.msg'}="/adm/flip:bre:0:1:Course Data Missing";