LLMS_Quiz_Attempt_Question::get_status_icon()
Retrieve the status icon HTML based on the question’s status/answer
Return Return
(string)
Source Source
File: includes/models/model.llms.quiz.attempt.question.php
public function get_status_icon() { $icon = ''; switch ( $this->get_status() ) { case 'graded': if ( $this->is_correct() ) { $icon = 'check'; $tip = esc_attr__( 'Correct answer', 'lifterlms' ); } else { $icon = 'times'; $tip = esc_attr__( 'Incorrect answer', 'lifterlms' ); } break; case 'waiting': $icon = 'clock-o'; $tip = esc_attr__( 'Awaiting review', 'lifterlms' ); break; } if ( $icon ) { return sprintf( '<span class="llms-status-icon-tip tip--top-left" data-tip="%1$s"><i class="llms-status-icon fa fa-%2$s"></i><span>', $tip, $icon ); } return ''; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.0 | Introduced. |