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 some reports not exporting all rows #7670

Merged
merged 7 commits into from
Aug 22, 2024
Merged

Conversation

donnapep
Copy link
Collaborator

@donnapep donnapep commented Aug 20, 2024

Resolves #7666.

Proposed Changes

  • Reverts Remove limit from fetching data for data export #7647.
  • Conditionally sets the number arg based on which report is being exported:
    • Sets it to an empty string for the students report, as that ultimately ends up getting passed to the get_comments function inside sensei_check_for_activity. As per this doc, an empty string should be used to return all rows.
    • Sets it to -1 for the lessons report, as that is ultimately used to set posts_per_page for WP_Query. As per this doc, -1 should be used to show all posts.

Testing Instructions

  1. Go to Reports > Courses and select a course.
  2. Export the rows (ensure there are multiple) and check that they were all exported.
  3. Click on Students taking this Course.
  4. Export the rows (ensure there are multiple) and check that they were all exported.
  5. Go to Reports > Lessons and select a course.
  6. Export the rows (ensure there are multiple) and check that they were all exported.

Note that I tested exporting all other reports and they work.

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
  • Legacy courses (course without blocks) are tested
  • 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

@donnapep donnapep added this to the 4.24.3 milestone Aug 20, 2024
@donnapep donnapep self-assigned this Aug 20, 2024
Copy link

Test the previous changes of this PR with WordPress Playground.

Copy link

Test the previous changes of this PR with WordPress Playground.

@donnapep donnapep changed the title Fix reports not reporting Fix some reports not reporting all rows Aug 20, 2024
@donnapep donnapep changed the title Fix some reports not reporting all rows Fix some reports not exporting all rows Aug 20, 2024
Copy link

Test the previous changes of this PR with WordPress Playground.

Copy link

Test the previous changes of this PR with WordPress Playground.

Copy link

Test the previous changes of this PR with WordPress Playground.

@donnapep donnapep requested a review from a team August 21, 2024 14:56
@donnapep donnapep merged commit d2ee44e into trunk Aug 22, 2024
23 checks passed
@donnapep donnapep deleted the fix/report-not-exporting branch August 22, 2024 13:17
@donnapep
Copy link
Collaborator Author

Merging as I've already done manual testing as well as added automated tests.

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.

Names of students taking a course are not being exported to CSV file
1 participant