Wollte gerade in einem Kurs die Inhalte eines anderen Kurses importieren, als ich bei 99,32% den Fehler "Ungültige Kursmodul-ID" bekam. Auch Sichern und Wiederherstellen des Kurses führte zum gleichen Ergebnis.
Die Hilfe unter https://docs.moodle.org/37/en/error/moodle/invalidcoursemodule beschreibt ein Problem mit einem gelöschten User - das hat leider gar nichts mit meiner Aktion zu tun.
Version: Moodle 3.6.2
Fehlermeldung:
Ungültige Kursmodul-ID
×Debug info: SELECT id,course FROM {course_modules} WHERE id IS NULL
[array (
)]
Error code: invalidcoursemodule
[array (
)]
Error code: invalidcoursemodule
×Stack trace:
- line 1546 of \lib\dml\moodle_database.php: dml_missing_record_exception thrown
- line 1522 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select()
- line 7052 of \lib\accesslib.php: call to moodle_database->get_record()
- line 2499 of \lib\grade\grade_item.php: call to context_module::instance()
- line 1242 of \lib\grade\grade_grade.php: call to grade_item->get_context()
- line 1054 of \lib\grade\grade_grade.php: call to grade_grade->get_context()
- line 369 of \lib\grade\grade_object.php: call to grade_grade->add_feedback_files()
- line 1025 of \lib\grade\grade_grade.php: call to grade_object->insert()
- line 647 of \lib\grade\grade_category.php: call to grade_grade->insert()
- line 541 of \lib\grade\grade_category.php: call to grade_category->aggregate_grades()
- line 743 of \lib\grade\grade_item.php: call to grade_category->generate_grades()
- line 1272 of \lib\gradelib.php: call to grade_item->regrade_final_grades()
- line 489 of \backup\moodle2\restore_stepslib.php: call to grade_regrade_final_grades()
- line 410 of \backup\util\plan\restore_structure_step.class.php: call to restore_gradebook_structure_step->after_execute()
- line 113 of \backup\util\plan\restore_structure_step.class.php: call to restore_structure_step->launch_after_execute_methods()
- line 181 of \backup\util\plan\base_task.class.php: call to restore_structure_step->execute()
- line 178 of \backup\util\plan\base_plan.class.php: call to base_task->execute()
- line 168 of \backup\util\plan\restore_plan.class.php: call to base_plan->execute()
- line 339 of \backup\controller\restore_controller.class.php: call to restore_plan->execute()
- line 188 of \backup\import.php: call to restore_controller->execute_plan()
Bitte um Ideen...
Markus