public static function can_create_data_deletion_request_for_children(int $userid, int $requesterid = null): bool {
        global $USER;
        $requesterid = $requesterid ?: $USER->id;
        return has_capability('tool/dataprivacy:makedatadeletionrequestsforchildren', \context_user::instance($userid),
            $requesterid);
    }
public static function can_create_data_deletion_request_for_children(int $userid, int $requesterid = null): bool {
        global $USER;
        $requesterid = $requesterid ?: $USER->id;
        return has_capability('tool/dataprivacy:makedatadeletionrequestsforchildren', \context_user::instance($userid),
            $requesterid);
    }
public static function can_create_data_deletion_request_for_children ( int $ userid , int $ requesterid = null ) : bool { global $ USER ; $ requesterid = $ requesterid ? : $ USER -> id ; return has_capability ( 'tool/dataprivacy:makedatadeletionrequestsforchildren' , \ context_user :: instance ( $ userid ) , $ requesterid ) ; }
Check if parent can create data deletion request for their children.

@param int $userid ID of a user being requested.
@param int|null $requesterid ID of a user making request.
@return bool
@throws coding_exception
Check if parent can create data deletion request for their children .