LLMS_Quiz_Attempt_Question::get_status()

Receive the graded status of the question


Return Return

(string) Attempt's question status [graded|waiting|none].


Top ↑

Source Source

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

	public function get_status() {

		$question = $this->get_question();

		if ( ! $question ) {
			return 'graded';
		}

		$status = 'none';

		if ( $this->get( 'points' ) >= 1 ) {

			if ( $question->get_auto_grade_type() ) {

				$status = 'graded';

			} elseif ( $question->supports( 'grading', 'manual' ) || $question->supports( 'grading', 'conditional' ) ) {

				if ( ! $this->get( 'correct' ) ) {
					$status = 'waiting';
				} else {
					$status = 'graded';
				}
			}
		}

		return $status;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.3.0 Account for deleted questions.
3.16.9 Unknown.
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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