The 'name' value must be set in other
leonstr opened this issue · 7 comments
With Moodle 4.0.2 or later, when saving changes to an activity the error Coding error detected, it must be fixed by a programmer: The 'name' value must be set in other. appears.
To reproduce this:
- Create a course.
- Add a label (mod_label) to the course.
- Edit the label changing the text and click Save and return to course.
Results (with debugging enabled):
Coding error detected, it must be fixed by a programmer: The 'name' value must be set in other.
More information about this error
Debug info:
Error code: codingerror
Stack trace:
line 136 of /lib/classes/event/course_module_updated.php: coding_exception thrown
line 272 of /lib/classes/event/base.php: call to core\event\course_module_updated->validate_data()
line 161 of /lib/classes/event/course_module_updated.php: call to core\event\base::create()
line 693 of /course/modlib.php: call to core\event\course_module_updated::create_from_cm()
line 168 of /course/modedit.php: call to update_moduleinfo()
This issue arises following change MDL-74533 in Moodle 4.0.2 (1ecfc86) where the course_module_updated event is created after the plagiarism plugin callback instead of before.
Removing the empty function plagiarism_pchkorg_coursemodule_edit_post_actions() in plagiarism/pchkorg/lib.php and purging caches fixes the problem.
plz guide how to perform it
Removing the empty function plagiarism_pchkorg_coursemodule_edit_post_actions() in plagiarism/pchkorg/lib.php and purging caches fixes the problem.
function plagiarism_pchkorg_coursemodule_edit_post_actions($data, $course)
{ global $DB;
$pchkorgconfigmodel = new plagiarism_pchkorg_config_model();
$config = $pchkorgconfigmodel->get_system_config('pchkorg_use');
if ('1' != $config) {
return;
}
This issue has been fixed with version 3.11.2
@tahirulamin Try changing line 201 of lib.php from return;
to return $data;
. See #27 for more information, I opened that new issue as it's a slightly different manifestation of this original issue.
The version of moodle plugin v3.11.3 has this line changed.
https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg/blob/master/lib.php#L201
You can just update your version of moodle plugin.
Thank you for cooperation.