original_string: public function is_editable() {
          if ($this->is_locked()) {
              return false;
          }
  
          $grade_item = $this->load_grade_item();
  
          if ($grade_item->gradetype == GRADE_TYPE_NONE) {
              return false;
          }
  
          if ($grade_item->is_course_item() or $grade_item->is_category_item()) {
              return (bool)get_config('moodle', 'grade_overridecat');
          }
  
          return true;
      }
code: public function is_editable() {
          if ($this->is_locked()) {
              return false;
          }
  
          $grade_item = $this->load_grade_item();
  
          if ($grade_item->gradetype == GRADE_TYPE_NONE) {
              return false;
          }
  
          if ($grade_item->is_course_item() or $grade_item->is_category_item()) {
              return (bool)get_config('moodle', 'grade_overridecat');
          }
  
          return true;
      }
code_tokens: public function is_editable ( ) { if ( $ this -> is_locked ( ) ) { return false ; } $ grade_item = $ this -> load_grade_item ( ) ; if ( $ grade_item -> gradetype == GRADE_TYPE_NONE ) { return false ; } if ( $ grade_item -> is_course_item ( ) or $ grade_item -> is_category_item ( ) ) { return ( bool ) get_config ( 'moodle' , 'grade_overridecat' ) ; } return true ; }
docstring: Is grading object editable?
  
  @return bool
docstring_tokens: Is grading object editable?