apply_filters( 'show_user_profile_quiz_statistics', boolean $show_stats , int $user_id , array $quiz_attempt , string $context )
Filters whether to Display User Quiz Statistics.
Description Description
This filter allows display-time control over displaying the user quiz statistics link. This link is shown on the user profile when using the [ld_profile] shortcode, the Course Info Widget and the user’s WP Profile.
This filter is only called if the quiz_attempt contained the reference field ‘statistic_ref_id’ which links the user meta record to the statistics row. Also, the viewing user must a) match the used record being viewed OR b) be an administrator OR c) be a group leader and the user is within the group leader managed groups.
Parameters Parameters
- $show_stats
-
This will be true or false and determined from the 'View Profile Statistics' quiz setting.
- $user_id
-
The ID of the user quiz to be displayed.
- $quiz_attempt
-
This is the quiz attempt array read from the user meta.
- $context
-
This will be the file where this filter is being called. Possible values are 'course_info_shortcode.php', 'profile.php' or other.
Source Source
File: themes/ld30/templates/quiz/partials/attempt.php
Changelog Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |