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)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.student.dashboard.php

	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',
			)
		);

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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