diff --git a/mod/assign/lib.php b/mod/assign/lib.php index 8d23b704de2..c97f123fd95 100644 --- a/mod/assign/lib.php +++ b/mod/assign/lib.php @@ -1752,24 +1752,29 @@ function mod_assign_core_calendar_event_timestart_updated(\calendar_event $event /** * Return a list of all the user preferences used by mod_assign. * - * @return array + * @uses core_user::is_current_user + * + * @return array[] */ -function mod_assign_user_preferences() { +function mod_assign_user_preferences(): array { $preferences = array(); $preferences['assign_filter'] = array( 'type' => PARAM_ALPHA, 'null' => NULL_NOT_ALLOWED, - 'default' => '' + 'default' => '', + 'permissioncallback' => [core_user::class, 'is_current_user'], ); $preferences['assign_workflowfilter'] = array( 'type' => PARAM_ALPHA, 'null' => NULL_NOT_ALLOWED, - 'default' => '' + 'default' => '', + 'permissioncallback' => [core_user::class, 'is_current_user'], ); $preferences['assign_markerfilter'] = array( 'type' => PARAM_ALPHANUMEXT, 'null' => NULL_NOT_ALLOWED, - 'default' => '' + 'default' => '', + 'permissioncallback' => [core_user::class, 'is_current_user'], ); return $preferences;