original_string: public function is_passed($grade_item = null) {
          if (empty($grade_item)) {
              if (!isset($this->grade_item)) {
                  $this->load_grade_item();
              }
          } else {
              $this->grade_item = $grade_item;
              $this->itemid = $grade_item->id;
          }
  
          // Return null if finalgrade is null
          if (is_null($this->finalgrade)) {
              return null;
          }
  
          // Return null if gradepass == grademin, gradepass is null, or grade item is a scale and gradepass is 0.
          if (is_null($this->grade_item->gradepass)) {
              return null;
          } else if ($this->grade_item->gradepass == $this->grade_item->grademin) {
              return null;
          } else if ($this->grade_item->gradetype == GRADE_TYPE_SCALE && !grade_floats_different($this->grade_item->gradepass, 0.0)) {
              return null;
          }
  
          return $this->finalgrade >= $this->grade_item->gradepass;
      }
code: public function is_passed($grade_item = null) {
          if (empty($grade_item)) {
              if (!isset($this->grade_item)) {
                  $this->load_grade_item();
              }
          } else {
              $this->grade_item = $grade_item;
              $this->itemid = $grade_item->id;
          }
  
          // Return null if finalgrade is null
          if (is_null($this->finalgrade)) {
              return null;
          }
  
          // Return null if gradepass == grademin, gradepass is null, or grade item is a scale and gradepass is 0.
          if (is_null($this->grade_item->gradepass)) {
              return null;
          } else if ($this->grade_item->gradepass == $this->grade_item->grademin) {
              return null;
          } else if ($this->grade_item->gradetype == GRADE_TYPE_SCALE && !grade_floats_different($this->grade_item->gradepass, 0.0)) {
              return null;
          }
  
          return $this->finalgrade >= $this->grade_item->gradepass;
      }
code_tokens: public function is_passed ( $ grade_item = null ) { if ( empty ( $ grade_item ) ) { if ( ! isset ( $ this -> grade_item ) ) { $ this -> load_grade_item ( ) ; } } else { $ this -> grade_item = $ grade_item ; $ this -> itemid = $ grade_item -> id ; } // Return null if finalgrade is null if ( is_null ( $ this -> finalgrade ) ) { return null ; } // Return null if gradepass == grademin, gradepass is null, or grade item is a scale and gradepass is 0. if ( is_null ( $ this -> grade_item -> gradepass ) ) { return null ; } else if ( $ this -> grade_item -> gradepass == $ this -> grade_item -> grademin ) { return null ; } else if ( $ this -> grade_item -> gradetype == GRADE_TYPE_SCALE && ! grade_floats_different ( $ this -> grade_item -> gradepass , 0.0 ) ) { return null ; } return $ this -> finalgrade >= $ this -> grade_item -> gradepass ; }
docstring: Returns true if the grade's value is superior or equal to the grade item's gradepass value, false otherwise.
  
  @param grade_item $grade_item An optional grade_item of which gradepass value we can use, saves having to load the grade_grade's grade_item
  @return bool
docstring_tokens: Returns true if the grade s value is superior or equal to the grade item s gradepass value false otherwise .