version 1.895, 2007/06/25 23:08:55
|
version 1.896, 2007/07/13 18:35:39
|
Line 3807 sub customaccess {
|
Line 3807 sub customaccess {
|
my ($effect,$realm,$role,$type)=split(/\:/,$right); |
my ($effect,$realm,$role,$type)=split(/\:/,$right); |
if ($type eq 'user') { |
if ($type eq 'user') { |
foreach my $scope (split(/\s*\,\s*/,$realm)) { |
foreach my $scope (split(/\s*\,\s*/,$realm)) { |
my ($tdom,$tcrs)=split(/\_/,$scope); |
my ($tdom,$tuname)=split(m{/},$scope); |
if ($tdom) { |
if ($tdom) { |
if ($tdom ne $env{'user.domain'}) { next; } |
if ($tdom ne $env{'user.domain'}) { next; } |
} |
} |
if ($tcrs) { |
if ($tuname) { |
if ($tcrs ne $env{'user.name'}) { next; } |
if ($tuname ne $env{'user.name'}) { next; } |
} |
} |
$access=($effect eq 'allow'); |
$access=($effect eq 'allow'); |
last; |
last; |
Line 7098 sub getCODE {
|
Line 7098 sub getCODE {
|
sub rndseed { |
sub rndseed { |
my ($symb,$courseid,$domain,$username)=@_; |
my ($symb,$courseid,$domain,$username)=@_; |
my ($wsymb,$wcourseid,$wdomain,$wusername)=&whichuser(); |
my ($wsymb,$wcourseid,$wdomain,$wusername)=&whichuser(); |
if (!$symb) { |
if (!defined($symb)) { |
unless ($symb=$wsymb) { return time; } |
unless ($symb=$wsymb) { return time; } |
} |
} |
if (!$courseid) { $courseid=$wcourseid; } |
if (!$courseid) { $courseid=$wcourseid; } |