-
Bug
-
Resolution: Fixed
-
Minor
-
5.0
-
MOODLE_500_STABLE
-
MOODLE_500_STABLE
-
-
-
There were acutally two issues
- The original issue reported here, which was mostly already fixed elsewere, as verified by mod/quiz/tests/behat/editing_switch_bank.feature tests.
- The real issue is: to use questions from from another question bank, the capability you actually need is moodle/question:useall or usemine. So, the code should not have been checking moodle/question:managecategory here. That is what I have now fixed using this issue.
Original report:
To reproduce:
- Create a role "questionbankmanager":
- no basis role
- context type "category"
- "moodle/question:managecategory" -> Allow
- Create a course category "testcategory"
- Create a course "course1" in "testcategory" and a course "course2" in "testcategory"
- Create a user "user1" and "user2"
- Enrol "user1" to "course1" with role "editingteacher"
- Enrol "user2" to "course2" with role "editingteacher"
- As "user1" create default question bank in "course1"
- As "user2" create default question bank in "course2"
- As "admin" assign role "questionbankmanager" to "user1" on "testcategory" context
- As "user1" create a test activity, open the test activity, go to "questions", add a question from question bank.
- Click "Switch question bank"
- In the autocomplete field "Other question banks" you will see the default question bank from "course2" which you are not supposed to see -> Bug
- blocks
-
MDL-84576 Give non-editing teacher role the 'Use questions' capabilities by default to support shared question banks
-
- Closed
-