--- loncom/auth/lonroles.pm 2015/03/11 04:53:15 1.269.2.22 +++ loncom/auth/lonroles.pm 2015/04/20 12:11:02 1.269.2.23 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.269.2.22 2015/03/11 04:53:15 raeburn Exp $ +# $Id: lonroles.pm,v 1.269.2.23 2015/04/20 12:11:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -663,6 +663,7 @@ ENDENTERKEY } } # Are we allowed to look at the first resource? + my $access; if ($furl =~ m{^(/adm/wrapper|)/ext/}) { # If it's an external resource, # strip off the symb argument and possible query @@ -670,14 +671,16 @@ ENDENTERKEY # Unencode $symb $symb = &unescape($symb); # Then check for permission - if (!&Apache::lonnet::allowed('bre',$exturl,$symb)) { - $furl = &Apache::lonpageflip::first_accessible_resource(); - } + $access = &Apache::lonnet::allowed('bre',$exturl,$symb); # For other resources just check for permission - } elsif (!&Apache::lonnet::allowed('bre',$furl)) { + } else { + $access = &Apache::lonnet::allowed('bre',$furl); + } + if (!$access) { $furl = &Apache::lonpageflip::first_accessible_resource(); + } elsif ($access eq 'B') { + $furl = '/adm/navmaps?showOnlyHomework=1'; } - $msg = &mt('Entering [_1] ...', $env{'course.'.$cdom.'_'.$cnum.'.description'}); &redirect_user($r, &mt('Entering [_1]',