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