--- loncom/auth/lonroles.pm 2014/05/05 03:24:37 1.303 +++ loncom/auth/lonroles.pm 2014/05/20 20:46:13 1.305 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.303 2014/05/05 03:24:37 raeburn Exp $ +# $Id: lonroles.pm,v 1.305 2014/05/20 20:46:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -128,7 +128,7 @@ package Apache::lonroles; use strict; use Apache::lonnet; use Apache::lonuserstate(); -use Apache::Constants qw(:common); +use Apache::Constants qw(:common REDIRECT); use Apache::File(); use Apache::lonmenu; use Apache::loncommon; @@ -202,6 +202,14 @@ 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; + } + my $now=time; my $then=$env{'user.login.time'}; my $refresh=$env{'user.refresh.time'}; @@ -247,7 +255,7 @@ sub handler { my $envkey; my %dcroles = (); my $numdc = &check_fordc(\%dcroles,$update,$then); - my $loncaparev = $Apache::lonnet::perlvar{'lonVersion'}; + my $loncaparev = $r->dir_config('lonVersion'); # ================================================================== Roles Init if ($env{'form.selectrole'}) {