--- loncom/lonnet/perl/lonnet.pm 2006/06/07 21:15:10 1.746 +++ loncom/lonnet/perl/lonnet.pm 2006/06/07 21:38:25 1.747 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.746 2006/06/07 21:15:10 raeburn Exp $ +# $Id: lonnet.pm,v 1.747 2006/06/07 21:38:25 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4655,7 +4655,6 @@ sub files_not_in_path { #----------------------------------------------Get portfolio file permissions sub get_portfile_permissions { - # returns a reference to a hash containing contents of file_permissions.db my ($domain,$user) = @_; my %current_permissions = &dump('file_permissions',$domain,$user); my ($tmp)=keys(%current_permissions); @@ -4666,20 +4665,6 @@ sub get_portfile_permissions { #---------------------------------------------Get portfolio file 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 @access_checks = (); my %access; @@ -7814,6 +7799,45 @@ removeuploadedurl(): convience function Args: 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 =head2 HTTP Helper Routines