LLMS_Student::get_grade( int $object_id, bool $use_cache = true )

Get the students grade for a lesson / course All grades are based on quizzes assigned to lessons


Parameters Parameters

$object_id

(int) (Required) WP Post ID of a course or lesson

$use_cache

(bool) (Optional) If true, uses cached results

Default value: true


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/models/model.llms.student.php

	public function get_grade( $object_id, $use_cache = true ) {
		$grade = llms()->grades()->get_grade( $object_id, $this, $use_cache );
		if ( is_null( $grade ) ) {
			$grade = _x( 'N/A', 'Grade to display when no quizzes taken or available', 'lifterlms' );
		}
		return apply_filters( 'llms_student_get_grade', $grade, $this, $object_id, get_post_type( $object_id ) );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
?? Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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