LLMS_Quiz::get_question_value( int $question_id )

Get the (points) value of a question


Description Description


Parameters Parameters

$question_id

(int) (Required) WP Post ID of the LLMS_Question


Top ↑

Return Return

(int)


Top ↑

Source Source

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

	public function get_question_value( $question_id ) {

		foreach ( $this->get_questions_raw() as $q ) {
			if ( $question_id == $q['id'] ) {
				return absint( $q['points'] );
			}
		}

		return 0;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.3.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: