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.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / views / modal / question_answer_list.php
tutor / views / modal Last commit date
edit-lesson.php 3 years ago edit_quiz.php 3 years ago login.php 3 years ago question_answer_form.php 3 years ago question_answer_list.php 3 years ago question_form.php 3 years ago review.php 3 years ago topic-form.php 3 years ago
question_answer_list.php
106 lines
1 <?php
2 /**
3 * Quiz question answer list
4 *
5 * @package Tutor\Views
6 * @subpackage Tutor\Modal
7 * @author Themeum <support@themeum.com>
8 * @link https://themeum.com
9 * @since 1.0.0
10 */
11
12 use TUTOR\Question_Answers_List;
13
14 if ( 'open_ended' === $question_type || 'short_answer' === $question_type ) {
15 echo '<p class="tutor-px-32 tutor-py-16">' .
16 esc_html__( 'No option is necessary for this answer type', 'tutor' ) .
17 '</p>';
18 return '';
19 }
20 ?>
21
22 <div id="tutor_quiz_question_answers" data-question-id="<?php echo esc_attr( $question_id ); ?>">
23 <?php
24 $answers = Question_Answers_List::answer_list_by_question( $question_id, $question_type );
25
26 if ( is_array( $answers ) && count( $answers ) ) {
27 foreach ( $answers as $answer ) {
28 ?>
29 <div class="tutor-quiz-answer-wrap" data-answer-id="<?php echo esc_attr( $answer->answer_id ); ?>">
30 <div class="tutor-quiz-answer">
31 <span class="tutor-quiz-answer-title">
32 <?php
33 echo esc_html( stripslashes( $answer->answer_title ) );
34 if ( 'fill_in_the_blank' === $answer->belongs_question_type ) {
35 ?>
36 <?php esc_html_e( 'Answer', 'tutor' ); ?>
37 <strong>
38 <?php echo esc_html( stripslashes( $answer->answer_two_gap_match ) ); ?>
39 </strong>
40 <?php
41 }
42
43 if ( 'matching' === $answer->belongs_question_type ) {
44 echo ' - ' . esc_html( stripslashes( $answer->answer_two_gap_match ) );
45 }
46 ?>
47 </span>
48
49 <?php
50 // Show image for the single answer.
51 if ( $answer->image_id ) {
52 echo '<span class="tutor-question-answer-image">
53 <img src="' . esc_url( wp_get_attachment_image_url( $answer->image_id ) ) . '" /></span>';
54 }
55
56 if ( 'true_false' === $question_type || 'single_choice' === $question_type ) {
57 ?>
58 <span class="tutor-quiz-answers-mark-correct-wrap tutor-mr-4">
59 <input type="radio" name="mark_as_correct[<?php echo esc_attr( $answer->belongs_question_id ); ?>]" value="<?php echo esc_attr( $answer->answer_id ); ?>" title="<?php esc_html_e( 'Mark as correct', 'tutor' ); ?>" <?php checked( 1, $answer->is_correct ); ?> >
60 </span>
61 <?php
62 } elseif ( 'multiple_choice' === $question_type ) {
63 ?>
64 <span class="tutor-quiz-answers-mark-correct-wrap tutor-mr-4">
65 <input type="checkbox" name="mark_as_correct[<?php echo esc_attr( $answer->belongs_question_id ); ?>]" value="<?php echo esc_attr( $answer->answer_id ); ?>" title="<?php esc_html_e( 'Mark as correct', 'tutor' ); ?>" <?php checked( 1, $answer->is_correct ); ?> >
66 </span>
67 <?php
68 }
69 ?>
70
71 <?php if ( 'true_false' !== $question_type ) : ?>
72 <span class="tutor-quiz-answer-edit tutor-mr-4">
73 <a class="tutor-iconic-btn" href="javascript:;">
74 <i class="tutor-icon-pencil" area-hidden="true"></i>
75 </a>
76 </span>
77 <?php endif; ?>
78
79 <?php if ( 'fill_in_the_blank' !== $question_type ) : ?>
80 <span class="tutor-quiz-answer-sort-icon">
81 <i class="tutor-d-flex tutor-icon-hamburger-o"></i>
82 </span>
83 <?php endif; ?>
84 </div>
85
86 <?php if ( 'true_false' !== $question_type && 'fill_in_the_blank' !== $question_type ) : ?>
87 <div class="tutor-quiz-answer-trash-wrap tutor-d-flex">
88 <a href="javascript:;" class="answer-trash-btn answer-trash-btn tutor-d-flex tutor-align-center" data-answer-id="<?php echo esc_attr( $answer->answer_id ); ?>">
89 <i class="tutor-icon-trash-can"></i>
90 </a>
91 </div>
92 <?php endif; ?>
93 </div>
94 <?php
95 }
96 }
97 ?>
98 </div>
99
100 <?php if ( 'true_false' != $question_type && ( 'fill_in_the_blank' != $question_type || empty( $answers ) ) ) : ?>
101 <a href="javascript:;" class="add_question_answers_option tutor-btn tutor-d-flex tutor-align-center" data-question-id="<?php echo esc_attr( $question_id ); ?>">
102 <i class="tutor-icon-plus-o "></i>
103 <?php esc_html_e( 'Add An Option', 'tutor' ); ?>
104 </a>
105 <?php endif; ?>
106