original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Deletes the grade_grade instance from the database .