Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9.4, 2.2
-
Fix Version/s: STABLE backlog
-
Component/s: Choice
-
Labels:
-
Affected Branches:MOODLE_19_STABLE, MOODLE_22_STABLE
Description
If a person with doanything submits a response to a choice, that user doesn't appear in the list of responses public/anonymous or the counts at the bottom of the pages..
this also means that an option appears to have 1 space available, but if a student attempts to save into that option, the error "Choice is full" appears.
need to modify the code so that doanything users are displayed if they have submitted a response - but not shown in the unanswered column.
Issue Links
| This issue testing discovered: | ||||
| MDL-12083 | Choice should implement 'choice_role_unassign()' function in lib |
|
|
|
The problem seems to be that choice_get_response_data() excludes users with 'doanything' capability, i.e. admins.
Yes, when deciding whether a user can make a choice, view.php just does has_capability('mod/choice:choose', $context).
Setting $doanything to true in the $allresponses[0] = get_users_by_capability(...) line in choice_get_response_data() fixed the problem here