AssignmentsReportsGenerator::fetch()
Custom fetcher to load the assignments from database and setup the pagination
Description
Source
File: bp-integrations/learndash/buddypress/generators/AssignmentsReportsGenerator.php
public function fetch()
{
$assignmentQuery = $this->getGroupAssignments($this->args);
// print_r($assignmentQuery->request);die();
$this->results = $assignmentQuery->posts;
$this->pager = [
'total_items' => $assignmentQuery->found_posts,
'per_page' => $assignmentQuery->query_vars['posts_per_page'],
'total_pages' => $assignmentQuery->max_num_pages
];
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.