LLMS_Quiz_Attempt::get_question_order( int $question_id )
Get the numeric order of a question in a given quiz
Description Description
Parameters Parameters
- $question_id
-
(int) (Required) WP Post ID of the LLMS_Question
Return Return
(int)
Source Source
File: includes/models/model.llms.quiz.attempt.php
public function get_question_order( $question_id ) { foreach ( $this->get_questions() as $order => $data ) { if ( $data['id'] == $question_id ) { return $order + 1; } } return 0; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.9.2 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: