LLMS_Analytics::get_total_current_enrolled_users( [array] $students )

Get number of students enrolled in course with status of enrolled


Description Description


Parameters Parameters

$students

([array]) (Required) [array of student objects]


Top ↑

Return Return

([int]) [total number of enrolled users]


Top ↑

Source Source

File: includes/class.llms.analytics.php

	public static function get_total_current_enrolled_users( $students ) {

		$units = 0;

		if ( $students ) {

			foreach ( $students as $student ) {
				if ( 'Enrolled' === $student->status ) {
					$units++;
				}
			}
		}

		return $units;
	}


Top ↑

User Contributed Notes User Contributed Notes

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