From b297faa4abb39b69a15c21dac7ae37773cfc42b2 Mon Sep 17 00:00:00 2001 From: Mahmoud Kassaei Date: Mon, 1 Feb 2021 14:44:56 +0000 Subject: [PATCH] MDL-70755 Quiz overrides: Broken layout for Group overrides --- mod/quiz/overrides.php | 2 +- mod/quiz/tests/behat/quiz_group_override.feature | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/quiz/overrides.php b/mod/quiz/overrides.php index fafcb4fa308..739504804d8 100644 --- a/mod/quiz/overrides.php +++ b/mod/quiz/overrides.php @@ -88,7 +88,7 @@ $headers = []; // Fetch all overrides. if ($groupmode) { - $colname = get_string('group'); + $headers[] = get_string('group'); // To filter the result by the list of groups that the current user has access to. if ($groups) { $params = ['quizid' => $quiz->id]; diff --git a/mod/quiz/tests/behat/quiz_group_override.feature b/mod/quiz/tests/behat/quiz_group_override.feature index f9586310db0..69ed5e05fea 100644 --- a/mod/quiz/tests/behat/quiz_group_override.feature +++ b/mod/quiz/tests/behat/quiz_group_override.feature @@ -76,6 +76,9 @@ Feature: Quiz group override | Attempts allowed | 2 | And I press "Save" Then "Group 1" "table_row" should exist + # Check all column headers are present. + And I should see "Group" in the "Overrides" "table_row" + And I should see "Action" in the "Overrides" "table_row" Scenario: A teacher with accessallgroups permission should see all group overrides Given the following "mod_quiz > group overrides" exist: