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

	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.