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

raeburn raeburn at source.lon-capa.org
Sat Nov 10 08:58:31 EST 2012


raeburn		Sat Nov 10 13:58:31 2012 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Update documentation.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1195 loncom/lonnet/perl/lonnet.pm:1.1196
--- loncom/lonnet/perl/lonnet.pm:1.1195	Fri Nov  9 17:27:18 2012
+++ loncom/lonnet/perl/lonnet.pm	Sat Nov 10 13:58:31 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1195 2012/11/09 17:27:18 raeburn Exp $
+# $Id: lonnet.pm,v 1.1196 2012/11/10 13:58:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2653,13 +2653,16 @@
 # (b) When displaying folder contents in course editor, used to determine if
 #     "Edit" link will be displayed alongside resource.
 #
-#  input: 3 args -- filename (decluttered), course number and course domain.
-#  output: array of four scalars -- 
+#  input: six args -- filename (decluttered), course number, course domain,
+#                   url, symb (if registered) and group (if this is a group
+#                   item -- e.g., bulletin board, group page etc.).
+#  output: array of five scalars -- 
 #          $cfile -- url for file editing if editable on current server
 #          $home -- homeserver of resource (i.e., for author if published,
 #                                           or course if uploaded.).
 #          $switchserver --  1 if server switch will be needed.
-#          $uploaded -- 1 if resource is a file uploaded to a course.
+#          $forceedit -- 1 if icon/link should be to go to edit mode 
+#          $forceview -- 1 if icon/link should be to go to view mode
 #
 
 sub can_edit_resource {
@@ -12260,9 +12263,10 @@
 =item *
 
 in_course($udom,$uname,$cdom,$cnum,$type,$hideprivileged) : determine if
-user: $uname:$udom has a role in the course: $cdom_$cnum. Additional
-optional arguments are: $type (if role checking is to be restricted to
-certain user status types -- previous (expired roles), active (currently
+user: $uname:$udom has a role in the course: $cdom_$cnum. 
+
+Additional optional arguments are: $type (if role checking is to be restricted 
+to certain user status types -- previous (expired roles), active (currently
 available roles) or future (roles available in the future), and
 $hideprivileged -- if true will not report course roles for users who
 have active Domain Coordinator or Super User roles.
@@ -12631,22 +12635,20 @@
 
 =item * 
 
-can_edit_resource($file,$cnum,$cdom,$resurl,$symb,$group)
-
-Determine if the current user should be able to edit a particular resource,
+can_edit_resource($file,$cnum,$cdom,$resurl,$symb,$group) : determine if current user can edit a particular resource,
 when viewing in course context.
-(a) When viewing resource used to determine if "Edit" item is included in
-     Functions.
-(b) When displaying folder contents in course editor, used to determine if
-    "Edit" link will be displayed alongside resource.
 
- input: 3 args -- filename (decluttered), course number and course domain.
- output: array of four scalars --
+ input: six args -- filename (decluttered), course number, course domain,
+                    url, symb (if registered) and group (if this is a 
+                    group item -- e.g., bulletin board, group page etc.).
+
+ output: array of five scalars --
          $cfile -- url for file editing if editable on current server
          $home -- homeserver of resource (i.e., for author if published,
                                           or course if uploaded.).
          $switchserver --  1 if server switch will be needed.
-         $uploaded -- 1 if resource is a file uploaded to a course.
+         $forceedit -- 1 if icon/link should be to go to edit mode 
+         $forceview -- 1 if icon/link should be to go to view mode
 
 =item *
 




More information about the LON-CAPA-cvs mailing list