--- loncom/interface/lonnavdisplay.pm 2012/05/13 12:04:23 1.22.4.1 +++ loncom/interface/lonnavdisplay.pm 2014/05/20 20:30:59 1.27 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA -# Navigate Maps Handler + # -# $Id: lonnavdisplay.pm,v 1.22.4.1 2012/05/13 12:04:23 raeburn Exp $ +# $Id: lonnavdisplay.pm,v 1.27 2014/05/20 20:30:59 musolffc Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,7 +30,7 @@ package Apache::lonnavdisplay; use strict; -use Apache::Constants qw(:common :http); +use Apache::Constants qw(:common :http REDIRECT); use Apache::lonmenu(); use Apache::loncommon(); use Apache::lonnavmaps(); @@ -38,7 +38,7 @@ use Apache::lonhtmlcommon(); use Apache::lonnet; use Apache::lonlocal; use Apache::londocs(); -use Time::HiRes qw( gettimeofday tv_interval ); +#use Time::HiRes qw( gettimeofday tv_interval ); sub handler { my $r = shift; @@ -59,6 +59,16 @@ 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 if ($env{'browser.mathml'}) { &Apache::loncommon::content_type($r,'text/xml'); @@ -100,7 +110,11 @@ sub real_handler { $start_page = &Apache::loncommon::start_page($title,undef,$args); } $r->print($start_page. - ''); + ''); &startContentScreen($r,'navmaps'); $r->rflush(); @@ -246,7 +260,7 @@ sub real_handler { @@ -293,8 +307,18 @@ sub startContentScreen { $r->print("\n".''."\n"); $r->print('
'); }