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

musolffc musolffc at source.lon-capa.org
Tue May 20 16:33:24 EDT 2014


musolffc		Tue May 20 20:33:24 2014 EDT

  Modified files:              
    /loncom/interface	lonmainmenu.pm 
  Log:
  Calls critical_redirect() to check for critical messages 
  
  
Index: loncom/interface/lonmainmenu.pm
diff -u loncom/interface/lonmainmenu.pm:1.10 loncom/interface/lonmainmenu.pm:1.11
--- loncom/interface/lonmainmenu.pm:1.10	Tue May 15 01:35:29 2012
+++ loncom/interface/lonmainmenu.pm	Tue May 20 20:33:24 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # displays the main menu
 #
-# $Id: lonmainmenu.pm,v 1.10 2012/05/15 01:35:29 raeburn Exp $
+# $Id: lonmainmenu.pm,v 1.11 2014/05/20 20:33:24 musolffc Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -35,13 +35,22 @@
 package Apache::lonmainmenu;
 
 use strict;
-use Apache::Constants qw(:common);
+use Apache::Constants qw(:common REDIRECT);
 use Apache::loncommon();
 use Apache::lonnet;
 use Apache::lonmenu();
 
 sub handler {
     my $r = shift;
+
+    # Check for critical messages and redirect if present.  
+    my ($redirect,$url) = &Apache::loncommon::critical_redirect(300);
+    if ($redirect) {
+        &Apache::loncommon::content_type($r,'text/html');
+        $r->header_out(Location => $url);
+        return REDIRECT;
+    }
+
     &Apache::loncommon::no_cache($r);
     &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;




More information about the LON-CAPA-cvs mailing list