--- loncom/auth/lonroles.pm 2014/03/25 10:18:04 1.256.2.7 +++ loncom/auth/lonroles.pm 2010/09/02 17:06:38 1.259 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.256.2.7 2014/03/25 10:18:04 raeburn Exp $ +# $Id: lonroles.pm,v 1.259 2010/09/02 17:06:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -57,8 +57,7 @@ course they should act on, etc. Both in handler determines via C's C<&allowed> function that a certain action is not allowed, C is used as error handler. This allows the user to select another role which may have permission to do -what they were trying to do. C can also be accessed via the -B button in the Remote Control. +what they were trying to do. =begin latex @@ -142,22 +141,14 @@ use Apache::loncoursequeueadmin; use GDBM_File; use LONCAPA qw(:DEFAULT :match); use HTML::Entities; - + sub redirect_user { - my ($r,$title,$url,$msg,$launch_nav) = @_; + my ($r,$title,$url,$msg) = @_; $msg = $title if (! defined($msg)); &Apache::loncommon::content_type($r,'text/html'); &Apache::loncommon::no_cache($r); $r->send_http_header; - my $swinfo=&Apache::lonmenu::rawconfig(); - my $navwindow; - if ($launch_nav eq 'on') { - $navwindow.=&Apache::lonnavdisplay::launch_win('now',undef,undef, - ($url =~ m-^/adm/whatsnew-)); - } else { - $navwindow.=&Apache::lonnavmaps::close(); - } # Breadcrumbs my $brcrum = [{'href' => $url, @@ -172,12 +163,6 @@ sub redirect_user { $url=~s/ /\%20/g; $r->print(< -// - -$navwindow

$msg

$end_page ENDREDIR @@ -557,8 +542,7 @@ ENDENTERKEY } &redirect_user($r, &mt('Entering [_1]', $env{'course.'.$courseid.'.description'}), - $dest, $msg, - $env{'environment.remotenavmap'}); + $dest, $msg); return OK; } if (&Apache::lonnet::allowed('whn', @@ -571,26 +555,22 @@ ENDENTERKEY unless ($startpage eq 'firstres') { $msg = &mt('Entering [_1] ...', $env{'course.'.$courseid.'.description'}); - &redirect_user($r,&mt('New in course'), - '/adm/whatsnew?refpage=start',$msg, - $env{'environment.remotenavmap'}); + &redirect_user($r, &mt('New in course'), + '/adm/whatsnew?refpage=start', $msg); return OK; } } } # Are we allowed to look at the first resource? - if (($furl !~ m|^/adm/|) || - (($env{'environment.remotenavmap'} eq 'on') && - ($furl =~ m{^/adm/navmaps}))) { + if ($furl !~ m|^/adm/|) { # Guess not ... $furl=&Apache::lonpageflip::first_accessible_resource(); } $msg = &mt('Entering [_1] ...', $env{'course.'.$courseid.'.description'}); - &redirect_user($r,&mt('Entering [_1]', - $env{'course.'.$courseid.'.description'}), - $furl,$msg, - $env{'environment.remotenavmap'}); + &redirect_user($r, &mt('Entering [_1]', + $env{'course.'.$courseid.'.description'}), + $furl, $msg); } return OK; } @@ -1604,7 +1584,7 @@ sub check_release_required { my $otherserver; if (($major eq '' && $minor eq '') || (($reqdmajor > $major) || (($reqdmajor == $major) && ($reqdminor > $minor)))) { - my ($userdomserver) = &Apache::lonnet::choose_server($env{'user.domain'},undef,$required); + my ($userdomserver) = &Apache::lonnet::choose_server($env{'user.domain'}); my $switchlcrev = &Apache::lonnet::get_server_loncaparev($env{'user.domain'}, $userdomserver); @@ -1763,7 +1743,7 @@ sub display_cc_role { my %newhash=&Apache::lonnet::coursedescription($tcourseid); if (%newhash) { $twhere=$newhash{'description'}. - ' '. + ' '. &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom). ''; $ttype = $newhash{'type'}; @@ -1849,8 +1829,7 @@ course they should act on, etc. Both in handler determines via C's C<&allowed> function that a certain action is not allowed, C is used as error handler. This allows the user to select another role which may have permission to do -what they were trying to do. C can also be accessed via the -B button in the Remote Control. +what they were trying to do. =begin latex