Invalid course module ID

Invalid course module ID

by Mohammad Yaseen -
Number of replies: 0

Hi 

We have a module that shows the error message "Invalid course module ID". From what I read, it seems that the lecturer used either empty spaces or special characters inside the sections' headers. This is mentioned in the tracker MDL-72685 and it seems that to patch this issue we need to upgrade to Moodle 3.11.6 or above.

The solution I followed was restoring a complete working clone of the whole site, and take the backup of the course (before being tampered by the lecturer) and then restoring the course into the live site as a new course as I wasn't able to restore the backup to the same affected course. As after the restoration process (when using the existing course) I was getting the same "Invalid course module ID". So the solution that worked was restoring the course as a completely new course.

Any attempt to delete the old course is throwing the error "Invalid course module ID".

However, my question is there any way to display, restore, or delete this particular course (the original course)?


The following are the outputs of the debugging:

When we try to view the course

Debug info:

Error code: invalidcoursemodule
Stack trace:line 236 of /lib/modinfolib.php: moodle_exception thrownline 1890 of /lib/modinfolib.php: call to course_modinfo->get_cm()line 1078 of /lib/completionlib.php: call to cm_info::create()line 427 of /blocks/completion_progress/lib.php: call to completion_info->get_data()line 256 of /blocks/completion_progress/block_completion_progress.php: call to block_completion_progress_completions()line 341 of /blocks/moodleblock.class.php: call to block_completion_progress->get_content()line 235 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()line 1181 of /lib/blocklib.php: call to block_base->get_content_for_output()line 1239 of /lib/blocklib.php: call to block_manager->create_block_contents()line 374 of /lib/blocklib.php: call to block_manager->ensure_content_created()line 3980 of /lib/outputrenderers.php: call to block_manager->region_has_content()line 40 of /theme/moove/layout/course.php: call to core_renderer->blocks()line 1396 of /lib/outputrenderers.php: call to include()line 1326 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()line 245 of /course/view.php: call to core_renderer->header()

When we try to backup or restore the course

error/setting_invalid_ui_label

More information about this error

Debug info:
Error code: setting_invalid_ui_label
$a contents:

Stack trace:
line 153 of /backup/util/ui/backup_ui_setting.class.php: base_setting_ui_exception thrownline 156 of /backup/moodle2/backup_section_task.class.php: call to base_setting_ui->set_label()line 153 of /backup/util/plan/base_task.class.php: call to backup_section_task->define_settings()line 60 of /backup/util/plan/base_plan.class.php: call to base_task->set_plan()line 161 of /backup/moodle2/backup_plan_builder.class.php: call to base_plan->add_task()line 188 of /backup/moodle2/backup_plan_builder.class.php: call to backup_plan_builder::build_section_plan()line 101 of /backup/moodle2/backup_plan_builder.class.php: call to backup_plan_builder::build_course_plan()line 163 of /backup/util/factories/backup_factory.class.php: call to backup_plan_builder::build_plan()line 67 of /backup/util/plan/backup_plan.class.php: call to backup_factory::build_plan()line 463 of /backup/controller/backup_controller.class.php: call to backup_plan->build()line 149 of /backup/controller/backup_controller.class.php: call to backup_controller->load_plan()line 125 of /backup/backup.php: call to backup_controller->__construct()

Average of ratings: -