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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_list.php
tutor / views / modal Last commit date
edit-lesson.php 4 years ago edit_quiz.php 4 years ago login.php 4 years ago question_answer_form.php 4 years ago question_answer_list.php 4 years ago question_form.php 4 years ago review.php 4 years ago topic-form.php 4 years ago
question_answer_list.php
94 lines
1 <?php
2
3 use TUTOR\Question_Answers_List;
4
5 if ($question_type === 'open_ended' || $question_type === 'short_answer'){
6 echo '<p class="tutor-px-32 tutor-py-16">'.
7 __('No option is necessary for this answer type', 'tutor').
8 '</p>';
9 return '';
10 }
11 ?>
12
13 <div id="tutor_quiz_question_answers" data-question-id="<?php echo $question_id; ?>"><?php
14 $answers = Question_Answers_List::answer_list_by_question( $question_id, $question_type );
15
16 if (is_array($answers) && count($answers)){
17 foreach ($answers as $answer){
18 ?>
19 <div class="tutor-quiz-answer-wrap" data-answer-id="<?php echo $answer->answer_id; ?>">
20 <div class="tutor-quiz-answer">
21 <span class="tutor-quiz-answer-title">
22 <?php
23 echo stripslashes($answer->answer_title);
24
25 if ($answer->belongs_question_type === 'fill_in_the_blank'){
26 echo ' ('.__('Answer', 'tutor').' : ';
27 echo '<strong>'.stripslashes($answer->answer_two_gap_match).'</strong>)';
28 }
29
30 if ($answer->belongs_question_type === 'matching'){
31 echo ' - '.stripslashes($answer->answer_two_gap_match);
32 }
33 ?>
34 </span>
35
36 <?php
37 // Show image for the single answer
38 if ($answer->image_id){
39 echo '<span class="tutor-question-answer-image">
40 <img src="'.wp_get_attachment_image_url($answer->image_id).'" />
41 </span>';
42 }
43
44 if ($question_type === 'true_false' || $question_type === 'single_choice')
45 {
46 ?>
47 <span class="tutor-quiz-answers-mark-correct-wrap tutor-mr-4">
48 <input type="radio" name="mark_as_correct[<?php echo $answer->belongs_question_id; ?>]" value="<?php echo $answer->answer_id; ?>" title="<?php _e('Mark as correct', 'tutor'); ?>" <?php checked(1, $answer->is_correct); ?> >
49 </span>
50 <?php
51 } elseif ($question_type === 'multiple_choice'){
52 ?>
53 <span class="tutor-quiz-answers-mark-correct-wrap tutor-mr-4">
54 <input type="checkbox" name="mark_as_correct[<?php echo $answer->belongs_question_id; ?>]" value="<?php echo $answer->answer_id; ?>" title="<?php _e('Mark as correct', 'tutor'); ?>" <?php checked(1, $answer->is_correct); ?> >
55 </span>
56 <?php
57 }
58 ?>
59
60 <?php if ( $question_type !== 'true_false' ): ?>
61 <span class="tutor-quiz-answer-edit tutor-mr-4">
62 <a class="tutor-iconic-btn" href="javascript:;">
63 <i class="tutor-icon-pencil" area-hidden="true"></i>
64 </a>
65 </span>
66 <?php endif; ?>
67
68 <?php if($question_type !== 'fill_in_the_blank'): ?>
69 <span class="tutor-quiz-answer-sort-icon">
70 <i class="tutor-d-flex tutor-icon-hamburger-o"></i>
71 </span>
72 <?php endif; ?>
73 </div>
74
75 <?php if ( $question_type !== 'true_false' && $question_type !== 'fill_in_the_blank' ): ?>
76 <div class="tutor-quiz-answer-trash-wrap tutor-d-flex">
77 <a href="javascript:;" class="answer-trash-btn answer-trash-btn tutor-d-flex tutor-align-center" data-answer-id="<?php echo $answer->answer_id; ?>">
78 <i class="tutor-icon-trash-can"></i>
79 </a>
80 </div>
81 <?php endif; ?>
82 </div>
83 <?php
84 }
85 }
86 ?>
87 </div>
88
89 <?php if($question_type!='true_false' && ($question_type!='fill_in_the_blank' || empty($answers))): ?>
90 <a href="javascript:;" class="add_question_answers_option tutor-d-flex tutor-align-center" data-question-id="<?php echo $question_id; ?>">
91 <i class="tutor-icon-plus-o "></i>
92 <?php _e('Add An Option', 'tutor'); ?>
93 </a>
94 <?php endif; ?>