--- loncom/lonnet/perl/lonnet.pm 2007/05/17 09:24:06 1.877 +++ loncom/lonnet/perl/lonnet.pm 2007/05/17 09:31:13 1.879 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.877 2007/05/17 09:24:06 foxr Exp $ +# $Id: lonnet.pm,v 1.879 2007/05/17 09:31:13 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5912,7 +5912,13 @@ sub devalidatecourseresdata { # --------------------------------------------------- Course Resourcedata Query - +# +# Parameters: +# $coursenum - Number of the course. +# $coursedomain - Domain at which the course was created. +# Returns: +# A hash of the course parameters along (I think) with timestamps +# and version info. sub get_courseresdata { my ($coursenum,$coursedomain)=@_; @@ -5971,7 +5977,21 @@ sub get_userresdata { } 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;