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

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


musolffc		Tue May 20 20:32:16 2014 EDT

  Modified files:              
    /loncom/interface	lonquickgrades.pm 
  Log:
  Calls critical_redirect() to check for critical messages 
  
  
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.103 loncom/interface/lonquickgrades.pm:1.104
--- loncom/interface/lonquickgrades.pm:1.103	Mon Jan  2 05:08:03 2012
+++ loncom/interface/lonquickgrades.pm	Tue May 20 20:32:16 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Quick Student Grades Display
 #
-# $Id: lonquickgrades.pm,v 1.103 2012/01/02 05:08:03 raeburn Exp $
+# $Id: lonquickgrades.pm,v 1.104 2014/05/20 20:32:16 musolffc Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -29,7 +29,7 @@
 package Apache::lonquickgrades;
 
 use strict;
-use Apache::Constants qw(:common :http);
+use Apache::Constants qw(:common :http REDIRECT);
 use POSIX;
 use Apache::loncommon;
 use Apache::lonlocal;
@@ -62,6 +62,14 @@
 sub real_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::get_unprocessed_cgi($ENV{QUERY_STRING});
 
     # Handle header-only request




More information about the LON-CAPA-cvs mailing list