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

Fix auto grading not working for multiple choice questions when multiple correct answers #6906

Merged
merged 3 commits into from
Jun 19, 2023

Conversation

m1r0
Copy link
Member

@m1r0 m1r0 commented May 22, 2023

Depends on #6884

Proposed Changes

This fixes the multiple choice questions auto grading not working when there are multiple correct answers.

image

Testing Instructions

  1. Create a quiz and add a multiple choice question that has multiple correct answers. Ensure that Auto Grade is disabled
  2. As a student, take the quiz.
  3. In Grading, find the quiz and click Grade quiz.
  4. Click the Auto grade button.
  5. The quiz should be graded correctly.
  6. Make sure the grading works with a single correct answer as well.
  7. Make sure the grading for all other question types is still working.

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Acceptance criteria is met
  • Decisions are publicly documented
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • New UIs match the designs
  • Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • Code is tested on the minimum supported PHP and WordPress versions
  • User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
  • "Needs Documentation" label is added if this change requires updates to documentation
  • Known issues are created as new GitHub issues

@m1r0 m1r0 added this to the 4.15.0 milestone May 22, 2023
@m1r0 m1r0 requested a review from a team May 22, 2023 20:27
@m1r0 m1r0 self-assigned this May 22, 2023
@github-actions
Copy link

github-actions bot commented May 22, 2023

WordPress Dependencies Report

The github-action-wordpress-dependencies-report action has detected some script changes between the commit 04c30bd and trunk. Please review and confirm the following are correct before merging.

Script Handle Added Dependencies Removed Dependencies Total Size Size Diff
js/grading-general.js 2.69 kB +30 B ( +1.13% 🔼 )

This comment was automatically generated by the github-action-wordpress-dependencies-report action.

@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #6906 (04c30bd) into trunk (72678a9) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              trunk    #6906   +/-   ##
=========================================
  Coverage     46.88%   46.88%           
  Complexity    10190    10190           
=========================================
  Files           554      554           
  Lines         36751    36751           
  Branches        381      381           
=========================================
  Hits          17230    17230           
  Misses        19215    19215           
  Partials        306      306           

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3f8ef1...04c30bd. Read the comment docs.

Base automatically changed from fix/auto-grading to trunk May 23, 2023 14:29
@donnapep
Copy link
Collaborator

I actually can't get auto-grading to work. When I click Auto Grade for this quiz, nothing happens. 🤔

Screenshot 2023-05-23 at 2 43 08 PM

@m1r0
Copy link
Member Author

m1r0 commented May 25, 2023

Are you testing on an entry that was already graded/saved? If yes, could you try on a new grading entry? I've noticed that the auto-grade is not working for already graded/saved entries but that's another issue...

Here's how it looks on my end:

CqQ4GC.mp4

@m1r0 m1r0 modified the milestones: 4.15.0, 4.16.0 Jun 1, 2023
Copy link
Member

@merkushin merkushin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great for multiple correct answers, thank you! 👍

@merkushin merkushin merged commit 8bbdd23 into trunk Jun 19, 2023
@merkushin merkushin deleted the fix/multiple-choice-question-auto-grading branch June 19, 2023 23:28
@donnapep donnapep modified the milestones: 4.16.0, 4.15.1 Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants