original_string: public function is_disabled() {
          $locked = 0;
          $gradeitemlocked = 0;
          $overridden = 0;
          /* Disable editing if grade item or grade score is locked
          * if any of these items are set,  then we will disable editing
          * at some point, we might want to show the reason for the lock
          * this code could be simplified, but its more readable for steve's little mind
          */
          if (!empty($this->grade->locked)) {
              $locked = 1;
          }
          if (!empty($this->grade->grade_item->locked)) {
              $gradeitemlocked = 1;
          }
          if ($this->grade->grade_item->is_overridable_item() and !$this->grade->is_overridden()) {
              $overridden = 1;
          }
          return ($locked || $gradeitemlocked || $overridden);
      }
code: public function is_disabled() {
          $locked = 0;
          $gradeitemlocked = 0;
          $overridden = 0;
          /* Disable editing if grade item or grade score is locked
          * if any of these items are set,  then we will disable editing
          * at some point, we might want to show the reason for the lock
          * this code could be simplified, but its more readable for steve's little mind
          */
          if (!empty($this->grade->locked)) {
              $locked = 1;
          }
          if (!empty($this->grade->grade_item->locked)) {
              $gradeitemlocked = 1;
          }
          if ($this->grade->grade_item->is_overridable_item() and !$this->grade->is_overridden()) {
              $overridden = 1;
          }
          return ($locked || $gradeitemlocked || $overridden);
      }
code_tokens: public function is_disabled ( ) { $ locked = 0 ; $ gradeitemlocked = 0 ; $ overridden = 0 ; /* Disable editing if grade item or grade score is locked
          * if any of these items are set,  then we will disable editing
          * at some point, we might want to show the reason for the lock
          * this code could be simplified, but its more readable for steve's little mind
          */ if ( ! empty ( $ this -> grade -> locked ) ) { $ locked = 1 ; } if ( ! empty ( $ this -> grade -> grade_item -> locked ) ) { $ gradeitemlocked = 1 ; } if ( $ this -> grade -> grade_item -> is_overridable_item ( ) and ! $ this -> grade -> is_overridden ( ) ) { $ overridden = 1 ; } return ( $ locked || $ gradeitemlocked || $ overridden ) ; }
docstring: Determine if this input should be disabled based on the other settings.
  
  @return boolean Should this input be disabled when the page loads.
docstring_tokens: Determine if this input should be disabled based on the other settings .