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
multi-answer-options.php
34 lines
| 1 | |
| 2 | <table class="multi-answers-options"> |
| 3 | <tbody> |
| 4 | |
| 5 | <tr> |
| 6 | <th></th> |
| 7 | <th><?php _e('Answer text', 'tutor'); ?></th> |
| 8 | <th><?php _e('Is Correct', 'tutor'); ?></th> |
| 9 | <th>#</th> |
| 10 | </tr> |
| 11 | |
| 12 | <?php |
| 13 | $quiz_answer_options = tutor_utils()->get_quiz_answer_options_by_question($question->ID); |
| 14 | //$question_type = get_post_meta($question->ID, '_question_type', true); |
| 15 | |
| 16 | if ($quiz_answer_options){ |
| 17 | if ($question_type === 'true_false'){ |
| 18 | $quiz_answer_options = array_slice($quiz_answer_options, 0, 2); |
| 19 | } |
| 20 | |
| 21 | $question_id = $question->ID; |
| 22 | foreach ($quiz_answer_options as $quiz_answer_option){ |
| 23 | include tutor()->path."views/metabox/quiz/individual-answer-option-{$question_type}-tr.php"; |
| 24 | } |
| 25 | } |
| 26 | ?> |
| 27 | |
| 28 | </tbody> |
| 29 | </table> |
| 30 | |
| 31 | |
| 32 | <div class="add_answer_option_wrap" style="display: <?php echo ($question_type === 'true_false' && count($quiz_answer_options) >= 2) ? 'none' : 'block'; ?>;" > |
| 33 | <button type="button" class="button add_answer_option_btn"> <?php _e('Add an option', 'tutor'); ?></button> |
| 34 | </div> |