--- loncom/auth/lonroles.pm 2006/03/16 19:19:59 1.146 +++ loncom/auth/lonroles.pm 2006/05/15 17:45:46 1.148 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.146 2006/03/16 19:19:59 raeburn Exp $ +# $Id: lonroles.pm,v 1.148 2006/05/15 17:45:46 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -55,24 +55,21 @@ sub redirect_user { } else { $navwindow.=&Apache::lonnavmaps::close(); } - my $bodytag=&Apache::loncommon::bodytag('Switching Role'); + my $start_page = &Apache::loncommon::start_page('Switching Role',undef, + {'redirect' => [1,$url],}); + my $end_page = &Apache::loncommon::end_page(); + # Note to style police: # This must only replace the spaces, nothing else, or it bombs elsewhere. $url=~s/ /\%20/g; $r->print(<$title - - - -$bodytag +$start_page $navwindow

$msg

-Continue - - +$end_page ENDREDIR return; } @@ -86,6 +83,7 @@ sub handler { my $envkey; my %dcroles = (); my $numdc = &check_fordc(\%dcroles,$then); + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); # ================================================================== Roles Init if ($env{'form.selectrole'}) { @@ -159,8 +157,9 @@ sub handler { &Apache::loncommon::no_cache($r); $r->send_http_header; my $swinfo=&Apache::lonmenu::rawconfig(); - my $bodytag=&Apache::loncommon::bodytag + my $start_page=&Apache::loncommon::start_page ('Verifying Access Key to Unlock this Course'); + my $end_page=&Apache::loncommon::end_page(); my $buttontext=&mt('Enter Course'); my $message=&mt('Successfully registered key'); my $assignresult= @@ -180,10 +179,7 @@ sub handler { $buttontext=&mt('Re-Enter Key'); } $r->print(<Verifying Course Access Key - - -$bodytag +$start_page @@ -193,7 +189,7 @@ $swinfo $message
- +$end_page ENDENTEREDKEY return OK; } else { @@ -202,13 +198,11 @@ ENDENTEREDKEY &Apache::loncommon::no_cache($r); $r->send_http_header; my $swinfo=&Apache::lonmenu::rawconfig(); - my $bodytag=&Apache::loncommon::bodytag + my $start_page=&Apache::loncommon::start_page ('Enter Access Key to Unlock this Course'); + my $end_page=&Apache::loncommon::end_page(); $r->print(<Entering Course Access Key - - -$bodytag +$start_page @@ -218,7 +212,7 @@ $swinfo - +$end_page ENDENTERKEY return OK; } @@ -329,16 +323,12 @@ ENDENTERKEY return OK if $r->header_only; my $swinfo=&Apache::lonmenu::rawconfig(); - my $bodytag=&Apache::loncommon::bodytag('User Roles'); + 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','User Roles',1,undef,undef,undef,undef,,&mt("Click here for help")).'
'; $r->print(< - -LON-CAPA User Roles - -$bodytag +$start_page $helptag
'); - $r->print(''); + $r->print(&Apache::loncommon::end_page()); return OK; } # More than one possible role @@ -767,7 +758,7 @@ ENDHEADER $r->dir_config('lonVersion').'
'. ''.&mt('Logout').'

'); } - $r->print("\n"); + $r->print(&Apache::loncommon::end_page()); return OK; }