original_string: public function get_value() {
          $this->label = $this->grade->grade_item->itemname;
  
          $val = $this->grade->finalgrade;
          if ($this->grade->grade_item->scaleid) {
              return $val ? (int)$val : -1;
          } else {
              return $val ? format_float($val, $this->grade->grade_item->get_decimals()) : '';
          }
      }
code: public function get_value() {
          $this->label = $this->grade->grade_item->itemname;
  
          $val = $this->grade->finalgrade;
          if ($this->grade->grade_item->scaleid) {
              return $val ? (int)$val : -1;
          } else {
              return $val ? format_float($val, $this->grade->grade_item->get_decimals()) : '';
          }
      }
code_tokens: public function get_value ( ) { $ this -> label = $ this -> grade -> grade_item -> itemname ; $ val = $ this -> grade -> finalgrade ; if ( $ this -> grade -> grade_item -> scaleid ) { return $ val ? ( int ) $ val : - 1 ; } else { return $ val ? format_float ( $ val , $ this -> grade -> grade_item -> get_decimals ( ) ) : '' ; } }
docstring: Get the value for this input.
  
  @return string The value based on the grade_grade.
docstring_tokens: Get the value for this input .