--- loncom/auth/lonroles.pm 2010/07/30 20:35:16 1.255
+++ loncom/auth/lonroles.pm 2010/09/02 17:08:28 1.256.2.4
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.255 2010/07/30 20:35:16 raeburn Exp $
+# $Id: lonroles.pm,v 1.256.2.4 2010/09/02 17:08:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -57,7 +57,8 @@ 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.
+what they were trying to do. C can also be accessed via the
+B button in the Remote Control.
=begin latex
@@ -141,14 +142,22 @@ use Apache::loncoursequeueadmin;
use GDBM_File;
use LONCAPA qw(:DEFAULT :match);
use HTML::Entities;
-
+
sub redirect_user {
- my ($r,$title,$url,$msg) = @_;
+ my ($r,$title,$url,$msg,$launch_nav) = @_;
$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,
@@ -163,6 +172,12 @@ sub redirect_user {
$url=~s/ /\%20/g;
$r->print(<
+//
+
+$navwindow
$msg
$end_page
ENDREDIR
@@ -329,33 +344,34 @@ sub handler {
my @ids = &Apache::lonnet::current_machine_ids();
unless ($loncaparev eq '' && $home && grep(/^\Q$home\E$/,@ids)) {
my %curr_reqd_hash = &Apache::lonnet::userenvironment($cdom,$cnum,'internal.releaserequired');
- if ($curr_reqd_hash{'internal.releaserequired'} &&
- $curr_reqd_hash{'internal.releaserequired'} > $loncaparev) {
+ if ($curr_reqd_hash{'internal.releaserequired'} ne '') {
my ($switchserver,$switchwarning) =
&check_release_required($loncaparev,$cdom.'_'.$cnum,$trolecode,$curr_reqd_hash{'internal.releaserequired'});
- &Apache::loncommon::content_type($r,'text/html');
- &Apache::loncommon::no_cache($r);
- $r->send_http_header;
- my $end_page=&Apache::loncommon::end_page();
- $r->print(&Apache::loncommon::start_page('Selected course unavailable on this server').
- '
');
- } elsif ($switchserver) {
- $r->print(&mt('This course requires a newer version of LON-CAPA than is installed on this server.').
- ' '.
- ''.
- &mt('Switch Server').
- '');
+ $r->print('