--- loncom/auth/lonroles.pm 2014/03/19 16:20:36 1.299
+++ loncom/auth/lonroles.pm 2014/05/04 21:49:05 1.302
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.299 2014/03/19 16:20:36 musolffc Exp $
+# $Id: lonroles.pm,v 1.302 2014/05/04 21:49:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -664,9 +664,9 @@ ENDENTERKEY
}
}
}
-
- # If it's an external resource,
+ # Are we allowed to look at the first resource?
if ($furl =~ m{^(/adm/wrapper|)/ext/}) {
+ # If it's an external resource,
# strip off the symb argument and possible query
my ($exturl,$symb) = ($furl =~ m{^(.+)(?:\?|\&)symb=(.+)$});
# Unencode $symb
@@ -675,7 +675,7 @@ ENDENTERKEY
if (!&Apache::lonnet::allowed('bre',$exturl,$symb)) {
$furl = &Apache::lonpageflip::first_accessible_resource();
}
- # For local resources just check for permission
+ # For other resources just check for permission
} elsif (!&Apache::lonnet::allowed('bre',$furl)) {
$furl = &Apache::lonpageflip::first_accessible_resource();
}
@@ -746,7 +746,12 @@ ENDENTERKEY
my $swinfo=&Apache::lonmenu::rawconfig();
my $start_page=&Apache::loncommon::start_page($pagetitle,undef,{bread_crumbs=>$brcrum});
- my $funcs = &get_roles_functions($showcount);
+ my %domdefs=&Apache::lonnet::get_domain_defaults($env{'user.domain'});
+ my $cattype = 'std';
+ if ($domdefs{'catauth'}) {
+ $cattype = $domdefs{'catauth'};
+ }
+ my $funcs = &get_roles_functions($showcount,$cattype);
$standby=~s/\n/\\n/g;
my $noscript='
'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'
'.&mt('As this is not the case, most functionality in the system will be unavailable.').'
';
@@ -889,7 +894,7 @@ ENDHEADER
\%sortrole,\%roleclass,\%futureroles,\%timezones,$loncaparev);
$refresh = $now;
&Apache::lonnet::appenv({'user.refresh.time' => $refresh});
- unless ($env{'user.adv'}) {
+ if ((($cattype eq 'std') || ($cattype eq 'domonly')) && (!$env{'user.adv'})) {
if ($countactive > 0) {
my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');
my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');
@@ -918,8 +923,7 @@ ENDHEADER
} else {
$r->print('
'.&mt('The [_1]Course/Community Catalog[_2] provides information about all [_3] classes for which LON-CAPA courses have been created, as well as any communities in the domain.','','',$domdesc).'
');
- $r->print(&mt('You can search for courses and communities which permit self-enrollment, if you would like to enroll in one.').'
'.&mt('The [_1]Course/Community Catalog[_2] provides information about all [_3] classes for which LON-CAPA courses have been created, as well as any communities in the domain.','','',$domdesc).'
');
+ $r->print(&mt('You can search for courses and communities which permit self-enrollment, if you would like to enroll in one.').'