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_Table_StudentManagement::get_enrollments( obj $student )
Retrieve a list of IDs for all the users enrollments
Parameters Parameters
- $student
-
(obj) (Required) instance of LLMS_Student
Return Return
(array) array of course ids
Source Source
File: includes/admin/post-types/tables/class.llms.table.student.management.php
private function get_enrollments( $student ) { $r = array(); $page = 1; $skip = 0; while ( true ) { $courses = $student->get_courses( array( 'limit' => 5000, 'skip' => 5000 * ( $page - 1 ), ) ); $r = array_merge( $courses['results'] ); if ( ! $courses['more'] ) { break; } else { $page++; } } return $r; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |