LLMS_Table_Student_Certificates::get_results( array $args = array() )
Get table results.
Parameters Parameters
- $args
-
(array) (Optional)
Default value: array()
Return Return
(void)
Source Source
File: includes/admin/reporting/tables/llms.table.certificates.php
public function get_results( $args = array() ) {
$args = $this->clean_args( $args );
if ( is_numeric( $args['student'] ) ) {
$args['student'] = new LLMS_Student( $args['student'] );
}
$this->student = $args['student'];
if ( isset( $args['page'] ) ) {
$this->current_page = absint( $args['page'] );
}
$query = $this->student->get_certificates(
array(
'per_page' => 10,
'status' => array( 'publish', 'future' ),
'paged' => $this->current_page,
'sort' => array(
'date' => 'ASC',
'ID' => 'ASC',
),
)
);
$this->max_pages = $query->get_max_pages();
if ( $this->max_pages > $this->current_page ) {
$this->is_last_page = false;
}
$this->tbody_data = $query->get_awards();
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |