[LON-CAPA-users] score upload and user ids
Stuart Raeburn
raeburn at msu.edu
Thu Oct 18 00:00:04 EDT 2012
Ray,
> My working hypothesis, at this point, is that perhaps there is
> another user who might have been given the same userid (presumably
> by override... possibly by some other course coordinator).
Not an unreasonable hypothesis since, if only student/employee IDs are
included (no usernames) in the uploaded csv data, LON-CAPA (when
attempting to process the grade data) will retrieve the usernames via
a look-up of the student/employee IDs in the GDBM file:
/home/httpd/lonUsers/<domain>/ids.db on your library server, and a
given ID will only occur once.
If a particular username:domain is not found in the classlist,
LON-CAPA should alert you to this, with the message:
No scores stored for the following username(s):
followed by the list of users who were not in the classlist.
Anyway, if you have command line access to your library server you
could check for the current mapping in ids.db of a given id to a
single username with the command:
/home/httpd/perl/debug/dump_db.pl -u
/home/httpd/lonUsers/<domain>/ids.db |grep <id>
replacing <domain> with your domain, and <id> with the id for which
you suspected a duplicate.
Another way to do this is to query the allusers table in the MySQL
database, again from the command line, by starting a MySQL session:
/usr/bin/mysql -uroot -p loncapa
(You would need to enter the password you set for the MySQL root user
when you set-up the MySQL database). If you don't remember the
password for that user then you can be the MySQL www user instead:
/usr/bin/mysql -uwww -p loncapa
(Contact me off-list for the password used for the MySQL www user, if
you do not currently know it).
Once you have authenticated, and have the mysql prompt:
mysql>
enter (for example):
select username from allusers where id='a12345678';
to find out the usernames of all users who have the ID: a12345678.
If you are curious to find out just how may IDs have multiple
usernames in your domain you could enter the following query to
display which IDs are associated with more than one username (lookng
for the entries early in the output, where num > 1).
select username,id, count(id) as num from allusers group by id order
by num desc;
For any where num is more than 1, you can use another query to find
out what those usernames are for a particular ID (e.g., a23548923)
select username from allusers where id = 'a23548923';
When done use:
quit;
to end your MySQL session.
Note: ids stored in the ids.db GDBM file, and in the allusers table
have any letters present as lower case. Similarly, if the IDs in the
uploaded file included any upper case letters, they will be lower
cased before being passed by the score upload process to the LON-CAPA
look-up in the ids.db file.
Stuart Raeburn
LON-CAPA Academic Consortium
Quoting Raymond Batchelor <batchelo at sfu.ca>:
> On the odd occasion, when uploading marks to a "score upload special
> document", I have found that the upload fails for some individual
> student, when the students are identified by their "Student/employee
> ID" rather than their "Student username". In these cases the
> actual Student ID in both LON-CAPA AND in my csv file being uploaded
> are identical.
>
> My working hypothesis, at this point, is that perhaps there is
> another user who might have been given the same userid (presumably
> by override... possibly by some other course coordinator).
>
> My question is: How do I locate, in LON-CAPA, the other student
> whose id is in conflict with my own student's?
>
> --
> Ray
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
More information about the LON-CAPA-users
mailing list