Moodle

Choice doesn't display users with doanything capability on resposes/results page

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor 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

Activity

Hide
Paul Holden added a comment -

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

Show
Paul Holden added a comment - 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
Hide
Dan Marsden added a comment -

but they should never be displayed in the "not answered" column if that is used - this would cause great confusion for some teachers!

Show
Dan Marsden added a comment - but they should never be displayed in the "not answered" column if that is used - this would cause great confusion for some teachers!
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Paul Holden added a comment -

Hi Michael,

Think this must have been fixed, I couldn't reproduce anyway in current master. Have linked MDL-12083, as I came across that while testing this issue.

Show
Paul Holden added a comment - Hi Michael, Think this must have been fixed, I couldn't reproduce anyway in current master. Have linked MDL-12083, as I came across that while testing this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: