[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Thu, 17 May 2007 09:31:16 -0000
foxr Thu May 17 05:31:16 2007 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
Add comment documentation for resdata
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.878 loncom/lonnet/perl/lonnet.pm:1.879
--- loncom/lonnet/perl/lonnet.pm:1.878 Thu May 17 05:25:31 2007
+++ loncom/lonnet/perl/lonnet.pm Thu May 17 05:31:13 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.878 2007/05/17 09:25:31 foxr Exp $
+# $Id: lonnet.pm,v 1.879 2007/05/17 09:31:13 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5977,7 +5977,21 @@
}
return $tmp;
}
-
+#----------------------------------------------- resdata - return resource data
+# Purpose:
+# Return resource data for either users or for a course.
+# Parameters:
+# $name - Course/user name.
+# $domain - Name of the domain the user/course is registered on.
+# $type - Type of thing $name is (must be 'course' or 'user'
+# @which - Array of names of resources desired.
+# Returns:
+# The value of the first reasource in @which that is found in the
+# resource hash.
+# Exceptional Conditions:
+# If the $type passed in is not valid (not the string 'course' or
+# 'user', an undefined reference is returned.
+# If none of the resources are found, an undef is returned
sub resdata {
my ($name,$domain,$type,@which)=@_;
my $result;