--- rat/lonpageflip.pm 2002/09/07 02:55:38 1.30 +++ rat/lonpageflip.pm 2002/10/10 19:05:32 1.31 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.30 2002/09/07 02:55:38 www Exp $ +# $Id: lonpageflip.pm,v 1.31 2002/10/10 19:05:32 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -285,6 +285,20 @@ sub handler { # ============================================== Do not return before this line if ($redirecturl) { # ----------------------------------------------------- There is a URL to go to +# ------------------------------------------------- Check for critical messages + if ((time-$ENV{'user.criticalcheck.time'})>300) { + my @what=&Apache::lonnet::dump + ('critical',$ENV{'user.domain'}, + $ENV{'user.name'}); + if ($what[0]) { + if (($what[0] ne 'con_lost') && + ($what[0]!~/^error\:/)) { + $redirecturl='/adm/email?critical=display'; + } + } + &Apache::lonnet::appenv('user.criticalcheck.time'=>time); + } + $r->content_type('text/html'); $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$redirecturl);