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/DashboardStatisticsDB.php +7 -33 4.4.44.4.8 View file →
@@ -276,21 +276,13 @@
276 276 * @param bool $with_failed Add a 'failed' step (Users tab) — distinct users with a failed course graduation in range.
277 277 * @return array [ 'registered' => int, 'enrolled' => int, 'started' => int, 'completed' => int, 'failed'? => int ]
278 278 */
279 279 public function get_learner_funnel( string $type, string $value, ?StatisticsScope $scope = null, bool $with_failed = false ): array {
280 - $sig = $scope ? $scope->signature() : array( 0, 0 );
281 -
282 - return StatisticsCache::remember(
283 - 'funnel',
284 - array( $type, $value, $sig, $with_failed ),
285 - function () use ( $type, $value, $scope, $with_failed ) {
286 - return $this->compute_learner_funnel( $type, $value, $scope, $with_failed );
287 - }
288 - );
280 + return $this->compute_learner_funnel( $type, $value, $scope, $with_failed );
289 281 }
290 282
291 283 /**
292 - * Uncached funnel computation. See get_learner_funnel().
284 + * Funnel computation. See get_learner_funnel().
293 285 *
294 286 * @param string $type
295 287 * @param string $value
296 288 * @param StatisticsScope|null $scope
@@ -1093,21 +1085,13 @@
1093 1085 * @param string $search Optional instructor-name filter.
1094 1086 * @return array Rows of { instructor_id, instructor_name, course_count, revenue, enrolled, completed, completion_rate }.
1095 1087 */
1096 1088 public function get_instructor_performance( string $type, string $value, ?StatisticsScope $scope = null, int $limit = 5, int $offset = 0, string $search = '' ): array {
1097 - $sig = $scope ? $scope->signature() : array( 0, 0 );
1098 -
1099 - return StatisticsCache::remember(
1100 - 'instructor_performance',
1101 - array( $type, $value, $sig, $limit, $offset, $search ),
1102 - function () use ( $type, $value, $scope, $limit, $offset, $search ) {
1103 - return $this->compute_instructor_performance( $type, $value, $scope, $limit, $offset, $search );
1104 - }
1105 - );
1089 + return $this->compute_instructor_performance( $type, $value, $scope, $limit, $offset, $search );
1106 1090 }
1107 1091
1108 1092 /**
1109 - * Uncached instructor performance query. See get_instructor_performance().
1093 + * Instructor performance query. See get_instructor_performance().
1110 1094 *
1111 1095 * @param string $type
1112 1096 * @param string $value
1113 1097 * @param StatisticsScope|null $scope
@@ -1649,24 +1633,14 @@
1649 1633 * @param int $limit
1650 1634 * @return array Rows of { course_id, name, instructor, completion_rate, risk, action }.
1651 1635 */
1652 1636 public function get_course_watchlist( string $type, string $value, ?StatisticsScope $scope = null, int $limit = 10 ): array {
1653 - $sig = $scope ? $scope->signature() : array( 0, 0 );
1654 -
1655 - return StatisticsCache::remember(
1656 - 'watchlist',
1657 - // Risk bands + quiz-pass config shape risk/action, so they must vary the key —
1658 - // otherwise a filter change stays masked until the TTL expires.
1659 - array( $type, $value, $sig, $limit, self::quiz_alert_config(), (array) apply_filters( 'learn-press/statistics/risk-bands', array( 40, 55 ) ) ),
1660 - function () use ( $type, $value, $scope, $limit ) {
1661 - return $this->compute_course_watchlist( $type, $value, $scope, $limit );
1662 - }
1663 - );
1637 + return $this->compute_course_watchlist( $type, $value, $scope, $limit );
1664 1638 }
1665 1639
1666 1640 /**
1667 1641 * Quiz low-pass alert config ( threshold %, minimum attempts ) — read in one
1668 - * place so query methods and the cache keys that must vary on it stay in sync.
1642 + * place so query methods stay in sync.
1669 1643 *
1670 1644 * @return array [ float threshold, int min_attempts ]
1671 1645 * @since 4.4.2
1672 1646 */
@@ -1677,9 +1651,9 @@
1677 1651 );
1678 1652 }
1679 1653
1680 1654 /**
1681 - * Uncached watchlist query. See get_course_watchlist().
1655 + * Watchlist query. See get_course_watchlist().
1682 1656 *
1683 1657 * @param string $type
1684 1658 * @param string $value
1685 1659 * @param StatisticsScope|null $scope