Hello dear all,
the Moodle instance I am administrating used to have mod_hotpot plug-in installed and it was used in various courses. Nevertheless, there came a decision to uninstall mod_hotpot, because we don't want to use it anymore. So, all courses with usage of mod_hotpot were edited, respectively—mod_hotpot was removed.
Now I want to delete a course which used to have hotpot activity. My attempts to delete this particular course result in an error, as shown below.
Database transaction aborted automatically in /var/www/html/moodle Default exception handler: Error reading from database Debug: SQLState: 42S02
Error Code: 208
Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name 'mdl_hotpot'.
SELECT cm.*, m.name, md.name AS modname FROM mdl_course_modules cm JOIN mdl_modules md ON md.id = cm.module JOIN mdl_hotpot m ON m.id = cm.instance WHERE m.id = '20765' AND md.name = N'hotpot' AND cm.course = '66902' [array ( 0 => '20765', 1 => 'hotpot', 2 => '66902', )] Error code: dmlreadexception * line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown * line 324 of /lib/dml/sqlsrv_native_moodle_database.php: call to moodle_database->query_end() * line 431 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end() * line 900 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query() * line 976 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql() * line 1671 of /lib/dml/moodle_database.php: call to sqlsrv_native_moodle_database->get_records_sql() * line 1313 of /lib/datalib.php: call to moodle_database->get_record_sql() * line 1188 of /lib/grade/grade_grade.php: call to get_coursemodule_from_instance() * line 301 of /lib/grade/grade_object.php: call to grade_grade->notify_changed() * line 1125 of /lib/grade/grade_grade.php: call to grade_object->delete() * line 447 of /lib/grade/grade_item.php: call to grade_grade->delete() * line 418 of /lib/grade/grade_item.php: call to grade_item->delete_all_grades() * line 313 of /lib/grade/grade_category.php: call to grade_item->delete() * line 1454 of /lib/gradelib.php: call to grade_category->delete() * line 5093 of /lib/moodlelib.php: call to remove_course_grades() * line 5007 of /lib/moodlelib.php: call to remove_course_contents() * line 41 of /opt/moosh/Moosh/Command/Moodle39/Course/CourseDelete.php: call to delete_course() * line 361 of /opt/moosh/moosh.php: call to Moosh\Command\Moodle39\Course\CourseDelete->execute() !!! Error reading from database !!!
As one can see, the delete process tries to query the database table mdl_hotpot, which is not present anymore. This is the reason for the database error. Because of that, I am asking myself, why does it try to query that particular not existing database table, in the first-place? My guess is, that somewhere are artifacts of mod_hotpot left over. Unfortunately, I was not successful in searching the code base of Moodle or the plug-in itself to find anything helpful.—However, I can assure, that this particular course has no mod_hoptpot activity.
Did anyone encounter (and hopefully solved) such an issue before?
Thanks in advance and
best regards,
Markus