[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 07 Jun 2006 21:38:25 -0000


albertel		Wed Jun  7 17:38:25 2006 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - moving docs to proper location
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.746 loncom/lonnet/perl/lonnet.pm:1.747
--- loncom/lonnet/perl/lonnet.pm:1.746	Wed Jun  7 17:15:10 2006
+++ loncom/lonnet/perl/lonnet.pm	Wed Jun  7 17:38:25 2006
@@ -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 @@
 #----------------------------------------------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 @@
 #---------------------------------------------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 @@
   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