individual-answer-option-multiple_choice-tr.php
7 years ago
individual-answer-option-single_choice-tr.php
7 years ago
individual-answer-option-true_false-tr.php
7 years ago
multi-answer-options.php
7 years ago
single-question-item.php
7 years ago
single-question-item.php
114 lines
| 1 | <?php |
| 2 | $is_multiple_questions_loop = ! (isset($is_question_edit_page)) || ! $is_question_edit_page; |
| 3 | ?> |
| 4 | |
| 5 | <div class="single-question-item" data-question-id="<?php echo $question->ID; ?>"> |
| 6 | <div class="tutor-question-item-head"> |
| 7 | <?php if ($is_multiple_questions_loop){ ?> |
| 8 | <div class="question-short"> |
| 9 | <a href=""><i class="dashicons dashicons-move"></i> </a> |
| 10 | </div> |
| 11 | <?php } ?> |
| 12 | |
| 13 | |
| 14 | <div class="question-title"> |
| 15 | <?php echo $question->post_title; ?> |
| 16 | </div> |
| 17 | <div class="question-type"> |
| 18 | <?php $question_type = get_post_meta($question->ID, '_question_type', true); |
| 19 | if ($question_type){ |
| 20 | echo tutor_utils()->get_question_types($question_type); |
| 21 | } |
| 22 | ?> |
| 23 | </div> |
| 24 | |
| 25 | <?php if ($is_multiple_questions_loop){ ?> |
| 26 | <div class="question-actions-wrap"> |
| 27 | <span class="tutor-loading-icon-wrap button"></span> |
| 28 | <a href="javascript:;" class="question-action-btn trash"><i class="dashicons dashicons-trash"></i> </a> |
| 29 | <a href="javascript:;" class="question-action-btn down"><i class="dashicons dashicons-arrow-down-alt2"></i> </a> |
| 30 | </div> |
| 31 | <?php } ?> |
| 32 | </div> |
| 33 | |
| 34 | <div class="quiz-question-form-wrap" style="display: <?php echo $is_multiple_questions_loop ? 'none' : 'block'; ?>;"> |
| 35 | |
| 36 | <div class="quiz-question-flex-wrap"> |
| 37 | <div class="question-details"> |
| 38 | <div class="quiz-question-field tutor-flex-row"> |
| 39 | <div class="tutor-flex-col"> |
| 40 | <p> |
| 41 | <label><?php _e('Question Type', 'tutor'); ?></label> |
| 42 | </p> |
| 43 | |
| 44 | <select class="question_type_field" name="tutor_question[<?php echo $question->ID; ?>][question_type]"> |
| 45 | <?php |
| 46 | $question_types = tutor_utils()->get_question_types(); |
| 47 | foreach ($question_types as $type_key => $type_value){ |
| 48 | echo "<option value='{$type_key}' ".selected($type_key, $question_type)." >{$type_value}</option>"; |
| 49 | } |
| 50 | ?> |
| 51 | </select> |
| 52 | </div> |
| 53 | |
| 54 | <div class="tutor-flex-col"> |
| 55 | <p> |
| 56 | <label><?php _e('Mark for this question', 'tutor'); ?></label> |
| 57 | </p> |
| 58 | <input type="number" name="tutor_question[<?php echo $question->ID; ?>][question_mark]" value="1"> |
| 59 | <p class="desc"> |
| 60 | <?php _e('Set the mark for this question how much will they get'); ?> |
| 61 | </p> |
| 62 | </div> |
| 63 | </div> |
| 64 | |
| 65 | <div class="quiz-question-field"> |
| 66 | <p> |
| 67 | <label><?php _e('Question', 'tutor'); ?></label> |
| 68 | </p> |
| 69 | <input type="text" class="question_field_title" name="tutor_question[<?php echo $question->ID; ?>][question_title]" value="<?php echo $question->post_title; ?>"> |
| 70 | |
| 71 | <p class="desc"> |
| 72 | <?php _e('Title for the question.'); ?> |
| 73 | </p> |
| 74 | </div> |
| 75 | |
| 76 | <div class="quiz-question-field"> |
| 77 | <p> |
| 78 | <label><?php _e('Description', 'tutor'); ?></label> |
| 79 | </p> |
| 80 | <textarea name="tutor_question[<?php echo $question->ID; ?>][question_description]"><?php echo $question->post_content;?></textarea> |
| 81 | |
| 82 | <p class="desc"> |
| 83 | <?php _e('Write the details about this question'); ?> |
| 84 | </p> |
| 85 | </div> |
| 86 | |
| 87 | <!-- |
| 88 | <div class="quiz-question-field"> |
| 89 | <p> |
| 90 | <label><?php /*_e('Question Hint', 'tutor'); */?></label> |
| 91 | </p> |
| 92 | <textarea name="tutor_question[<?php /*echo $question->ID; */?>][question_hints]"><?php /*echo get_post_meta($question->ID, '_question_hints', true); */?></textarea> |
| 93 | <p class="desc"> |
| 94 | <?php /*_e(sprintf('An instruction for the students to select the write answer. This will be shown when students click on %s button', '<strong>hints</strong>'), 'tutor'); */?> |
| 95 | </p> |
| 96 | </div> |
| 97 | --> |
| 98 | |
| 99 | </div> |
| 100 | |
| 101 | <div class="answer-details"> |
| 102 | <div class="answer-entry-wrap"> |
| 103 | <?php |
| 104 | include tutor()->path."views/metabox/quiz/multi-answer-options.php"; |
| 105 | ?> |
| 106 | </div> |
| 107 | </div> |
| 108 | |
| 109 | </div> |
| 110 | |
| 111 | </div> |
| 112 | |
| 113 | </div> <!-- .single-question-item --> |
| 114 |