[LON-CAPA-admin] Need a way to change all student IDs in our database

Stuart Raeburn raeburn at msu.edu
Wed Jul 10 16:08:25 EDT 2013


Hi,

A user with a Domain Coordinator role can log-in to LON-CAPA, select  
the DC role and then use:

Main Menu -> Create users or modify the roles and privileges of users  
-> Upload a File of Users

to upload a CSV file containing records of the form:
username,studentID

for any number of students.

On the next page identify which column contains usernames, and which  
column student IDs.

A default authentication type needs to be selected (although it will  
not be used).  For the remaining settings:

Change authentication for existing users in domain "sc" to these  
settings?  No (checked)

Default domain: University of South Carolina (sc)

Pick the action to take on roles for these users:
No role changes  (checked)

Checkboxes for the folloing two items:

Disable Student/Employee ID Safeguard and force change of conflicting IDs
(only do if you know what you are doing.)
Update student/employee ID in courses in which user is active/future student,
(if forcing change).

should both be checked.

Click the "Update Users" button

If there are 10,000 records to update, you might want to separate  
those into a number of files, so you can confirm the process is  
proceeding as expected. (It will not be a rapid process).

An alternative is to customize appropriate stub sub routines in  
/home/httpd/lib/perl/localenroll.pm on your library server, so they  
can access campus directory information (e.g., LDAP) and then as  
Domain Coordinator configure automated updates:

Main Menu -> Set domain configuration -> Display  (Auto-update  
settings checked)

You will find information about that in the Domain Coordination  
manual, e.g., http://loncapa3.physics.sc.edu/adm/help/domain.manual.pdf

see: section 2.9 "Identity Management: Automated Updates of User  
Information" and section 4.4 "Institutional Directory Inform".

Additional notes:

1. If you have command line access to the LON-CAPA library server in  
your domain, you can view the existing username => student ID mapping  
using:

/home/httpd/perl/debug/dump_db.pl /home/httpd/lonUsers/sc/ids.db

2. As discussed elsewhere (see:  
http://mail.lon-capa.org/pipermail/lon-capa-users/2012-October/004201.html),  
the ids.db is a simple key => value GDBM file so if the same ID was  
assigned to more than one student in LON-CAPA in the past, you will  
not see all of those students.

However, in such cases you can use MySQL on the command line to  
retrieve all usernames for LON-CAPA users form the sc domain

(see:  
http://mail.lon-capa.org/pipermail/lon-capa-users/2012-October/004199.html)


Stuart Raeburn
LON-CAPA Academic Consortium


Quoting Jeffrey Wilson <jwilson at sc.edu>:

> Hi,
>
> For security reasons we must replace the student/employee ID for all of
> the existing
> student records in our LonCapa database.  We have ~10K students in our
> system so the
> existing one-student-at-a-time GUI seems to not be the right tool for
> the task.
>
> Is there any way to do batch processing of the student database? Are
> there scripts that
> we can run at the command line to do this?
>
> Thanks,
>
> Jeff Wilson
>
> _______________________________________________
> 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