version 1.295.2.27, 2010/01/20 02:57:09
|
version 1.295.2.28, 2010/01/20 14:35:36
|
Line 1484 sub display_existing_roles {
|
Line 1484 sub display_existing_roles {
|
if ($area =~ m{^/($match_domain)/($match_courseid)} ) { |
if ($area =~ m{^/($match_domain)/($match_courseid)} ) { |
$class='Course'; |
$class='Course'; |
my ($coursedom,$coursedir) = ($1,$2); |
my ($coursedom,$coursedir) = ($1,$2); |
$sortkey.="\0$coursedom"; |
my $cid = $1.'_'.$2; |
# $1.'_'.$2 is the course id (eg. 103_12345abcef103l3). |
# $1.'_'.$2 is the course id (eg. 103_12345abcef103l3). |
my %coursedata= |
my %coursedata= |
&Apache::lonnet::coursedescription($1.'_'.$2); |
&Apache::lonnet::coursedescription($cid); |
if ($coursedir =~ /^$match_community$/) { |
if ($coursedir =~ /^$match_community$/) { |
$class='Community'; |
$class='Community'; |
} |
} |
Line 1509 sub display_existing_roles {
|
Line 1509 sub display_existing_roles {
|
} |
} |
} |
} |
$sortkey.="\0$coursedir"; |
$sortkey.="\0$coursedir"; |
$inccourses->{$1.'_'.$2}=1; |
$inccourses->{$cid}=1; |
if ((&Apache::lonnet::allowed('c'.$role_code,$1.'/'.$2)) || |
if ((&Apache::lonnet::allowed('c'.$role_code,$coursedom.'/'.$coursedir)) || |
(&Apache::lonnet::allowed('c'.$role_code,$ccdomain))) { |
(&Apache::lonnet::allowed('c'.$role_code,$ccdomain))) { |
$allowed=1; |
$allowed=1; |
} |
} |
Line 1524 sub display_existing_roles {
|
Line 1524 sub display_existing_roles {
|
} |
} |
} |
} |
} |
} |
if ((&Apache::lonnet::allowed('dro',$1)) || |
if ((&Apache::lonnet::allowed('dro',$coursedom)) || |
(&Apache::lonnet::allowed('dro',$ccdomain))) { |
(&Apache::lonnet::allowed('dro',$ccdomain))) { |
$delallowed=1; |
$delallowed=1; |
} |
} |
# - custom role. Needs more info, too |
# - custom role. Needs more info, too |
if ($croletitle) { |
if ($croletitle) { |
if (&Apache::lonnet::allowed('ccr',$1.'/'.$2)) { |
if (&Apache::lonnet::allowed('ccr',$coursedom.'/'.$coursedir)) { |
$allowed=1; |
$allowed=1; |
$thisrole.='.'.$role_code; |
$thisrole.='.'.$role_code; |
} |
} |