\label{Domconfig_Auto_Enrollment}
If your institution can provide access to roster information for courses
using LON-CAPA then your domain can offer automated enrollment once
localenroll.pm has been customized on each of the library servers
in your domain which serves as a home server for one or more courses.
The required customization is the creation of connections to rosters
for institutional course sections providing enrollment to each LON-CAPA
course. These connections can involve queries of database tables,
in real time, or can involve retrieval from a data source which is
only updated periodically.

There are two configuration options: 

\begin{itemize}
\item Set auto-enrollment as active or inactive in the domain. 
\item Set the username:domain used in the notification messages sent when
changes in enrollment occur as a result of auto-enrollment updates.
By setting these to a specific user (you might create one for this
purpose), you can view all auto-enrollment change messages for the
entire domain by viewing the contents of the sent messages folder for that user.
\end{itemize}
Auto-enrollment settings for each course consist of items set by a
Domain Coordinator within the \char`\"{}Modify Course\char`\"{} area,
and those items set in a course context from the \char`\"{}\underbar{Automated
Enrollment Manager}\char`\"{} link in the \char`\"{}Manage Users\char`\"{}
menu. This link is only displayed if auto-enrollment has been set
to be active in the domain.

The items which must be set by a Domain Coordinator include: 

\begin{itemize}
\item institutional code (used in mapping institutional rosters to LON-CAPA
courses)
\item default authentication
\item course owner
\end{itemize}
Your institution may have policies in place to control who may have
access to student information contained within course rosters. In
such cases, assignment of an appropriate course owner in LON-CAPA
may facilitate access to institutional rosters. When a course is first
created the initial Course Coordinator chosen will be identified as
the course owner. If, instead a course is created using an uploaded
XML course description file, the XML file will include tags to define
the username and domain of the course owner.

Settings which control auto-enrollment which are modifiable by a Course
Coordinator are described in the \underbar{Automated Enrollment help page}.

The auto-enrollment process will update user information (name, e-mail
address, studentID etc.) for any student who is being added to the
course, but will not change it in other case (i.e., drops, section
switches) should there be a difference between the values in the institutional
roster and the values in the LON-CAPA classlist. To change user information
for students already in the course, the Auto-update process must be run
(see below).

Warnings will be written to the Auto-enrollment log file found in
/home/httpd/perl/logs if a possible username change is detected. Although
the username is the unique identifier in LON-CAPA, the studentID operates
as an additional, mostly unique identifier. The same studentID may
not be assigned to more than one user - if an existing studentID is
assigned to adifferent user, the change will not occur, unless forced
(there's a checkbox for that). A blank studentID can be assigned,
and in this case multiple users can share the same studentID. StudentIDs
are used for LON-CAPA grading of scantron sheets, and are also used
to detect changes in username by the auto-enrollment and auto-update
processes.

At present LON-CAPA does not support username changes, although this
functionality will be supported in the future. In the meantime, what
you must do for users who switch username mid-semester (assuming institutional
authentication will no longer authenticate the user's old username)
is to convert the authentication type in LON-CAPA for the user to
\char`\"{}internal\char`\"{}, set an initial password, make sure that
permanent e-mail is set for the user, then e-mail the user the initial
password, and ask them to use the \char`\"{}\underbar{Forgot password?}\char`\"{}
link on the log-in page to change the password to something secure.
