version 1.733, 2006/05/01 06:17:32
|
version 1.734, 2006/05/01 16:00:44
|
Line 4024 sub get_users_groups {
|
Line 4024 sub get_users_groups {
|
my $hashid="$udom:$uname:$courseid"; |
my $hashid="$udom:$uname:$courseid"; |
my ($grouplist,$cached)=&is_cached_new('getgroups',$hashid); |
my ($grouplist,$cached)=&is_cached_new('getgroups',$hashid); |
if (defined($cached)) { |
if (defined($cached)) { |
@usersgroups = split/:/,$grouplist; |
@usersgroups = split(/:/,$grouplist); |
} else { |
} else { |
$grouplist = ''; |
$grouplist = ''; |
my %roleshash = &dump('roles',$udom,$uname,$courseid); |
my %roleshash = &dump('roles',$udom,$uname,$courseid); |
Line 4035 sub get_users_groups {
|
Line 4035 sub get_users_groups {
|
my $access_end = $env{'course.'.$courseid. |
my $access_end = $env{'course.'.$courseid. |
'.default_enrollment_end_date'}; |
'.default_enrollment_end_date'}; |
my $now = time; |
my $now = time; |
foreach my $key (keys %roleshash) { |
foreach my $key (keys(%roleshash)) { |
if ($key =~ /^\Q$courseid\E\/(\w+)\_gr$/) { |
if ($key =~ /^\Q$courseid\E\/(\w+)\_gr$/) { |
my $group = $1; |
my $group = $1; |
if ($roleshash{$key} =~ /_(\d+)_(\d+)$/) { |
if ($roleshash{$key} =~ /_(\d+)_(\d+)$/) { |