--- loncom/lonnet/perl/lonnet.pm 2007/05/17 09:25:31 1.878 +++ loncom/lonnet/perl/lonnet.pm 2007/05/22 21:56:32 1.880 @@ -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.880 2007/05/22 21:56:32 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -770,7 +770,7 @@ sub get_dom { } return %returnhash; } else { - &logthis("get_dom failed - no homeserver and/or domain"); + &logthis("get_dom failed - no homeserver and/or domain ($udom) ($uhome)"); } } @@ -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;