From b4cbad8b33a333130e0950e5eaef0dde66b83994 Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Mon, 12 Jun 2023 14:31:44 +0800 Subject: [PATCH] MDL-77632 core_grades: Add rowtitle class to grade category cell --- grade/edit/tree/lib.php | 3 ++- grade/tests/behat/toggle_grade_categories.feature | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/grade/edit/tree/lib.php b/grade/edit/tree/lib.php index 5cdc18ea358..5d939e36a8b 100644 --- a/grade/edit/tree/lib.php +++ b/grade/edit/tree/lib.php @@ -844,7 +844,8 @@ class grade_edit_tree_column_name extends grade_edit_tree_column { $moveaction = isset($params['moveaction']) ? $params['moveaction'] : ''; $categorycell = parent::get_category_cell($category, $levelclass, $params); $categorycell->colspan = ($this->deepest_level + 2) - $params['level']; - $categorycell->text = html_writer::div($mastercheckbox . $visibilitytoggle . $moveaction . $params['name'], 'font-weight-bold'); + $rowtitle = html_writer::div($params['name'], 'rowtitle'); + $categorycell->text = html_writer::div($mastercheckbox . $visibilitytoggle . $moveaction . $rowtitle, 'font-weight-bold'); return $categorycell; } diff --git a/grade/tests/behat/toggle_grade_categories.feature b/grade/tests/behat/toggle_grade_categories.feature index 64a26841816..7965fb915d6 100644 --- a/grade/tests/behat/toggle_grade_categories.feature +++ b/grade/tests/behat/toggle_grade_categories.feature @@ -126,10 +126,12 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade And I should not see "Course total" in the "setup-grades" "table" # Expand the grade category 'Course'. The aggregated max grade should not be displayed within the 'Course' row anymore. And I click on "Expand" "link" in the "Course" "table_row" + And the following should exist in the "setup-grades" table: | Name | Max grade | | Course | | | Category 1 | 140.00 | | Course total | 240.00 | + And I should not see "Category 1 total" in the "setup-grades" "table" Scenario: A teacher can collapse and expand grade categories in the Gradebook setup when moving grade items Given I navigate to "Setup > Gradebook setup" in the course gradebook