public function is_override_calendar_event(\calendar_event $event) {
        global $DB;

        if (!isset($event->modulename)) {
            return false;
        }

        if ($event->modulename != 'assign') {
            return false;
        }

        if (!isset($event->instance)) {
            return false;
        }

        if (!isset($event->userid) && !isset($event->groupid)) {
            return false;
        }

        $overrideparams = [
            'assignid' => $event->instance
        ];

        if (isset($event->groupid)) {
            $overrideparams['groupid'] = $event->groupid;
        } else if (isset($event->userid)) {
            $overrideparams['userid'] = $event->userid;
        }

        if ($DB->get_record('assign_overrides', $overrideparams)) {
            return true;
        } else {
            return false;
        }
    }