--- loncom/auth/lonroles.pm 2011/12/14 21:02:30 1.264
+++ loncom/auth/lonroles.pm 2012/05/16 21:19:44 1.266
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.264 2011/12/14 21:02:30 raeburn Exp $
+# $Id: lonroles.pm,v 1.266 2012/05/16 21:19:44 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1613,19 +1613,17 @@ sub check_forcc {
} else {
$ccrole = 'cc';
}
- if ($cdom ne '' && $cnum ne '') {
- if (&Apache::lonnet::is_course($cdom,$cnum)) {
- my $envkey = 'user.role.'.$ccrole.'./'.$cdom.'/'.$cnum;
- if (defined($env{$envkey})) {
- $is_cc = 1;
- my ($tstart,$tend)=split(/\./,$env{$envkey});
- my $limit = $update;
- if ($env{'request.role'} eq $ccrole.'./'.$cdom.'/'.$cnum) {
- $limit = $then;
- }
- if ($tstart && $tstart>$refresh) { $is_cc = 0; }
- if ($tend && $tend <$limit) { $is_cc = 0; }
+ if (&Apache::lonnet::is_course($cdom,$cnum)) {
+ my $envkey = 'user.role.'.$ccrole.'./'.$cdom.'/'.$cnum;
+ if (defined($env{$envkey})) {
+ $is_cc = 1;
+ my ($tstart,$tend)=split(/\./,$env{$envkey});
+ my $limit = $update;
+ if ($env{'request.role'} eq $ccrole.'./'.$cdom.'/'.$cnum) {
+ $limit = $then;
}
+ if ($tstart && $tstart>$refresh) { $is_cc = 0; }
+ if ($tend && $tend <$limit) { $is_cc = 0; }
}
}
return $is_cc;
@@ -2236,7 +2234,7 @@ sub update_session_roles {
}
$msg .= '';
} else {
- $msg = ' '.$rolesmsg.'
';
+ $msg = ' '.$rolesmsg.'
';
}
return $msg;
}