Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Student_Dashboard::get_courses( integer $limit = 10, integer $skip )
Get list of student’s courses used for recent courses on the dashboard and all courses (paginated) on the “View Courses” endpoint
Parameters Parameters
- $limit
-
(integer) (Optional) number of courses to return
Default value: 10
- $skip
-
(integer) (Required) number of courses to skip (for pagination)
Return Return
(array)
Source Source
File: includes/class.llms.student.dashboard.php
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | private static function get_courses( $limit = 10, $skip = 0 ) { // Get sorting option. $option = get_option( 'lifterlms_myaccount_courses_in_progress_sorting' , 'date,DESC' ); // Parse to order & orderby. $option = explode ( ',' , $option ); $orderby = ! empty ( $option [0] ) ? $option [0] : 'date' ; $order = ! empty ( $option [1] ) ? $option [1] : 'DESC' ; $student = new LLMS_Student(); return $student ->get_courses( array ( 'limit' => $limit , 'order' => $order , 'orderby' => $orderby , 'skip' => $skip , 'status' => 'enrolled' , ) ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.6.0 | Introduced. |