--- loncom/interface/lonquickgrades.pm 2014/05/20 20:32:16 1.104 +++ loncom/interface/lonquickgrades.pm 2015/03/13 22:06:10 1.105 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Quick Student Grades Display # -# $Id: lonquickgrades.pm,v 1.104 2014/05/20 20:32:16 musolffc Exp $ +# $Id: lonquickgrades.pm,v 1.105 2015/03/13 22:06:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -62,14 +62,6 @@ sub handler { 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 @@ -83,6 +75,14 @@ sub real_handler { return OK; } + # 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; + } + # Send header, don't cache this page &Apache::loncommon::no_cache($r); $r->send_http_header;