[LON-CAPA-admin] Changing SSN to PID

Guy Albertelli II guy at albertelli.com
Thu Sep 9 16:39:33 EDT 2004


Hi Mark,

> I presume if a student is new (no previous username), the automated 
> enrollment will use the PID from the classlists and life is good.
> 
> * Is there any way for the automated enrollement to be told to change this 
> information for students who are already users in the system?

I don't believe so, if I remeber correctly, the auto-enrollement
manager is written with the assumption that usernames might change but
student numbers don't.

> * Where is the ID table kept (the one which references usernames by ID)?
> Mysql or .db file?

this file
/home/httpd/lonUsers/domain/ids.db
does ID->username mapping

and each student has an id stored in 

/home/httpd/lonUsers/domain/u/s/e/username/envronment.db

The key is id


Both places need to be changed.

I you want to write some code to do this inside lon-capa

&Apache::lonnet::idput($domain,%ids) is the one

$domain is the domain of the users being changed.

%ids should be a hash indexed by username with values of student ids

It'll take care of modifying both locations correctly.


-- 
guy at albertelli.com  LON-CAPA Developer  0-7-3-4-



More information about the LON-CAPA-admin mailing list