--- loncom/lonnet/perl/lonnet.pm 2007/05/17 09:25:31 1.878 +++ 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.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 @@ 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;