Closed renatho closed 11 months ago
A user in 7375078-zen reported the same bug, and tried to fix it with this hook:
add_action('sensei_user_lesson_reset', function($user_id, $lesson_id) {
$current_page = get_permalink();
wp_redirect($current_page);
exit;
}, 9, 2);
However, they stumbled upon with more issues:
Their solution would be to extend theSensei_Course_Theme_Quiz class
and add a provision to only show the retake quiz button on failed grades, but they're looking for a better hook to manage that. Would that be possible?
Support References
This comment is automatically generated. Please do not edit it.
passing the course allows students to retake the quiz anyway
I've created a separate issue for this: https://github.com/Automattic/sensei/issues/7379
Steps to Reproduce
What I Expected
Continue on the quiz page to answer the questions again.
What Happened Instead
I was redirected to the course completed page.
PHP / WordPress / Sensei LMS version
PHP 7.4 / WP 6.3 / Sensei 4.17.0
Browser / OS version
Chrome / Mac OS
Screenshot / Video
https://github.com/Automattic/sensei/assets/876340/c0ffcd23-0f00-4f18-b9ef-e1aff38953a2