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_Grades::get_grade_from_cache( LLMS_Post_Model $post, LLMS_Student $student )

Retrieve a grade from the wp_cache


Parameters Parameters

$post

(LLMS_Post_Model) (Required) A LLMS_Post_Model object.

$student

(LLMS_Student) (Required) A LLMS_Student object.


Top ↑

Return Return

(mixed) grade as a float null if there's no grade for the post false if the grade wasn't found in the cache


Top ↑

Source Source

File: includes/class-llms-grades.php

	private function get_grade_from_cache( $post, $student ) {

		return wp_cache_get(
			sprintf( '%d_grade', $post->get( 'id' ) ),
			sprintf( 'student_%d', $student->get( 'id' ) )
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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