public function real_grade_value($value, $max) {
        $localized = true;
        if (is_null($value) or $value === '') {
            return null;
        } elseif ($max == 0) {
            return 0;
        } else {
            return format_float($max * $value / 100, $this->gradedecimals, $localized);
        }
    }
public function real_grade_value($value, $max) {
        $localized = true;
        if (is_null($value) or $value === '') {
            return null;
        } elseif ($max == 0) {
            return 0;
        } else {
            return format_float($max * $value / 100, $this->gradedecimals, $localized);
        }
    }
public function real_grade_value ( $ value , $ max ) { $ localized = true ; if ( is_null ( $ value ) or $ value === '' ) { return null ; } elseif ( $ max == 0 ) { return 0 ; } else { return format_float ( $ max * $ value / 100 , $ this -> gradedecimals , $ localized ) ; } }
Calculates the real value of a grade

@param float $value percentual value from 0 to 100
@param float $max   the maximal grade
@return string
Calculates the real value of a grade