-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.2, 4.0.4
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
For whatever reason (most probably a replication configuration in db where autoincrement columns have an offset), a system context id can have other values than 1.
The "comment" question bank plugin, in some situations, uses a hardcoded value of 1 to contextid, causing Moodle 4 to fail when trying to comment questions or when trying to previsualize them when contextid 1 does not exists.
Here are the places where i've detected the thing:
https://github.com/moodle/moodle/blob/master/question/bank/comment/lib.php#L87
https://github.com/moodle/moodle/blob/master/question/bank/comment/amd/src/comment.js#L103
I don't know if 1 is intended to be something else than the system context id... so i want to ask you before substituting this with a context_system::instance()->id
Thanks in advance.
- has a non-specific relationship to
-
MDL-79122 Question comments - gives a link to edit comments, even if you don't have the right permissions
- Closed
-
MDL-75752 Performance problem from a query in in mdl_comments
- Closed
- is duplicated by
-
MDL-75631 Can't find data record in database table context when previewing questions
- Closed
- links to