MDL-31516 Fixing grade_edit_tree::format_number

This commit is contained in:
Jean-Philippe Gaudreau 2012-07-17 09:01:10 -04:00 committed by Sam Hemelryk
parent fc994304a2
commit dacd5daa7a

View File

@ -389,7 +389,7 @@ class grade_edit_tree {
//Grader report has its own decimal place settings so they are handled elsewhere
static function format_number($number) {
$formatted = rtrim(format_float($number, 4),'0');
if (substr($formatted, -1)=='.') { //if last char is the decimal point
if (substr($formatted, -1)==get_string('decsep', 'langconfig')) { //if last char is the decimal point
$formatted .= '0';
}
return $formatted;