Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod_choice: Selecting Remove my choice in app removes all users' choices #4

Open
earcanal opened this issue May 26, 2016 · 1 comment

Comments

@earcanal
Copy link
Collaborator

Details

  • Affects server version/s: 2.8.7
  • Affects client version/s: 0.3.0

Description

Expected result: User's choice removed.
Actual result: User's choice removed, along with any choices submitted by other users.
Steps to reproduce:

  1. Create an updateable choice activity
  2. Student submits choice using app
  3. Teacher submits choice using app
  4. Teacher clicks Remove my choice using app

Workaround

Don't select Remove my choice if you have Teacher role or greater.

Comments

This behaviour was observed on https://moodle.bbk.ac.uk/ which is Moodle 2.8.7. The behaviour is not triggered when the choice is removed using a web browser, which suggests the bug is triggered by the app. It appears that this issue is not triggered for users with Student role, although this hasn't been rigorously tested. Example call to the web service when this issue is triggered:

moodlewssettingfilter:true
wsfunction:local_mobile_mod_choice_delete_choice_responses
wstoken:<redacted>

This appears to be a valid API call which should delete all responses for the current user. Next step is to reproduce on dev. If the issue is present, then enable MySQL query logs to see what the generated SQL looks like.

@earcanal
Copy link
Collaborator Author

We should move this into Moodle's backlog as I suspect it's also present in their trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant