protected final function any_log($contextid, $user) {
        if (empty($this->activitylogs[$contextid])) {
            return false;
        }

        // Someone interacted with the activity if there is no user or the user interacted with the
        // activity if there is a user.
        if (empty($user) ||
                (!empty($user) && !empty($this->activitylogs[$contextid][$user->id]))) {
            return true;
        }

        return false;
    }
protected final function any_log($contextid, $user) {
        if (empty($this->activitylogs[$contextid])) {
            return false;
        }

        // Someone interacted with the activity if there is no user or the user interacted with the
        // activity if there is a user.
        if (empty($user) ||
                (!empty($user) && !empty($this->activitylogs[$contextid][$user->id]))) {
            return true;
        }

        return false;
    }
protected final function any_log ( $ contextid , $ user ) { if ( empty ( $ this -> activitylogs [ $ contextid ] ) ) { return false ; } // Someone interacted with the activity if there is no user or the user interacted with the // activity if there is a user. if ( empty ( $ user ) || ( ! empty ( $ user ) && ! empty ( $ this -> activitylogs [ $ contextid ] [ $ user -> id ] ) ) ) { return true ; } return false ; }
Do activity logs contain any log of user in this context?

If user is empty we look for any log in this context.

@param int $contextid
@param \stdClass|false $user
@return bool
Do activity logs contain any log of user in this context?