WeBWorK Main Forum

Need assistance on resolving user data duplication in WeBWorK database

Re: Need assistance on resolving user data duplication in WeBWorK database

by Danny Glin -
Number of replies: 0
Directly modifying data in the WeBWorK database is always dangerous, and any actions done based on advice you receive on the forums is done at your own risk. At the very least you should back up your database before trying anything suggested here.

It will be hard to troubleshoot your issue when you haven't described how you modified LTIAdvanced.pm, but I can provide some general info:

The coursename_set_user and coursename_problem_user tables will have a record for each set or problem (respectively) assigned to each user. When you see an entry with user_id: 123456789@antagning.se and set_id: Slutprov_2.3-2.4 it contains the data associated with the fact that the set with ID Slutprov_2.3-2.4 is assigned to the user with ID 123456789@antagning.se. Since you have entries with two different user_ids it implies that WeBWorK believes that this set is assigned to two different users: one with user_id: 123456789@antagning.se and one with user_id: 123456789.

Modifying LTIAdvanced.pm won't change the user_ids of any users who had already been created in WeBWorK. Most likely what happened is that when the user_ids changed in Moodle, the next time that user accessed WeBWorK a new WeBWorK account was created with the new user_id. This means that likely there are two WeBWorK accounts for each user: one with the old user_id and one with the new user_id.