LLMS_Table_Achievements::get_results( array $args = array() )
Get table results.
Parameters Parameters
- $args
-
(array) (Optional) Table query arguments.
Default value: array()
Return Return
(void)
Source Source
File: includes/admin/reporting/tables/llms.table.achievements.php
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | 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_achievements( 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. |