--- loncom/auth/lonroles.pm 2006/06/29 17:51:37 1.162.2.1 +++ loncom/auth/lonroles.pm 2006/12/01 21:52:29 1.171 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.162.2.1 2006/06/29 17:51:37 albertel Exp $ +# $Id: lonroles.pm,v 1.171 2006/12/01 21:52:29 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,8 +40,9 @@ use Apache::lonhtmlcommon; use Apache::lonannounce; use Apache::lonlocal; use Apache::lonpageflip(); +use Apache::lonnavdisplay(); use GDBM_File; -use LONCAPA; +use LONCAPA qw(:DEFAULT :match); sub redirect_user { @@ -53,8 +54,8 @@ sub redirect_user { my $swinfo=&Apache::lonmenu::rawconfig(); my $navwindow; if ($launch_nav eq 'on') { - $navwindow.=&Apache::lonnavmaps::launch_win('now',undef,undef, - ($url =~ m-^/adm/whatsnew-)); + $navwindow.=&Apache::lonnavdisplay::launch_win('now',undef,undef, + ($url =~ m-^/adm/whatsnew-)); } else { $navwindow.=&Apache::lonnavmaps::close(); } @@ -125,7 +126,7 @@ sub handler { if ($numdc > 0) { foreach my $envkey (keys %env) { if (my ($domain,$coursenum) = - ($envkey =~ m-^form\.cc\./(\w+)/(\w+)$-)) { + ($envkey =~ m-^form\.cc\./($match_domain)/($match_courseid)$-)) { if ($dcroles{$domain}) { &check_privs($domain,$coursenum,$then,$now); } @@ -312,7 +313,7 @@ ENDENTERKEY } } # Are we allowed to look at the first resource? - if (!&Apache::lonnet::allowed('bre',$furl)) { + if ($furl !~ m|^/adm/|) { # Guess not ... $furl=&Apache::lonpageflip::first_accessible_resource(); } @@ -364,10 +365,10 @@ ENDENTERKEY my $start_page=&Apache::loncommon::start_page('User Roles'); my $standby=&mt('Role selected. Please stand by.'); $standby=~s/\n/\\n/g; - my $helptag='
'.&Apache::loncommon::help_open_menu('General Intro','General_Intro',1,undef,undef,undef,undef,&mt("Click here for help")).'
'; + $r->print(< +