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.0 3.6.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 7 years ago edit-lesson.php 7 years ago edit_quiz.php 7 years ago question_answer_edit_form.php 7 years ago question_answer_form.php 7 years ago question_form.php 7 years ago
question_answer_edit_form.php
224 lines
1 <?php
2 if ($question_type === 'open_ended'){
3 echo '<p 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 if ($question_type === 'ordering'){
23 echo '<p class="quiz-modal-form-help">Make sure you are saving answer in right sorting in answers lists, student should ordering should match with this answer order.</p>';
24 echo '<p class="quiz-modal-form-help">You can re-order it from above answer list.</p>';
25 }
26 ?>
27
28 <div class="tutor-quiz-builder-form-row">
29 <label><?php _e('Answer title', 'tutor'); ?></label>
30 <div class="quiz-modal-field-wrap">
31 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
32 </div>
33 </div>
34
35 <div class="tutor-quiz-builder-form-cols-row">
36 <div class="quiz-form-field-col">
37 <label><?php _e('Upload Image', 'tutor'); ?></label>
38 <div class="tutor-media-upload-wrap">
39 <input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
40 <div class="tutor-media-preview">
41 <a href="javascript:;" class="tutor-media-upload-btn">
42 <?php
43 if ($image_id){
44 echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
45 }else{
46 echo '<i class="tutor-icon-image1"></i>';
47 }
48 ?>
49 </a>
50 </div>
51 <div class="tutor-media-upload-trash-wrap">
52 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
53 </div>
54 </div>
55 </div>
56
57 <div class="quiz-form-field-col">
58 <label><?php _e('Answer option view format', 'tutor'); ?></label>
59 <div class="quiz-modal-field-wrap label-inline">
60 <label> <input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text" <?php
61 echo $answer_view_format ? checked('text', $answer_view_format) : 'checked="checked"' ?>> <?php _e('Only text', 'tutor'); ?> </label>
62 <label> <input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="image" <?php echo
63 checked('image', $answer_view_format) ?> > <?php _e('Only Image', 'tutor'); ?> </label>
64 <label> <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'); ?> </label>
65 </div>
66 </div>
67 </div>
68
69 <?php
70 }elseif($question_type === 'fill_in_the_blank'){
71 ?>
72 <div class="tutor-quiz-builder-form-cols-row">
73 <div class="quiz-form-field-col full-width">
74 <label><?php _e('Question Title', 'tutor'); ?></label>
75 <div class="quiz-modal-field-wrap">
76 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
77 <p class="quiz-modal-form-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>
78 </div>
79 </div>
80
81 <div class="quiz-form-field-col full-width">
82 <label><?php _e('Gap Answer', 'tutor'); ?></label>
83 <div class="quiz-modal-field-wrap">
84 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_two_gap_match]" value="<?php echo $answer_two_gap_match; ?>">
85 <p class="quiz-modal-form-help"><?php _e( 'Separate multiple answer by pipe <b>( | )</b> , 1 answer per variable assigned in question', 'tutor' ); ?></p>
86 </div>
87 </div>
88 </div>
89
90 <?php
91 }elseif($question_type === 'matching'){
92 ?>
93
94 <div class="tutor-quiz-builder-form-cols-row">
95 <div class="quiz-form-field-col full-width">
96 <label><?php _e('Answer title', 'tutor'); ?></label>
97 <div class="quiz-modal-field-wrap">
98 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
99 </div>
100 </div>
101
102 <div class="quiz-form-field-col full-width">
103 <label><?php _e('Matched Answer title', 'tutor'); ?></label>
104 <div class="quiz-modal-field-wrap">
105 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][matched_answer_title]" value="<?php echo $answer_two_gap_match; ?>">
106 </div>
107 </div>
108 </div>
109
110 <div class="tutor-quiz-builder-form-cols-row">
111 <div class="quiz-form-field-col">
112 <label><?php _e('Upload Image', 'tutor'); ?></label>
113 <div class="tutor-media-upload-wrap">
114 <input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
115 <div class="tutor-media-preview">
116 <a href="javascript:;" class="tutor-media-upload-btn">
117 <?php
118 if ($image_id){
119 echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
120 }else{
121 echo '<i class="tutor-icon-image1"></i>';
122 }
123 ?>
124 </a>
125 </div>
126 <div class="tutor-media-upload-trash-wrap">
127 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
128 </div>
129 </div>
130 </div>
131
132 <div class="quiz-form-field-col">
133 <label><?php _e('Answer option view format', 'tutor'); ?></label>
134 <div class="quiz-modal-field-wrap label-inline">
135 <label> <input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text" <?php
136 echo $answer_view_format ? checked('text', $answer_view_format) : 'checked="checked"' ?>> <?php _e('Only text', 'tutor'); ?> </label>
137 <label> <input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="image" <?php echo
138 checked('image', $answer_view_format) ?> > <?php _e('Only Image', 'tutor'); ?> </label>
139 <label> <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'); ?> </label>
140 </div>
141 </div>
142 </div>
143
144 <?php
145 }elseif ($question_type === 'image_matching'){
146 ?>
147 <div class="tutor-quiz-builder-form-cols-row">
148 <div class="quiz-form-field-col full-width">
149 <div class="quiz-form-field-col">
150 <label><?php _e('Upload Image', 'tutor'); ?></label>
151 <div class="tutor-media-upload-wrap">
152 <input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
153 <div class="tutor-media-preview">
154 <a href="javascript:;" class="tutor-media-upload-btn">
155 <?php
156 if ($image_id){
157 echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
158 }else{
159 echo '<i class="tutor-icon-image1"></i>';
160 }
161 ?>
162 </a>
163 </div>
164 <div class="tutor-media-upload-trash-wrap">
165 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
166 </div>
167 </div>
168 </div>
169 </div>
170
171 <div class="quiz-form-field-col full-width">
172 <label><?php _e('Image matched text', 'tutor'); ?></label>
173 <div class="quiz-modal-field-wrap">
174 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
175 </div>
176 </div>
177
178 </div>
179
180 <?php
181 }elseif($question_type === 'image_answering'){
182 ?>
183 <div class="tutor-quiz-builder-form-cols-row">
184 <div class="quiz-form-field-col full-width">
185 <div class="quiz-form-field-col">
186 <label><?php _e('Upload Image', 'tutor'); ?></label>
187 <div class="tutor-media-upload-wrap">
188 <input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
189 <div class="tutor-media-preview">
190 <a href="javascript:;" class="tutor-media-upload-btn">
191 <?php
192 if ($image_id){
193 echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
194 }else{
195 echo '<i class="tutor-icon-image1"></i>';
196 }
197 ?>
198 </a>
199 </div>
200 <div class="tutor-media-upload-trash-wrap">
201 <a href="javascript:;" class="tutor-media-upload-trash">&times;</a>
202 </div>
203 </div>
204 </div>
205 </div>
206
207 <div class="quiz-form-field-col full-width">
208 <label><?php _e('Answer input value', 'tutor'); ?></label>
209 <div class="quiz-modal-field-wrap">
210 <input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
211 <p class="quiz-modal-form-help"><?php _e('Student input text should be matched with this answer, write in <b>Small Caps</b>','tutor'); ?></p>
212 </div>
213 </div>
214
215 </div>
216 <?php
217 }
218 ?>
219
220 <div class="tutor-quiz-answers-form-footer tutor-quiz-builder-form-row">
221 <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>
222 </div>
223
224 </div>