version 1.746, 2006/06/07 21:15:10
|
version 1.747, 2006/06/07 21:38:25
|
Line 4655 sub files_not_in_path {
|
Line 4655 sub files_not_in_path {
|
#----------------------------------------------Get portfolio file permissions |
#----------------------------------------------Get portfolio file permissions |
|
|
sub get_portfile_permissions { |
sub get_portfile_permissions { |
# returns a reference to a hash containing contents of file_permissions.db |
|
my ($domain,$user) = @_; |
my ($domain,$user) = @_; |
my %current_permissions = &dump('file_permissions',$domain,$user); |
my %current_permissions = &dump('file_permissions',$domain,$user); |
my ($tmp)=keys(%current_permissions); |
my ($tmp)=keys(%current_permissions); |
Line 4666 sub get_portfile_permissions {
|
Line 4665 sub get_portfile_permissions {
|
#---------------------------------------------Get portfolio file access controls |
#---------------------------------------------Get portfolio file access controls |
|
|
sub get_access_controls { |
sub get_access_controls { |
# returns a hash containing access control information retrieved from |
|
# file_permissions.db. The hash contains key=value pairs where key is |
|
# the control type, end date and start date, in the form type_end_start |
|
# and value is a string containing access control settings (in XML), |
|
# |
|
# Internally access_controls are stored in file_permissions.db in an |
|
# array of arrays and a hash, where arrays are locks set when a portfolio |
|
# file has been uploaded to an essayresponse problem in a course, and |
|
# the hash contains other data. Two keys are currently defined in the hash: |
|
# access and accesscount. The value for accesscount is a scalar - equal to |
|
# the next number to use as the first part of an access control key |
|
# when defining a new control. The value for access is an anonymous hash |
|
# where keys are access controls and values are settings. |
|
# |
|
my ($current_permissions,$group,$file) = @_; |
my ($current_permissions,$group,$file) = @_; |
my @access_checks = (); |
my @access_checks = (); |
my %access; |
my %access; |
Line 7814 removeuploadedurl(): convience function
|
Line 7799 removeuploadedurl(): convience function
|
Args: |
Args: |
url: a full /uploaded/... url to delete |
url: a full /uploaded/... url to delete |
|
|
|
=item * |
|
|
|
get_portfile_permissions(): |
|
Args: |
|
domain: domain of user or course contain the portfolio files |
|
user: name of user or num of course contain the portfolio files |
|
Returns: |
|
hashref of a dump of the proper file_permissions.db |
|
|
|
|
|
=item * |
|
|
|
get_access_controls(): |
|
|
|
Args: |
|
current_permissions: the hash ref returned from get_portfile_permissions() |
|
group: (optional) the group you want the files associated with |
|
file: (optional) the file you want access info on |
|
|
|
Returns: |
|
a hash containing |
|
keys of 'control type' (possiblities?) |
|
values are XML contianing settings |
|
|
|
Internal notes: |
|
|
|
access controls are stored in file_permissions.db as array of arrays and a hash. |
|
array refs -> are locks |
|
hash refs -> all other types of controls |
|
and will contain keys |
|
|
|
'access' -> hash where keys are access controls and |
|
values are settings (in XML) |
|
|
|
'accesscount' -> scalar - equal to the next number to |
|
use as the first part of an access |
|
control key when defining a new |
|
control. |
|
|
=back |
=back |
|
|
=head2 HTTP Helper Routines |
=head2 HTTP Helper Routines |