diff --git a/grade/edit/tree/lib.php b/grade/edit/tree/lib.php index 0a393b6a746d1..af79fbfd83a44 100644 --- a/grade/edit/tree/lib.php +++ b/grade/edit/tree/lib.php @@ -276,7 +276,7 @@ public function build_html_tree($element, $totals, $parents, $level, &$row_count } $categoryrow->attributes['data-aggregation'] = $category->aggregation; $categoryrow->attributes['data-grademax'] = $category->grade_item->grademax; - $categoryrow->attributes['data-aggregationcoef'] = $category->grade_item->aggregationcoef; + $categoryrow->attributes['data-aggregationcoef'] = floatval($category->grade_item->aggregationcoef); $categoryrow->attributes['data-itemid'] = $category->grade_item->id; $categoryrow->attributes['data-hidden'] = 'false'; foreach ($rowclasses as $class) { @@ -350,7 +350,7 @@ public function build_html_tree($element, $totals, $parents, $level, &$row_count } else { $gradeitemrow->attributes['data-parent-category'] = $parent_eid; $gradeitemrow->attributes['data-grademax'] = $object->grademax; - $gradeitemrow->attributes['data-aggregationcoef'] = $object->aggregationcoef; + $gradeitemrow->attributes['data-aggregationcoef'] = floatval($object->aggregationcoef); } foreach ($rowclasses as $class) { $gradeitemrow->attributes['class'] .= ' ' . $class; diff --git a/grade/tests/behat/grade_edit_tree_bulk_actions.feature b/grade/tests/behat/grade_edit_tree_bulk_actions.feature index 6e312a8000939..43b9afc858588 100644 --- a/grade/tests/behat/grade_edit_tree_bulk_actions.feature +++ b/grade/tests/behat/grade_edit_tree_bulk_actions.feature @@ -253,7 +253,8 @@ Feature: Teachers can perform bulk actions on grade items and categories in the And I press tab And the focused element is "Move" "button" in the "Move items" "dialogue" When I press the enter key - And I wait to be redirected + And I wait until the page is ready + And I wait "2" seconds And I press tab key in "region-main" "region" # Confirm that 'Grade item 1' and 'Grade item 2' have been moved to 'Category 3' And I click on grade item menu "Grade item 1" of type "gradeitem" on "setup" page