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;
    }
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;
    }
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 ; }
Deletes the grade_grade instance from the database.

@param string $source The location the deletion occurred (mod/forum, manual, etc.).
@return bool Returns true if the deletion was successful, false otherwise.
Deletes the grade_grade instance from the database .