PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
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 4.2.0 All 139 releases
← All changes | inc/Statistics/HealthCheckProvider.php +5 -19 4.4.44.4.8 View file →
@@ -45,27 +45,13 @@
45 45 * @param StatisticsScope|null $scope
46 46 * @return array [ 'no_enrollment' => int, 'no_content' => int, 'pending_review' => int, 'quiz_low_pass' => int ]
47 47 */
48 48 public function get_checks( ?StatisticsScope $scope = null ): array {
49 - $sig = $scope ? $scope->signature() : array( 0, 0 );
50 - // The low-pass quiz check depends on these filters, so vary the key on them —
51 - // otherwise a threshold change stays masked until the TTL expires.
52 - $quiz_config = array(
53 - (float) apply_filters( 'learn-press/statistics/quiz-pass-alert', 50 ),
54 - (int) apply_filters( 'learn-press/statistics/quiz-pass-alert-min-attempts', 5 ),
55 - );
56 -
57 - return StatisticsCache::remember(
58 - 'health_checks',
59 - array( $sig, $quiz_config ),
60 - function () use ( $scope ) {
61 - return array(
62 - 'no_enrollment' => $this->count_courses_without_enrollment( $scope ),
63 - 'no_content' => $this->count_courses_without_content( $scope ),
64 - 'pending_review' => $this->count_pending_courses( $scope ),
65 - 'quiz_low_pass' => $this->count_low_pass_quizzes( $scope ),
66 - );
67 - }
49 + return array(
50 + 'no_enrollment' => $this->count_courses_without_enrollment( $scope ),
51 + 'no_content' => $this->count_courses_without_content( $scope ),
52 + 'pending_review' => $this->count_pending_courses( $scope ),
53 + 'quiz_low_pass' => $this->count_low_pass_quizzes( $scope ),
68 54 );
69 55 }
70 56
71 57 /**