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 restart quiz redirects to the course complete page if the course was completed #7377

Merged
merged 5 commits into from Dec 12, 2023

Conversation

m1r0
Copy link
Member

@m1r0 m1r0 commented Dec 11, 2023

Resolves #7212

Proposed Changes

Fix a bug that causes the reset quiz button to redirect to the course complete page if the course was completed. This was happening because the course progress was in the wrong state after a reset.

Testing Instructions

  1. Create a course with lessons.
  2. Create a quiz with the "Allow Retakes" setting enabled.
  3. Complete the course.
  4. Return to the quiz and click on "Restart Quiz".
  5. You should be redirected to the back to the quiz.

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.19.3 milestone Dec 11, 2023
@m1r0 m1r0 self-assigned this Dec 11, 2023
@m1r0 m1r0 marked this pull request as ready for review December 11, 2023 22:23
@m1r0 m1r0 requested a review from a team December 11, 2023 22:33
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Merging #7377 (645ceb9) into trunk (8f61415) will increase coverage by 0.00%.
Report is 12 commits behind head on trunk.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              trunk    #7377   +/-   ##
=========================================
  Coverage     50.74%   50.75%           
+ Complexity    11148    11147    -1     
=========================================
  Files           613      613           
  Lines         47060    47053    -7     
  Branches        404      404           
=========================================
- Hits          23881    23880    -1     
+ Misses        22852    22846    -6     
  Partials        327      327           
Files Coverage Δ
assets/admin/editor-wizard/patterns-list.js 26.66% <ø> (ø)
includes/class-sensei-quiz.php 69.63% <100.00%> (+0.17%) ⬆️
includes/class-sensei-utils.php 52.70% <100.00%> (-0.24%) ⬇️

... and 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 66b9d31...645ceb9. Read the comment docs.

@m1r0 m1r0 merged commit c2213aa into trunk Dec 12, 2023
24 checks passed
@m1r0 m1r0 deleted the fix/redirect-reset-quiz branch December 12, 2023 21:57
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.

Restart Quiz redirects to the course completed page if the course was completed
2 participants