Skip to content

Commit dda2d9a

Browse files
committed
fix(quiz): prevent duplicate auto-start requests in v4
1 parent c7e9ae8 commit dda2d9a

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

classes/Quiz.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,14 +1601,13 @@ public static function render_quiz_actions( $quiz_id ) {
16011601
}
16021602
?>
16031603

1604-
<form
1605-
x-data="tutorQuizAutoStart({
1606-
quizID: <?php echo esc_attr( $quiz_id ); ?>,
1607-
autoStart: <?php echo $quiz_auto_start ? 'true' : 'false'; ?>,
1608-
})"
1609-
x-init="init()"
1610-
@submit.prevent="handleStartQuiz()"
1611-
>
1604+
<form
1605+
x-data="tutorQuizAutoStart({
1606+
quizID: <?php echo esc_attr( $quiz_id ); ?>,
1607+
autoStart: <?php echo $quiz_auto_start ? 'true' : 'false'; ?>,
1608+
})"
1609+
@submit.prevent="handleStartQuiz()"
1610+
>
16121611
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
16131612
<input type="hidden" value="<?php echo esc_attr( $quiz_id ); ?>" name="quiz_id"/>
16141613
<input type="hidden" value="tutor_start_quiz" name="tutor_action"/>

0 commit comments

Comments
 (0)