-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.18, 2.9.9, 3.0.8, 3.1.4, 3.2.1
-
None
-
MOODLE_27_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MDL-58172_master -
Steps to reproduce:
- Go to /admin/settings.php?section=userpolicies and add the idnumber profile field to $CFG->showuseridentity
- Create a student user S and fill his idnumber profile field
- Create two teacher users T and U
- Create a new teacher role C which has the moodle/site:viewuseridentity capability
- Create a new teacher role C' which has not the moodle/site:viewuseridentity capability
- Create a course
- Enrol the student user S with the student role into the course
- Enrol the teacher user T with the teacher role C into the course
- Enrol the teacher user U with the teacher role C' into the course
- Login as teacher user T
- Add a choice activity to the course and add some options
- Login as student user S
- Add your vote to the choice activity
- Login as teacher user T
- Download the choice results from the choice activity
- Login as teacher user U
- Download the choice results from the choice activity
Expected results:
- Teacher user T should see the idnumber of student user S in the choice results export
- Teacher user U should not see the idnumber of student user S in the choice results export
Actual results:
- Both teachers see the idnumber of student user S in the choice export
Conclusion:
- mod_choice does not respect a teacher's moodle/site:viewuseridentity capability when exporting the choice results
- Testing discovered
-
MDL-58809 Create a method that returns array of user names visible to current user
- Closed