From 37f308629a23aa07104d1be415f39dec798f3620 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Fri, 5 Dec 2014 15:54:17 +0800 Subject: [PATCH 1/2] MDL-48347 gradebook: Single view shows all grade items. Manual grade items, course totals, and categroy totals were not being displayed in the single view. --- grade/report/singleview/classes/local/ui/finalgrade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grade/report/singleview/classes/local/ui/finalgrade.php b/grade/report/singleview/classes/local/ui/finalgrade.php index dd5348c5b9b..d57083f730e 100644 --- a/grade/report/singleview/classes/local/ui/finalgrade.php +++ b/grade/report/singleview/classes/local/ui/finalgrade.php @@ -48,7 +48,8 @@ class finalgrade extends grade_attribute_format implements unique_value, be_disa $this->label = $this->grade->grade_item->itemname; $isoverridden = $this->grade->is_overridden(); - if (!empty($isoverridden)) { + // If the grade is overridden or the grade type is not an activity then use finalgrade. + if (!empty($isoverridden) || $this->grade->grade_item->itemtype != 'mod') { $val = $this->grade->finalgrade; } else { $val = $this->grade->rawgrade; From 831829ddf303675f9454b3f186e28244ddc3b24b Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Mon, 8 Dec 2014 10:37:44 +0800 Subject: [PATCH 2/2] MDL-48347 gradebook: More behat tests for single view. --- grade/report/singleview/tests/behat/singleview.feature | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/grade/report/singleview/tests/behat/singleview.feature b/grade/report/singleview/tests/behat/singleview.feature index d33a7e05369..7e4197add51 100644 --- a/grade/report/singleview/tests/behat/singleview.feature +++ b/grade/report/singleview/tests/behat/singleview.feature @@ -66,6 +66,13 @@ Feature: We can use Single view And the following should exist in the "generaltable" table: | Test assignment one | | 10.00 | + And I set the following fields to these values: + | Test grade item | 45 | + And I press "Update" + Then I should see "Grades were set for 1 items" + And I press "Continue" + And the field "Grade for Test grade item" matches value "45.00" + And the field "Grade for Course total" matches value "55.00" And I click on "Show grades for Test assignment three" "link" And I click on "Override for james (Student) 1" "checkbox" And I set the following fields to these values: