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

Remove limit from fetching data for data export #7647

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/fix-report-export-limit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Remove limit from report export
2 changes: 1 addition & 1 deletion includes/class-sensei-analysis-course-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public function generate_report( $report ) {
$this->search = $search;

$args = array(
'number' => '',
'number' => -1,
Copy link
Member Author

@merkushin merkushin Jul 30, 2024

Choose a reason for hiding this comment

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

@donnapep
Here, I removed the limit completely to allow export all existing data (even if there are 100000 rows). This is how I get “Export all rows”.
On the other hand, we can read “Export all rows” as “Export all visible rows”. In this case, we need to apply the same limit we use on the page.

Copy link
Member Author

Choose a reason for hiding this comment

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

'offset' => 0,
'orderby' => $orderby,
'order' => $order,
Expand Down
2 changes: 1 addition & 1 deletion includes/class-sensei-analysis-lesson-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function generate_report( $report ) {
$this->search = $search;

$args = array(
'number' => '',
'number' => -1,
'offset' => 0,
'orderby' => $orderby,
'order' => $order,
Expand Down
Loading