[LON-CAPA-admin] Auto account

Stuart Raeburn raeburn at msu.edu
Wed Apr 22 10:38:15 EDT 2009


Hon Kie,

> 1. Is the account created when a new user logs in via sso and if the
> username does not exists, it is then created?

Yes, in the case of successful SSO authentication: $r->user has been  
set to the username and &Apache::lonnet::homeserver($name,$domain)  
checks if the user exists.  lonSSOUserUnknownRedirect also needs to  
have been defined in an Apache config file.

If the user's domain has been configured to allow account creation for  
'sso' type, an internal redirect then occurs to /adm/creataccount, if  
the homeserver check returns no_host.

The user is then prompted to supply any (missing) user information  
(subject to "user modification" settings in the domain configuration),  
and confirms that  he/she would like a LON-CAPA account to be created.

> 2. If so, which routine does it call? I want to limit the auto account
> to those who are coded as instructors or instructor-of-record.

The routine called is creataccount::username_check().

I have modified domainprefs.pm (rev 1.93) and createaccount.pm (rev  
1.35) to provide a new domain setting for the institutional  
affiliation(s) required for a user to be able to create his/her own  
account. Note: this restiction applies to institutional login/SSO  
only, i.e., not to users using e-mail addresses as account usernames  
(if enabled in a domain).  The affiliations are the standard  
institutional user types you define for a domain by customizing  
inst_usertypes() in localenroll.pm.

If you wanted to modify a 2.8.X installation to include this  
functionality for domainprefs.pm you'd need to use the diffs between  
1.93 and 1.92 because 1.91 and 1.92 include other changes intended for  
2.9.

Stuart Raeburn
MSU LON-CAPA group


Quoting "H.K. Ng" <hkng at fsu.edu>:

> Thanks Stuart, a couple of questions.
>
> 1. Is the account created when a new user logs in via sso and if the
> username does not exists, it is then created?
> 2. If so, which routine does it call? I want to limit the auto account
> to those who are coded as instructors or instructor-of-record.
>
> -hk
>
>
> At 12:30 PM 4/21/2009, you wrote:
>> Hon Kie,
>>
>> Self-creation of accounts was added to LON-CAPA in version 2.7.  Who
>> may self-create LON-CAPA accounts is controlled by domain
>> configuration set by a Domain Coordinator via:
>>
>> Main Menu -> Set domain configuration -> User creation
>>
>> The choices for "User creates own account" are:
>> Email address   Institutional Login   SSO
>>
>> The Domain Coordinator can also can configure what types of
>> information a user creating his/her own LON-CAPA account can set via:
>>
>> Main Menu -> Set domain configuration -> User modification
>>
>> The choices for "Information settable when self-creating account (if
>> directory data blank)" are:
>>
>> Last Name   First Name  Middle Name Generation
>> E-mail address    Student/Employee ID
>>
>> Note: this can be set to vary by institutional status (e.g., Faculty,
>> Staff or Student) if you have access to a directory service, and have
>> configured definition of institutional types , and also retrieval of
>> institutional status for individual users as part of localenroll.pm.
>>
>> For users creating their own accounts based on instituional login or
>> SSO, typically most of the user information will be retrieved
>> automatically (this uses the same mechanism via localenroll.pm as used
>> for institutional directory searches when an instructor is adding a
>> user to a course).  In such cases users creating their own accounts
>> will only be able to enter information for any fields unavailable from
>> the institutional directory, which were checked in the "Information
>> settable when self-creating account" configuration (see above).
>>
>> Once a user has created a LON-CAPA account, the question then becomes
>> what can the user do next?  One possibility is to enroll in courses
>> which allow self-enrollment.  Currently this is restricted to
>> self-enrollment as a student.
>>
>> Some discussion is found in the Domain Coordination Manual
>> (http://msu.loncapa.org/adm/help/domain.manual.pdf)
>>
>> See:
>> http://msu.loncapa.org/adm/help/Domain_Configuration_User_Creation.hlp
>>
>> Stuart Raeburn
>> MSU LON-CAPA group
>>
>> Quoting "H.K. Ng" <hkng at fsu.edu>:
>>
>>> Hi, is there a script where a user can request for an account on
>>> loncapa? I know there is the auto-enrollment for students but what I
>>> have in mind is for instructors and other users. Thanks, -hk
>>>
>>> _______________________________________________
>>> LON-CAPA-admin mailing list
>>> LON-CAPA-admin at mail.lon-capa.org
>>> http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin






More information about the LON-CAPA-admin mailing list