Details
Description
When editing a category within gradebook the weight field doesn't display any decimal places.
It still saves any decimals you enter, if you switch to `full view` then you can see the full value (decimal places and all) that you entered. It simply does not display then on the edit screen.
I have attached a patch for category_form.php that I believe solves the problem however I wasn't able to produce the weight checkbox to ensure that this patch solved the bug nicely/entirely.
that setDefault was an old hack I guess, not needed anymore because we have following in category.php
} else if ($parent_category->aggregation == GRADE_AGGREGATE_SUM or $parent_category->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN2) { $category->grade_item_aggregationcoef = $category->grade_item_aggregationcoef == 0 ? 0 : 1; } else { $category->grade_item_aggregationcoef = format_float($category->grade_item_aggregationcoef, 4); }