version 1.995, 2009/05/05 00:42:35
|
version 1.997, 2009/05/08 01:43:50
|
Line 2709 sub courserolelog {
|
Line 2709 sub courserolelog {
|
$storehash{'section'} = $sec; |
$storehash{'section'} = $sec; |
} |
} |
&instructor_log($namespace,\%storehash,$delflag,$username,$domain,$cnum,$cdom); |
&instructor_log($namespace,\%storehash,$delflag,$username,$domain,$cnum,$cdom); |
|
if (($trole ne 'st') || ($sec ne '')) { |
|
&devalidate_cache_new('getcourseroles',$cdom.'_'.$cnum); |
|
} |
} |
} |
} |
} |
return; |
return; |
Line 2731 sub get_course_adv_roles {
|
Line 2734 sub get_course_adv_roles {
|
my %dumphash= |
my %dumphash= |
&dump('nohist_userroles',$coursehash{'domain'},$coursehash{'num'}); |
&dump('nohist_userroles',$coursehash{'domain'},$coursehash{'num'}); |
my $now=time; |
my $now=time; |
|
my %privileged; |
foreach my $entry (keys %dumphash) { |
foreach my $entry (keys %dumphash) { |
my ($tend,$tstart)=split(/\:/,$dumphash{$entry}); |
my ($tend,$tstart)=split(/\:/,$dumphash{$entry}); |
if (($tstart) && ($tstart<0)) { next; } |
if (($tstart) && ($tstart<0)) { next; } |
Line 2738 sub get_course_adv_roles {
|
Line 2742 sub get_course_adv_roles {
|
if (($tstart) && ($now<$tstart)) { next; } |
if (($tstart) && ($now<$tstart)) { next; } |
my ($role,$username,$domain,$section)=split(/\:/,$entry); |
my ($role,$username,$domain,$section)=split(/\:/,$entry); |
if ($username eq '' || $domain eq '') { next; } |
if ($username eq '' || $domain eq '') { next; } |
if ((&privileged($username,$domain)) && |
unless (ref($privileged{$domain}) eq 'HASH') { |
(!$nothide{$username.':'.$domain})) { next; } |
my %dompersonnel = |
|
&Apache::lonnet::get_domain_roles($domain,['dc'],undef,$now); |
|
$privileged{$domain} = {}; |
|
foreach my $server (keys(%dompersonnel)) { |
|
if(ref($dompersonnel{$server}) eq 'HASH') { |
|
foreach my $user (keys(%{$dompersonnel{$server}})) { |
|
my ($trole,$uname,$udom) = split(/:/,$user); |
|
$privileged{$udom}{$uname} = 1; |
|
} |
|
} |
|
} |
|
} |
|
if ((exists($privileged{$domain}{$username})) && |
|
(!$nothide{$username.':'.$domain})) { next; } |
if ($role eq 'cr') { next; } |
if ($role eq 'cr') { next; } |
if ($codes) { |
if ($codes) { |
if ($section) { $role .= ':'.$section; } |
if ($section) { $role .= ':'.$section; } |