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


Top ↑

Return Return

(array) array of course ids


Top ↑

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;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.