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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 5 years ago edit-lesson.php 5 years ago edit_quiz.php 5 years ago question_answer_edit_form.php 5 years ago question_answer_form.php 5 years ago question_form.php 5 years ago
question_answer_edit_form.php
256 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</p>';
4 return '';
5 }
6
7 $answer_title = ! empty($old_answer->answer_title) ? $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) ? $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 $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 $question_id; ?>][answer_title]" value="<?php echo $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 $question_id; ?>][image_id]" value="<?php echo $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="'.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 $question_id; ?>][answer_view_format]" value="text" <?php
63 echo $answer_view_format ? checked('text', $answer_view_format) : 'checked="checked"' ?>> <?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 $question_id; ?>][answer_view_format]" value="image" <?php echo
69 checked('image', $answer_view_format) ?> > <?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 $question_id; ?>][answer_view_format]" value="text_image" <?php echo checked('text_image', $answer_view_format) ?> > <?php _e('Text &amp; Image both', 'tutor'); ?>
75 </label>
76 </div>
77 </div>
78 </div>
79 <?php
80 }elseif($question_type === 'fill_in_the_blank'){
81 ?>
82 <div class="tutor-quiz-builder-group">
83 <h4><?php _e('Question Title', 'tutor'); ?></h4>
84 <div class="tutor-quiz-builder-row">
85 <div class="tutor-quiz-builder-col">
86 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
87 </div>
88 </div>
89 <p class="help"><?php _e( 'Please make sure that <b>{dash}</b> variable contains in your question title to show dash, You can use multiple variable', 'tutor' ); ?></p>
90 </div>
91
92 <div class="tutor-quiz-builder-group">
93 <h4><?php _e('Correct Answer(s)', 'tutor'); ?></h4>
94 <div class="tutor-quiz-builder-row">
95 <div class="tutor-quiz-builder-col">
96 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_two_gap_match]" value="<?php echo $answer_two_gap_match; ?>">
97 </div>
98 </div>
99 <p class="help"><?php _e( 'Separate multiple answer by pipe <b>( | )</b> , 1 answer per variable assigned in question', 'tutor' ); ?></p>
100 </div>
101
102
103 <?php
104 }elseif($question_type === 'matching'){
105 ?>
106 <div class="tutor-quiz-builder-group">
107 <h4><?php _e('Answer title', 'tutor'); ?></h4>
108 <div class="tutor-quiz-builder-row">
109 <div class="tutor-quiz-builder-col">
110 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
111 </div>
112 </div>
113 </div>
114 <div class="tutor-quiz-builder-group">
115 <h4><?php _e('Matched Answer title', 'tutor'); ?></h4>
116 <div class="tutor-quiz-builder-row">
117 <div class="tutor-quiz-builder-col">
118 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][matched_answer_title]" value="<?php echo $answer_two_gap_match; ?>">
119 </div>
120 </div>
121 </div>
122
123 <div class="tutor-quiz-builder-group">
124 <h4><?php _e('Upload Image', 'tutor'); ?></h4>
125 <div class="tutor-quiz-builder-row">
126 <div class="tutor-quiz-builder-col">
127 <div class="tutor-media-upload-wrap">
128 <input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
129 <div class="tutor-media-preview">
130 <a href="javascript:;" class="tutor-media-upload-btn">
131 <?php
132 if ($image_id){
133 echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
134 }else{
135 echo '<i class="tutor-icon-image1"></i>';
136 }
137 ?>
138 </a>
139 </div>
140 <div class="tutor-media-upload-trash-wrap">
141 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
142 </div>
143 </div>
144 </div>
145 </div>
146 </div>
147
148 <div class="tutor-quiz-builder-group">
149 <h4><?php _e('Display format for options', 'tutor'); ?></h4>
150 <div class="tutor-quiz-builder-row">
151 <div class="tutor-quiz-builder-col auto-width">
152 <label>
153 <input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text" <?php echo $answer_view_format ? checked('text', $answer_view_format) : 'checked="checked"' ?>>
154 <?php _e('Only text', 'tutor'); ?>
155 </label>
156 </div>
157 <div class="tutor-quiz-builder-col auto-width">
158 <label>
159 <input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="image" <?php echo checked('image', $answer_view_format) ?> >
160 <?php _e('Only Image', 'tutor'); ?>
161 </label>
162 </div>
163 <div class="tutor-quiz-builder-col auto-width">
164 <label>
165 <input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text_image" <?php echo checked('text_image', $answer_view_format) ?> >
166 <?php _e('Text &amp; Image both', 'tutor'); ?>
167 </label>
168 </div>
169 </div>
170 </div>
171
172 <?php
173 }elseif ($question_type === 'image_matching'){
174 ?>
175
176 <div class="tutor-quiz-builder-group">
177 <h4><?php _e('Upload Image', 'tutor'); ?></h4>
178 <div class="tutor-quiz-builder-row">
179 <div class="tutor-quiz-builder-col">
180 <div class="tutor-media-upload-wrap">
181 <input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
182 <div class="tutor-media-preview">
183 <a href="javascript:;" class="tutor-media-upload-btn">
184 <?php
185 if ($image_id){
186 echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
187 }else{
188 echo '<i class="tutor-icon-image1"></i>';
189 }
190 ?>
191 </a>
192 </div>
193 <div class="tutor-media-upload-trash-wrap">
194 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
195 </div>
196 </div>
197 </div>
198 </div>
199 </div> <!-- /.tutor-quiz-builder-group -->
200
201 <div class="tutor-quiz-builder-group">
202 <h4><?php _e('Image matched text', 'tutor'); ?></h4>
203 <div class="tutor-quiz-builder-row">
204 <div class="tutor-quiz-builder-col">
205 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
206 </div>
207 </div>
208 </div> <!-- /.tutor-quiz-builder-group -->
209
210 <?php
211 }elseif($question_type === 'image_answering'){
212 ?>
213 <div class="tutor-quiz-builder-group">
214 <h4><?php _e('Upload Image', 'tutor'); ?></h4>
215 <div class="tutor-quiz-builder-row">
216 <div class="tutor-quiz-builder-col">
217 <div class="tutor-media-upload-wrap">
218 <input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
219 <div class="tutor-media-preview">
220 <a href="javascript:;" class="tutor-media-upload-btn">
221 <?php
222 if ($image_id){
223 echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
224 }else{
225 echo '<i class="tutor-icon-image1"></i>';
226 }
227 ?>
228 </a>
229 </div>
230 <div class="tutor-media-upload-trash-wrap">
231 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
232 </div>
233 </div>
234 </div>
235 </div>
236 </div> <!-- /.tutor-quiz-builder-group -->
237
238 <div class="tutor-quiz-builder-group">
239 <h4><?php _e('Answer input value', 'tutor'); ?></h4>
240 <div class="tutor-quiz-builder-row">
241 <div class="tutor-quiz-builder-col">
242 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
243 </div>
244 </div>
245 <p class="help"><?php _e('The answers that students enter should match with this text. Write in <strong>small caps</strong>','tutor'); ?></p>
246 </div> <!-- /.tutor-quiz-builder-group -->
247
248 <?php
249 }
250 ?>
251
252 <div class="tutor-quiz-answers-form-footer tutor-quiz-builder-form-row">
253 <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>
254 </div>
255
256 </div>