-
Bug
-
Resolution: Fixed
-
Critical
-
2.7.7, 2.8.5
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-50177_master -
In 2.7 and in 2.8 when upgrading 2.2 assignments you will get the following error:
The assignment conversion was not successful. The log from the upgrade was:
Could not convert assignment. Exception was: Coding error detected, it must be fixed by a programmer: Missing or invalid ->cm for completion condition.
If you go to the course where the assignment is at and turn editing on you will see something like this:
Error processing availability data for ‘A412 Advanced IQE Equipment Training Certificate’: Missing or invalid ->cm for completion condition
|
|
line 302 of /availability/classes/info.php: call to debugging()
|
line 241 of /availability/classes/info.php: call to core_availability\info->warn_about_invalid_availability()
|
line 715 of /course/renderer.php: call to core_availability\info->is_available_for_all()
|
line 831 of /course/renderer.php: call to core_course_renderer->is_cm_conditionally_hidden()
|
line 1013 of /course/renderer.php: call to core_course_renderer->course_section_cm_text()
|
line 924 of /course/renderer.php: call to core_course_renderer->course_section_cm()
|
line 1093 of /course/renderer.php: call to core_course_renderer->course_section_cm_list_item()
|
line 782 of /course/format/renderer.php: call to core_course_renderer->course_section_cm_list()
|
line 56 of /course/format/topics/format.php: call to format_section_renderer_base->print_multiple_section_page()
|
line 281 of /course/view.php: call to require()
|
This is happening because there is a certificate in the course with restrictions based on the old 2.2 assignments and the code is not updating the cmid for the restrictions in the database for that certificate. The only way we have found to get around it is to upgrade the assignment ONE AT A TIME and then edit and save the certificate in between each. This is a lot of work when there are over 2000 of the old assignment types to upgrade and many certificates that are restricted based on them.