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
Return Return
(mixed)
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 ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
?? | Introduced. |