diff --git a/assets/src/js/v3/entries/course-builder/components/curriculum/QuizSettings.tsx b/assets/src/js/v3/entries/course-builder/components/curriculum/QuizSettings.tsx index 4b88d0d428..7219cfa15a 100644 --- a/assets/src/js/v3/entries/course-builder/components/curriculum/QuizSettings.tsx +++ b/assets/src/js/v3/entries/course-builder/components/curriculum/QuizSettings.tsx @@ -446,162 +446,163 @@ const QuizSettings = ({ contentDripType }: QuizSettingsProps) => { + +
+
{__('Navigation & Display', 'tutor')}
-
-
{__('Navigation & Display', 'tutor')}
- -
- ( - , - }, - { - label: __('Full Page', 'tutor'), - value: 'question_below_each_other', - image: , - }, - ]} - /> - )} - /> +
+ ( + , + }, + { + label: __('Full Page', 'tutor'), + value: 'question_below_each_other', + image: , + }, + ]} + /> + )} + /> - -
+ +
-
- ( - - )} - /> - - -
- -
+
( - )} /> - -
- -
- ( - - )} - /> - -
-
{__('For', 'tutor')}
+ +
+ +
( - )} /> -
-
-
+
+
-
+
+ ( + + )} + /> - ( - - )} - /> + +
+
{__('For', 'tutor')}
+ ( + + )} + /> +
+
+
- ( - - )} - /> -
+
+ + ( + + )} + /> + + ( + + )} + /> +
+
-
+ get_row( @@ -1289,7 +1289,7 @@ private function create_skipped_attempt_answer( int $attempt_id, int $question_i return null; } - return $this->get_attempt_answer( $inserted_id ); + return self::get_attempt_answer( $inserted_id ); } /** @@ -1304,7 +1304,7 @@ private function create_skipped_attempt_answer( int $attempt_id, int $question_i * @return object|null */ private function resolve_attempt_answer_for_review( int $attempt_id, int $attempt_answer_id = 0, int $question_id = 0 ) { - $attempt_answer = $attempt_answer_id ? $this->get_attempt_answer( $attempt_answer_id ) : null; + $attempt_answer = $attempt_answer_id ? self::get_attempt_answer( $attempt_answer_id ) : null; if ( $attempt_answer ) { return $attempt_answer; @@ -1355,6 +1355,8 @@ private function apply_quiz_answer_review( int $attempt_id, $attempt_answer, str do_action( 'tutor_quiz_review_answer_before', $attempt_answer_id, $attempt_id, $mark_as ); + $mark_as = apply_filters( 'tutor_quiz_review_mark_as', $mark_as, $attempt_answer_id, $attempt_id, $question ); + if ( 'correct' === $mark_as ) { $attempt_update_data = array(); $answer_update_data = array( diff --git a/templates/learning-area/lesson/content.php b/templates/learning-area/lesson/content.php index 6572ca4add..0c8e5e5716 100644 --- a/templates/learning-area/lesson/content.php +++ b/templates/learning-area/lesson/content.php @@ -120,6 +120,7 @@ class="tutor-lesson-content-tab"
diff --git a/templates/learning-area/quiz/attempt.php b/templates/learning-area/quiz/attempt.php index 999110b552..0aa870156e 100644 --- a/templates/learning-area/quiz/attempt.php +++ b/templates/learning-area/quiz/attempt.php @@ -78,7 +78,7 @@ } } -$form_id = 'quiz-attempt-form-' . $tutor_is_started_quiz->attempt_id; +$form_id = 'quiz-attempt-form-' . $tutor_is_started_quiz->attempt_id . '-' . $tutor_is_started_quiz->quiz_id; $modal_id = 'tutor-quiz-abandon-modal'; $submitted_modal_id = 'tutor-quiz-submitted-modal'; $timeout_modal_id = 'tutor-quiz-timeout-modal'; @@ -197,6 +197,7 @@ class="tutor-quiz-questions" quiz_id, $quiz_attempt_info ); foreach ( $questions as $index => $question ) { $question_settings = maybe_unserialize( $question->question_settings ); $answer_required = isset( $question_settings['answer_required'] ) && '1' === $question_settings['answer_required']; diff --git a/templates/learning-area/quiz/question.php b/templates/learning-area/quiz/question.php index 14b3956746..d87feb76cc 100644 --- a/templates/learning-area/quiz/question.php +++ b/templates/learning-area/quiz/question.php @@ -55,6 +55,7 @@
@@ -70,7 +71,7 @@ class="tutor-quiz-question" // Render the question type specific answers template. tutor_load_template( - 'learning-area.quiz.questions.' . $question_type, + apply_filters( 'tutor_filter_quiz_question_template', 'learning-area.quiz.questions.' . $question_type, $question_type ), array( 'question' => wp_parse_args( (array) $question, $default_question ), 'quiz_settings' => $quiz_settings, diff --git a/templates/shared/components/quiz/attempt-details/review-answers.php b/templates/shared/components/quiz/attempt-details/review-answers.php index 7a3e3e14dc..6875a8b1f6 100644 --- a/templates/shared/components/quiz/attempt-details/review-answers.php +++ b/templates/shared/components/quiz/attempt-details/review-answers.php @@ -77,8 +77,8 @@ ?>
- - "review_statuses[{$question_id}]", ) ); - ?> - + } + do_action( 'tutor_review_answer_after_question_template', $question, $attempt_answer, $index, $is_instructor_review ); + ?>
diff --git a/templates/single/quiz/body.php b/templates/single/quiz/body.php index f67544bfb8..baa32f7a2b 100644 --- a/templates/single/quiz/body.php +++ b/templates/single/quiz/body.php @@ -40,7 +40,7 @@
quiz_attempt_info( $is_started_quiz->attempt_info );