-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.4, 4.2
-
MOODLE_401_STABLE, MOODLE_402_STABLE
Apologies if this is a duplicate - haven't found anything yet.
It appears that in order for a particular user to comment on a question in the question bank they need a variety of permissions:
- moodle/question:commentall
- moodle/question:commentmine
- AND
- moodle/comment:post
It was very unclear that we needed the moodle/comment:post permission and then more surprising to discover it must be given at a System context rather than course or similar.
If this permission is not granted then rather than a nice failure message about permissions or similar you get:
"undefined is not an object (evaluating 'document.querySelectorAll("div.comment-area a")[0].style')"
Steps to replicate:
- Have a user role with both moodle/question:commentall and moodle/question:commentmine allowed, but no moodle/comment:post
- Go to a question bank within a course and attempt to leave a comment
- Get error when comment modal opens.
- has been marked as being related by
-
MDL-75351 Cannot comment a question when system context id is not 1
- Closed