jpahullo / moodle-tool_mergeusers

Merge users script for Moodle

Home Page:https://moodle.org/plugins/view.php?plugin=tool_mergeusers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merging failure due to missing SCORM activity

asimovedge opened this issue · comments

I tried to merge two accounts but received the following error:

Merged «let2sant» (user ID = 2893) into «letlet.santos@manginasal.com» (user ID = 94168)

For further reference, these results are recorded in the log id 5.
Some error occurred:

Exception thrown when merging: 'Can not find scorm activity with id 382".

Trace:
#0 /opt/bitnami/apps/moodle/htdocs/admin/tool/mergeusers/lib/mergeusertool.php(271): MergeUserTool->updateGrades('94168', '2893')
#1 /opt/bitnami/apps/moodle/htdocs/admin/tool/mergeusers/lib/mergeusertool.php(192): MergeUserTool->_merge('94168', '2893')
#2 /opt/bitnami/apps/moodle/htdocs/admin/tool/mergeusers/index.php(135): MergeUserTool->merge('94168', '2893')
#3 {main}

Started merging at Friday, 28 May 2021, 2:50 PM
Merge took 406 seconds

Hi!

Thanks for the feedback!

By the stack trace, it seems to be some kind of database inconsistence. Maybe the Scorm activity actually does not exist on the course, but there is some orphane reference inside the Moodle database.

I propose you follow this path: check that actually the Scorm activity with id 382 actually exists on your Moodle site. You will need to get access to the database somehow. If the Scorm activity does not exist on the Moodle course, you have an inconsistence in the database. You should manually and very carefully remove orphane records. If the Scorm activity exists, there is some kind of inconsistence in the database model. Check the course_modules table, the grade_items table and the mod_scorm table.

I'll leave this issue open some time, just in case you need more help.

After some months being opened, I am closing this issue.

This is something related to database inconsistency, not about this plugin.

Thanks for reporting.