choice-box.php
1 year ago
fill-in-the-blank.php
3 years ago
image-answer.php
3 years ago
image-matching.php
1 year ago
matching.php
1 year ago
meta.php
5 days ago
open-ended.php
2 years ago
ordering.php
3 years ago
question.php
5 days ago
short-answer.php
1 year ago
image-answer.php
45 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Image answer |
| 4 | * |
| 5 | * @package Tutor\Templates |
| 6 | * @subpackage Single\Quiz\Parts |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @version 1.0.0 |
| 10 | */ |
| 11 | |
| 12 | ?> |
| 13 | <div class="quiz-question-ans-choice-area tutor-mt-40 question-type-<?php echo esc_attr( $question_type ); ?> <?php echo $answer_required ? 'quiz-answer-required' : ''; ?> "> |
| 14 | <?php |
| 15 | if ( is_array( $answers ) && count( $answers ) ) { |
| 16 | foreach ( $answers as $answer ) { |
| 17 | ?> |
| 18 | <div class="tutor-image-answer"> |
| 19 | <?php |
| 20 | if ( intval( $answer->image_id ) ) { |
| 21 | ?> |
| 22 | <div class="quiz-short-ans-image tutor-mb-32 tutor-mb-md-30"> |
| 23 | <?php |
| 24 | echo wp_kses( |
| 25 | '<img src="' . wp_get_attachment_image_url( $answer->image_id, 'full' ) . '" />', |
| 26 | array( |
| 27 | 'img' => array( 'src' => true ), |
| 28 | ) |
| 29 | ); |
| 30 | ?> |
| 31 | </div> |
| 32 | <?php } ?> |
| 33 | <div class="quiz-question-ans-choice"> |
| 34 | <input type="text" |
| 35 | class="tutor-form-control" |
| 36 | placeholder="<?php esc_attr_e( 'Write your answer here', 'tutor' ); ?>" |
| 37 | name="attempt[<?php echo esc_attr( $is_started_quiz->attempt_id ); ?>][quiz_question][<?php echo esc_attr( $question->question_id ); ?>][answer_id][<?php echo esc_attr( $answer->answer_id ); ?>]" /> |
| 38 | </div> |
| 39 | </div> |
| 40 | <?php |
| 41 | } |
| 42 | } |
| 43 | ?> |
| 44 | </div> |
| 45 |