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: