LLMS_Quiz_Attempt_Question::get_answer()

Retrieve answer HTML for the question answers


Return Return

(string)


Top ↑

Source Source

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

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
public function get_answer() {
 
    $question = $this->get_question();
    $answers  = $this->get_answer_array();
    $ret      = apply_filters( 'llms_quiz_attempt_question_get_answer_pre', '', $answers, $question, $this );
 
    if ( ! $ret ) {
 
        if ( $answers ) {
 
            $ret = '<ul class="llms-quiz-attempt-answers">';
            foreach ( $answers as $answer ) {
                $ret .= sprintf( '<li class="llms-quiz-attempt-answer">%s</li>', wp_kses_post( $answer ) );
            }
            $ret .= '</ul>';
 
        }
    }
 
    return apply_filters( 'llms_quiz_attempt_question_get_answer', $ret, $answers, $question, $this );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.16.15 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.