LLMS_Analytics::get_courses_by_user_table( $user )


Description Description


Source Source

File: includes/class.llms.analytics.php

	public static function get_courses_by_user_table( $user ) {

		$courses_array = array();

		foreach ( $user->courses as $course ) {
			$c = new LLMS_Course( $course->post_id );
			$comp = $c->get_percent_complete( $user->id );
			$status = ( '100' == $comp ) ? 'Completed' : 'Enrolled';
			$link = get_edit_post_link( $course->post_id );
			$title = ( $link ) ? '<a href="' . $link . '">' . $course->post_title . '</a>' : $course->post_title;
			$course_array = array( $title, LLMS_Date::db_date( $course->updated_date ), $status, $comp . '%' );
			array_push( $courses_array, $course_array );
		}

		return $courses_array;

	}


Top ↑

User Contributed Notes User Contributed Notes

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