version 1.947, 2008/03/09 17:22:21
|
version 1.948, 2008/03/10 23:26:28
|
Line 2449 sub userrolelog {
|
Line 2449 sub userrolelog {
|
} |
} |
|
|
sub get_course_adv_roles { |
sub get_course_adv_roles { |
my $cid=shift; |
my ($cid,$codes) = @_; |
$cid=$env{'request.course.id'} unless (defined($cid)); |
$cid=$env{'request.course.id'} unless (defined($cid)); |
my %coursehash=&coursedescription($cid); |
my %coursehash=&coursedescription($cid); |
my %nothide=(); |
my %nothide=(); |
Line 2474 sub get_course_adv_roles {
|
Line 2474 sub get_course_adv_roles {
|
if ((&privileged($username,$domain)) && |
if ((&privileged($username,$domain)) && |
(!$nothide{$username.':'.$domain})) { next; } |
(!$nothide{$username.':'.$domain})) { next; } |
if ($role eq 'cr') { next; } |
if ($role eq 'cr') { next; } |
my $key=&plaintext($role); |
if ($codes) { |
if ($section) { $key.=' (Sec/Grp '.$section.')'; } |
if ($section) { $role .= ':'.$section; } |
if ($returnhash{$key}) { |
if ($returnhash{$role}) { |
$returnhash{$key}.=','.$username.':'.$domain; |
$returnhash{$role}.=','.$username.':'.$domain; |
|
} else { |
|
$returnhash{$role}=$username.':'.$domain; |
|
} |
} else { |
} else { |
$returnhash{$key}=$username.':'.$domain; |
my $key=&plaintext($role); |
|
if ($section) { $key.=' (Section '.$section.')'; } |
|
if ($returnhash{$key}) { |
|
$returnhash{$key}.=','.$username.':'.$domain; |
|
} else { |
|
$returnhash{$key}=$username.':'.$domain; |
|
} |
} |
} |
} |
} |
return %returnhash; |
return %returnhash; |
} |
} |
|
|