LLMS_Quiz_Attempt_Question::get_correct_answer()

Retrieve answer HTML for the question correct answers


Return Return

(string)


Top ↑

Source Source

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

	public function get_correct_answer() {

		$ret     = '';
		$answers = $this->get_correct_answer_array();

		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_correct_answer', $ret, $answers, $this->get_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.