Hi!
Atm when someone finishes a test he/she can see the results of other contestants of the course. Due to privacy concerns I only want them to see their own results (and possibly aggregated statistics).
How can I fix this?
Kind regards
Do you mean in the activity of that student , they can see the results ?
If yes then please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
function bpfr_hide_admin_activity( $a, $activities ) {
foreach ( $activities->activities as $key => $activity ) {
if ( $activity->type == 'quiz_evaluated' ) {
unset( $activities->activities[$key] );
$activities->activity_count = $activities->activity_count-1;
$activities->total_activity_count = $activities->total_activity_count-1;
$activities->pag_num = $activities->pag_num -1;
}
}
$activities_new = array_values( $activities->activities );
$activities->activities = $activities_new;
return $activities;
}
add_action( 'bp_has_activities', 'bpfr_hide_admin_activity', 10, 2 );