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 progress validation command #7160

Merged
merged 20 commits into from
Nov 6, 2023
Merged

Add progress validation command #7160

merged 20 commits into from
Nov 6, 2023

Conversation

m1r0
Copy link
Member

@m1r0 m1r0 commented Sep 8, 2023

Resolves #7079

Proposed Changes

  • Add a WP CLI command that validates the migrated progress data.
  • Fixes quiz progress not migrating when multiple users have progress on the same quiz.

Testing Instructions

  1. Enable the HPPS feature add_filter( 'sensei_feature_flag_tables_based_progress', '__return_true' );.
  2. Run the student progress migration following the testing instructions at Add student progress migration #7049.
  3. Run the following command in your WordPress folder: wp sensei validate progress.
  4. You should see Success: Progress data is valid..
  5. Try deleting a progress entry in your wp_sensei_lms_progress table.
  6. You should see a Course/Lesson/Quiz tables based progress not found error.
  7. Try changing the progress status in your wp_sensei_lms_progress table.
  8. You should see a Data mismatch between comments and tables based progress. error.

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 the HPPS label Sep 8, 2023
@m1r0 m1r0 self-assigned this Sep 8, 2023
@m1r0 m1r0 changed the title Add/progress validation cli Add progress validation command Sep 8, 2023
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Merging #7160 (f93f87f) into trunk (feef998) will increase coverage by 0.22%.
Report is 99 commits behind head on trunk.
The diff coverage is 53.38%.

Impacted file tree graph

@@             Coverage Diff              @@
##              trunk    #7160      +/-   ##
============================================
+ Coverage     50.31%   50.53%   +0.22%     
- Complexity    10862    10932      +70     
============================================
  Files           601      607       +6     
  Lines         45675    46149     +474     
  Branches        402      402              
============================================
+ Hits          22980    23322     +342     
- Misses        22368    22500     +132     
  Partials        327      327              
Files Coverage Δ
includes/admin/class-sensei-admin-notices.php 50.86% <ø> (ø)
includes/admin/class-sensei-learner-management.php 4.20% <ø> (ø)
...-sensei-learners-admin-bulk-actions-controller.php 40.12% <ø> (ø)
.../class-sensei-learners-admin-bulk-actions-view.php 55.47% <ø> (ø)
includes/admin/class-sensei-learners-main.php 5.30% <ø> (ø)
includes/admin/class-sensei-tools.php 21.49% <ø> (ø)
...s/admin/home/class-sensei-home-remote-data-api.php 95.52% <ø> (ø)
...dmin/home/help/class-sensei-home-help-provider.php 97.43% <ø> (ø)
...ome/notices/class-sensei-home-notices-provider.php 100.00% <ø> (ø)
...s/admin/home/notices/class-sensei-home-notices.php 90.98% <ø> (ø)
... and 89 more

... and 13 files 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 cda7d61...f93f87f. Read the comment docs.

@m1r0 m1r0 added this to the 4.19.0 milestone Oct 16, 2023
@m1r0 m1r0 marked this pull request as ready for review October 18, 2023 18:16
@m1r0 m1r0 requested a review from a team October 18, 2023 18:16
merkushin
merkushin previously approved these changes Oct 19, 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.

Looks good. Works as expected :)

I left a few optional suggestions.

@donnapep donnapep modified the milestones: 4.19.0, 4.20.0 Oct 31, 2023
@m1r0 m1r0 merged commit 4de7eca into trunk Nov 6, 2023
23 checks passed
@m1r0 m1r0 deleted the add/progress-validation-cli branch November 6, 2023 11:33
@donnapep donnapep modified the milestones: 4.20.0, 4.19.2 Nov 9, 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.

Make a CLI command for validating the migrated progress data
3 participants