public function delete($source = null) {
        $success = parent::delete($source);

        // If the grade was deleted successfully trigger a grade_deleted event.
        if ($success) {
            $this->load_grade_item();
            \core\event\grade_deleted::create_from_grade($this)->trigger();
        }

        return $success;
    }