help logoLON-CAPA Help


Users in a domain can be assigned one or more institutional affiliations by the Autoupdate process which reconciles user information in LON-CAPA with institutional directory information. User type (or affiliation) can determine such things as (a) default portfolio quota, (b) the types of user information which may be updated in different contexts, (c) whether a user can self-enroll in a course.

Prior to LON-CAPA 2.11.0 the possible institutional types in a domain were defined by inst_usertypes(). Examples of institutional types might be: Faculty, Adjunct, Staff, Student etc. In addition to any types defined in inst_usertypes(), a type "other" will also be available for assignment to users who do not fall in any of the recognized categories of user. In the absence of any defined user categories, the type "other" applies to all users from a domain.

Starting with LON-CAPA 2.11.0 use of the inst_usertypes() subroutine is deprecated. The domain configuration web GUI accessible to Domain Coordinators is now used to manage institutional types. If you have previously customized the inst_usertypes() routine, then values set there will be used when displaying the "Institutional user types" section in the domain config screen for: Default authentication, language, timezone, portal and types.

Once a Domain Coordinator has visited that screen and saved the settings, configuration thereafter will be via the web GUI of values stored in the domain's configuration.db file on the primary library server in the domain, and values in inst_usertypes() will no longer be consulted. However, if you have created other custom routines in localenroll.pm which call inst_usertypes() internally, you will likely want to continue to maintain it.

inst_usertypes

The routine accepted three arguments:

  1. $dom - domain

  2. $usertypes - reference to hash which will contain key = value, where keys are institution affiliation types (e.g., Faculty, Student etc.) and values are titles (e.g., Faculty/Academic Staff)

  3. $order - reference to array which will contain the order in which institutional types should be shown when displaying data tables (e.g., default quotas or updateable user fields (see Domain Configuration menu)

The routine returns 'ok' if no errors occurred.

At MSU there are six different categories of users.

sub inst_usertypes {
my ($dom,$usertypes,$order) = @_;

my $outcome = 'ok';

%{$usertypes} = (

Faculty => 'Faculty/Academic Staff',

Staff => 'Support Staff',

Student => 'Student',

Assistant => 'Assistant',

StaffAff => 'Affiliate',

StuAff => 'Student Affiliate'

);

@{$order}=('Faculty','Staff','Student','Assistant','StaffAff','StuAff');

return $outcome;

}