Hi dear Community,
I am facing Errors, when i try to update Moodle:
The Following Error occures:
Debug-Info: Duplicate entry '7130-55959' for key 'mdl_course_modules_viewed.mdl_courmoduview_usecou_uix'
INSERT INTO mdl_course_modules_viewed
(userid, coursemoduleid, timecreated)
SELECT userid, coursemoduleid, timemodified
FROM mdl_course_modules_completion
WHERE viewed = 1
[array (
)]
Error code: dmlwriteexception
Stack trace:
- line 497 of /lib/dml/moodle_database.php: dml_write_exception thrown
- line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
- line 1172 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
- line 2980 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->execute()
- line 1891 of /lib/upgradelib.php: call to xmldb_main_upgrade()
- line 527 of /admin/index.php: call to upgrade_core()
A week ago we had to restore the moodle instance (database / moodleweb and moodledata folder) because a important plugin (content pages) was deletet by accident.
I assume that the problem is related to this.
Thank you very much in advance
Lukas