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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_edit_form.php
tutor / views / modal Last commit date
add_quiz.php 4 years ago edit-lesson.php 4 years ago edit_quiz.php 4 years ago question_answer_edit_form.php 4 years ago question_answer_form.php 4 years ago question_form.php 4 years ago review.php 4 years ago
question_answer_edit_form.php
260 lines
1 <?php
2 if ( $question_type === 'open_ended' ) {
3 echo '<p class="open-ended-notice" style="color: #ff0000;">' . __( 'No option is necessary for this answer type', 'tutor' ) . '</p>';
4 return '';
5 }
6
7 $answer_title = ! empty( $old_answer->answer_title ) ? stripslashes( $old_answer->answer_title ) : '';
8 $image_id = ! empty( $old_answer->image_id ) ? $old_answer->image_id : '';
9 $answer_view_format = ! empty( $old_answer->answer_view_format ) ? $old_answer->answer_view_format : '';
10 $answer_two_gap_match = ! empty( $old_answer->answer_two_gap_match ) ? stripslashes( $old_answer->answer_two_gap_match ) : '';
11 ?>
12
13 <div class="tutor-quiz-question-answers-form">
14
15 <input type="hidden" name="tutor_quiz_answer_id" value="<?php echo esc_attr( $old_answer->answer_id ); ?>" />
16
17 <?php
18 if ( $question_type === 'true_false' ) {
19 // No Need
20 } elseif ( $question_type === 'multiple_choice' || $question_type === 'single_choice' || $question_type === 'ordering' ) {
21
22 ?>
23
24 <div class="tutor-quiz-builder-group">
25 <h4><?php _e( 'Answer title', 'tutor' ); ?></h4>
26 <div class="tutor-quiz-builder-row">
27 <div class="tutor-quiz-builder-col">
28 <input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
29 </div>
30 </div>
31 </div>
32
33 <div class="tutor-quiz-builder-group">
34 <h4><?php _e( 'Upload Image', 'tutor' ); ?></h4>
35 <div class="tutor-quiz-builder-row">
36 <div class="tutor-quiz-builder-col">
37 <div class="tutor-media-upload-wrap">
38 <input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="<?php echo esc_attr( $image_id ); ?>">
39 <div class="tutor-media-preview">
40 <a href="javascript:;" class="tutor-media-upload-btn">
41 <?php
42 if ( $image_id ) {
43 echo '<img src="' . esc_url( wp_get_attachment_image_url( $image_id ) ) . '" />';
44 } else {
45 echo '<i class="tutor-icon-image1"></i>';
46 }
47 ?>
48 </a>
49 </div>
50 <div class="tutor-media-upload-trash-wrap">
51 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
52 </div>
53 </div>
54 </div>
55 </div>
56 </div>
57 <div class="tutor-quiz-builder-group">
58 <h4><?php _e( 'Display format for options', 'tutor' ); ?></h4>
59 <div class="tutor-quiz-builder-row">
60 <div class="tutor-quiz-builder-col auto-width">
61 <label>
62 <input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text" <?php echo $answer_view_format ? checked( 'text', $answer_view_format ) : 'checked'; ?>>
63 <?php _e( 'Only text', 'tutor' ); ?>
64 </label>
65 </div>
66 <div class="tutor-quiz-builder-col auto-width">
67 <label>
68 <input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="image" <?php echo checked( 'image', $answer_view_format ); ?>>
69 <?php _e( 'Only Image', 'tutor' ); ?>
70 </label>
71 </div>
72 <div class="tutor-quiz-builder-col auto-width">
73 <label>
74 <input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text_image" <?php echo checked( 'text_image', $answer_view_format ); ?> >
75 <?php _e( 'Text &amp; Image both', 'tutor' ); ?>
76 </label>
77 </div>
78 </div>
79 </div>
80 <?php
81 } elseif ( $question_type === 'fill_in_the_blank' ) {
82 ?>
83 <div class="tutor-quiz-builder-group">
84 <h4><?php _e( 'Question Title', 'tutor' ); ?></h4>
85 <div class="tutor-quiz-builder-row">
86 <div class="tutor-quiz-builder-col">
87 <input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
88 </div>
89 </div>
90 <p class="help">
91 <?php _e( 'Please make sure that <b>{dash}</b> variable contains in your question title to show dash, You can use multiple variable', 'tutor' ); ?>
92 </p>
93 </div>
94
95 <div class="tutor-quiz-builder-group">
96 <h4><?php _e( 'Correct Answer(s)', 'tutor' ); ?></h4>
97 <div class="tutor-quiz-builder-row">
98 <div class="tutor-quiz-builder-col">
99 <input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_two_gap_match]" value="<?php echo esc_attr( $answer_two_gap_match ); ?>">
100 </div>
101 </div>
102 <p class="help"><?php _e( 'Separate multiple answer by pipe <b>( | )</b> , 1 answer per variable assigned in question', 'tutor' ); ?></p>
103 </div>
104
105
106 <?php
107 } elseif ( $question_type === 'matching' ) {
108 ?>
109 <div class="tutor-quiz-builder-group">
110 <h4><?php _e( 'Answer title', 'tutor' ); ?></h4>
111 <div class="tutor-quiz-builder-row">
112 <div class="tutor-quiz-builder-col">
113 <input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
114 </div>
115 </div>
116 </div>
117 <div class="tutor-quiz-builder-group">
118 <h4><?php _e( 'Matched Answer title', 'tutor' ); ?></h4>
119 <div class="tutor-quiz-builder-row">
120 <div class="tutor-quiz-builder-col">
121 <input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][matched_answer_title]" value="<?php echo esc_attr( $answer_two_gap_match ); ?>"/>
122 </div>
123 </div>
124 </div>
125
126 <div class="tutor-quiz-builder-group">
127 <h4><?php _e( 'Upload Image', 'tutor' ); ?></h4>
128 <div class="tutor-quiz-builder-row">
129 <div class="tutor-quiz-builder-col">
130 <div class="tutor-media-upload-wrap">
131 <input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="<?php echo esc_attr( $image_id ); ?>"/>
132 <div class="tutor-media-preview">
133 <a href="javascript:;" class="tutor-media-upload-btn">
134 <?php
135 if ( $image_id ) {
136 echo '<img src="' . esc_url( wp_get_attachment_image_url( $image_id ) ) . '" />';
137 } else {
138 echo '<i class="tutor-icon-image1"></i>';
139 }
140 ?>
141 </a>
142 </div>
143 <div class="tutor-media-upload-trash-wrap">
144 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
145 </div>
146 </div>
147 </div>
148 </div>
149 </div>
150
151 <div class="tutor-quiz-builder-group">
152 <h4><?php _e( 'Display format for options', 'tutor' ); ?></h4>
153 <div class="tutor-quiz-builder-row">
154 <div class="tutor-quiz-builder-col auto-width">
155 <label>
156 <input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text" <?php echo $answer_view_format ? checked( 'text', $answer_view_format ) : 'checked'; ?>>
157 <?php _e( 'Only text', 'tutor' ); ?>
158 </label>
159 </div>
160 <div class="tutor-quiz-builder-col auto-width">
161 <label>
162 <input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="image" <?php echo checked( 'image', $answer_view_format ); ?> >
163 <?php _e( 'Only Image', 'tutor' ); ?>
164 </label>
165 </div>
166 <div class="tutor-quiz-builder-col auto-width">
167 <label>
168 <input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text_image" <?php echo checked( 'text_image', $answer_view_format ); ?> >
169 <?php _e( 'Text &amp; Image both', 'tutor' ); ?>
170 </label>
171 </div>
172 </div>
173 </div>
174
175 <?php
176 } elseif ( $question_type === 'image_matching' ) {
177 ?>
178
179 <div class="tutor-quiz-builder-group">
180 <h4><?php _e( 'Upload Image', 'tutor' ); ?></h4>
181 <div class="tutor-quiz-builder-row">
182 <div class="tutor-quiz-builder-col">
183 <div class="tutor-media-upload-wrap">
184 <input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="<?php echo esc_attr( $image_id ); ?>">
185 <div class="tutor-media-preview">
186 <a href="javascript:;" class="tutor-media-upload-btn">
187 <?php
188 if ( $image_id ) {
189 echo '<img src="' . esc_url( wp_get_attachment_image_url( $image_id ) ) . '" />';
190 } else {
191 echo '<i class="tutor-icon-image1"></i>';
192 }
193 ?>
194 </a>
195 </div>
196 <div class="tutor-media-upload-trash-wrap">
197 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
198 </div>
199 </div>
200 </div>
201 </div>
202 </div> <!-- /.tutor-quiz-builder-group -->
203
204 <div class="tutor-quiz-builder-group">
205 <h4><?php _e( 'Image matched text', 'tutor' ); ?></h4>
206 <div class="tutor-quiz-builder-row">
207 <div class="tutor-quiz-builder-col">
208 <input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
209 </div>
210 </div>
211 </div> <!-- /.tutor-quiz-builder-group -->
212
213 <?php
214 } elseif ( $question_type === 'image_answering' ) {
215 ?>
216 <div class="tutor-quiz-builder-group">
217 <h4><?php _e( 'Upload Image', 'tutor' ); ?></h4>
218 <div class="tutor-quiz-builder-row">
219 <div class="tutor-quiz-builder-col">
220 <div class="tutor-media-upload-wrap">
221 <input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="<?php echo esc_attr( $image_id ); ?>">
222 <div class="tutor-media-preview">
223 <a href="javascript:;" class="tutor-media-upload-btn">
224 <?php
225 if ( $image_id ) {
226 echo '<img src="' . esc_url( wp_get_attachment_image_url( $image_id ) ) . '" />';
227 } else {
228 echo '<i class="tutor-icon-image1"></i>';
229 }
230 ?>
231 </a>
232 </div>
233 <div class="tutor-media-upload-trash-wrap">
234 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
235 </div>
236 </div>
237 </div>
238 </div>
239 </div> <!-- /.tutor-quiz-builder-group -->
240
241 <div class="tutor-quiz-builder-group">
242 <h4><?php _e( 'Answer input value', 'tutor' ); ?></h4>
243 <div class="tutor-quiz-builder-row">
244 <div class="tutor-quiz-builder-col">
245 <input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
246 </div>
247 </div>
248 <p class="help"><?php _e( 'The answers that students enter should match with this text. Write in <strong>small caps</strong>', 'tutor' ); ?></p>
249 </div> <!-- /.tutor-quiz-builder-group -->
250
251 <?php
252 }
253 ?>
254
255 <div class="tutor-quiz-answers-form-footer tutor-quiz-builder-form-row">
256 <button type="button" id="quiz-answer-edit-btn" class="tutor-answer-edit-btn"><i class="tutor-icon-pencil"></i> <?php _e( 'Update Answer', 'tutor' ); ?></button>
257 </div>
258
259 </div>
260