LLMS_Quiz_Attempt_Question::get_status()
Receive the graded status of the question
Return Return
(string) Attempt's question status [graded|waiting|none].
Source Source
File: includes/models/model.llms.quiz.attempt.question.php
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | 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 ; } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.3.0 | Account for deleted questions. |
3.16.9 | Unknown. |
3.16.0 | Introduced. |