PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
← All changes | inc/rest-api/v1/frontend/class-lp-rest-users-controller.php +8 -0 4.4.7 → 4.4.9 View file →
@@ -359,8 +359,16 @@
359 359 }
360 360
361 361 $user_quiz->complete();
362 362
363 + /**
364 + * Clear cache result quiz
365 + * Cache set on @see LP_User_Item_Quiz::get_results, and start_quiz() clears the same
366 + * key. Without this the next read still serves the in-progress result and the
367 + * submitted answers all come back as skipped.
368 + */
369 + $user_quiz->clear_results_cache();
370 +
363 371 do_action( 'learn-press/user/quiz-finished', $item_id, $course_id, $user_id, $user_quiz );
364 372
365 373 $result['status'] = $user_quiz->get_status(); // Must be completed
366 374 $result['attempts'] = $user_quiz->get_attempts();