version 1.815, 2006/12/28 17:36:51
|
version 1.816.2.2, 2007/01/03 04:19:31
|
Line 3546 sub is_portfolio_url {
|
Line 3546 sub is_portfolio_url {
|
|
|
sub is_portfolio_file { |
sub is_portfolio_file { |
my ($file) = @_; |
my ($file) = @_; |
if (($file =~ /^portfolio/) || ($file =~ /^groups\/\w\/portfolio/)) { |
if (($file =~ /^portfolio/) || ($file =~ /^groups\/\w+\/portfolio/)) { |
return 1; |
return 1; |
} |
} |
return; |
return; |
Line 3558 sub is_portfolio_file {
|
Line 3558 sub is_portfolio_file {
|
sub customaccess { |
sub customaccess { |
my ($priv,$uri)=@_; |
my ($priv,$uri)=@_; |
my ($urole,$urealm)=split(/\./,$env{'request.role'},2); |
my ($urole,$urealm)=split(/\./,$env{'request.role'},2); |
my ($udom,$ucrs,$usec)=split(/\//,$urealm); |
my (undef,$udom,$ucrs,$usec)=split(/\//,$urealm); |
$udom = &LONCAPA::clean_domain($udom); |
$udom = &LONCAPA::clean_domain($udom); |
$ucrs = &LONCAPA::clean_username($ucrs); |
$ucrs = &LONCAPA::clean_username($ucrs); |
my $access=0; |
my $access=0; |
Line 4513 sub get_users_groups {
|
Line 4513 sub get_users_groups {
|
@usersgroups = split(/:/,$grouplist); |
@usersgroups = split(/:/,$grouplist); |
} else { |
} else { |
$grouplist = ''; |
$grouplist = ''; |
my %roleshash = &dump('roles',$udom,$uname,$courseid); |
my $courseurl = &courseid_to_courseurl($courseid); |
|
my %roleshash = &dump('roles',$udom,$uname,$courseurl); |
my ($tmp) = keys(%roleshash); |
my ($tmp) = keys(%roleshash); |
if ($tmp=~/^error:/) { |
if ($tmp=~/^error:/) { |
&logthis('Error retrieving roles: '.$tmp.' for '.$uname.':'.$udom); |
&logthis('Error retrieving roles: '.$tmp.' for '.$uname.':'.$udom); |
Line 4522 sub get_users_groups {
|
Line 4523 sub get_users_groups {
|
'.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$courseurl\E\/(\w+)\_gr$/) { |
my $group = $1; |
my $group = $1; |
if ($roleshash{$key} =~ /_(\d+)_(\d+)$/) { |
if ($roleshash{$key} =~ /_(\d+)_(\d+)$/) { |
my $start = $2; |
my $start = $2; |