original_string: public function is_calculated() {
          if (empty($this->calculation)) {
              return false;
          }
  
          /*
           * The main reason why we use the ##gixxx## instead of [[idnumber]] is speed of depends_on(),
           * we would have to fetch all course grade items to find out the ids.
           * Also if user changes the idnumber the formula does not need to be updated.
           */
  
          // first detect if we need to change calculation formula from [[idnumber]] to ##giXXX## (after backup, etc.)
          if (!$this->calculation_normalized and strpos($this->calculation, '[[') !== false) {
              $this->set_calculation($this->calculation);
          }
  
          return !empty($this->calculation);
      }
code: public function is_calculated() {
          if (empty($this->calculation)) {
              return false;
          }
  
          /*
           * The main reason why we use the ##gixxx## instead of [[idnumber]] is speed of depends_on(),
           * we would have to fetch all course grade items to find out the ids.
           * Also if user changes the idnumber the formula does not need to be updated.
           */
  
          // first detect if we need to change calculation formula from [[idnumber]] to ##giXXX## (after backup, etc.)
          if (!$this->calculation_normalized and strpos($this->calculation, '[[') !== false) {
              $this->set_calculation($this->calculation);
          }
  
          return !empty($this->calculation);
      }
code_tokens: public function is_calculated ( ) { if ( empty ( $ this -> calculation ) ) { return false ; } /*
           * The main reason why we use the ##gixxx## instead of [[idnumber]] is speed of depends_on(),
           * we would have to fetch all course grade items to find out the ids.
           * Also if user changes the idnumber the formula does not need to be updated.
           */ // first detect if we need to change calculation formula from [[idnumber]] to ##giXXX## (after backup, etc.) if ( ! $ this -> calculation_normalized and strpos ( $ this -> calculation , '[[' ) !== false ) { $ this -> set_calculation ( $ this -> calculation ) ; } return ! empty ( $ this -> calculation ) ; }
docstring: Checks if grade calculated. Returns this object's calculation.
  
  @return bool true if grade item calculated.
docstring_tokens: Checks if grade calculated . Returns this object s calculation .