LLMS_Quiz::get_question_value( int $question_id )
Get the (points) value of a question.
Parameters Parameters
- $question_id
-
(int) (Required) WP Post ID of the LLMS_Question.
Return Return
(int)
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.37.2 | Use strict comparison '===' in place of '=='. |
3.3.0 | Introduced. |