--- loncom/enrollment/localenroll.pm 2007/05/14 17:35:01 1.19 +++ loncom/enrollment/localenroll.pm 2007/08/28 20:04:50 1.23 @@ -1,6 +1,6 @@ # functions to glue school database system into Lon-CAPA for # automated enrollment -# $Id: localenroll.pm,v 1.19 2007/05/14 17:35:01 raeburn Exp $ +# $Id: localenroll.pm,v 1.23 2007/08/28 20:04:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -512,10 +512,16 @@ sub allusers_info { ############################### # sub get_userinfo # -# Incoming data: four required arguments and two optional arguments -# Retrieves institutional data for a single user either by username -# if $uname is included as second argument, or by ID if $id is -# included as a third argument. Either (b) or (c) must be provided. +# Incoming data: four required arguments and additional optional arguments +# Two modes of operation: +# (1) Retrieves institutional data for a single user either by username +# if $uname is included as second argument, or by ID if $id is +# included as a third argument. Either (b) or (c) must be provided. +# (g), (h) and (i) will be undefined. +# (2) Retrieves institutional user data from search of an institutional +# directory based on a search. (g) and (h) are required. +# (i) is optional. (b) and (c) will be undefined. +# # (a) $dom - domain # (b) $uname - username of user # (c) $id - student/faculty ID of user @@ -531,6 +537,14 @@ sub allusers_info { # if a single ID matches multiple usernames. # (f) $types - optional reference to array which contains # institutional types to check. +# (g) $srchby - optional if $uname or $id defined, otherwise required. +# Allowed values include: 1. lastfirst, 2. last, 3. uname +# corresponding to searches by 1. lastname,firstname; +# 2. lastname; 3. username +# (h) $srchterm - optional if $uname or $id defined, otherwise required +# String to search for. +# (i) $srchtype - optional. Allowed values: contains, begins (defaults +# to exact match otherwise). # # returns 1 parameter - ('ok' or other value). # side effects - populates the $instusers and $instids refs to hashes. @@ -541,7 +555,8 @@ sub allusers_info { ############################### sub get_userinfo { - my ($dom,$uname,$id,$instusers,$instids,$types) = @_; + my ($dom,$uname,$id,$instusers,$instids,$types, + $srchby,$srchterm,$srchtype) = @_; my $outcome = 'ok'; return $outcome; } @@ -565,6 +580,8 @@ sub get_userinfo { sub inst_usertypes { my ($dom,$usertypes,$order) = @_; + @{$order} = (); + %{$usertypes} = (); my $outcome = 'ok'; return $outcome; }