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

Add a new service to allow Anonymous Users to vote on xblock-poll #314

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

Danyal-Faheem
Copy link
Collaborator

Changes

  • Service AnonymousUserPollService was added to the edx-platform runtime.
  • This service was needed to allow anonymous users to vote on polls using xblock-poll as the FieldDataCache object was not caching data for anonymous users and the ORM would try to create new entries in the table with the same primary key, thereby resulting in an integrity error.
  • The service has a method get_tally which just gets the tally of the poll from the database.
  • The service has another method vote which updates the tally in the database based on the choice of the anonymous user.

@Danyal-Faheem Danyal-Faheem self-assigned this Nov 23, 2023
@Danyal-Faheem Danyal-Faheem changed the title Add a new service to allow Anonymous Users to vote on xblock-polls Add a new service to allow Anonymous Users to vote on xblock-poll Nov 23, 2023
@Danyal-Faheem Danyal-Faheem merged commit de0403a into develop Nov 23, 2023
@Danyal-Faheem Danyal-Faheem deleted the Danyal-Faheem/make-polls-public branch November 23, 2023 11:33
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

Successfully merging this pull request may close these issues.

2 participants