Skip to content

Commit 5494122

Browse files
committed
MDL-87600 gradereport_overview: Fix heading levels on the index page
1 parent 50e4417 commit 5494122

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

public/grade/report/overview/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
exit;
194194
}
195195
if ($report->fill_table(true, true)) {
196-
echo html_writer::tag('h3', get_string('coursesiamtaking', 'grades'));
196+
echo $OUTPUT->heading(get_string('coursesiamtaking', 'grades'));
197197
echo '<br />' . $report->print_table(true);
198198
}
199199
} else { // We have a course context. We must be navigating from the gradebook.
@@ -223,7 +223,7 @@
223223
echo $OUTPUT->footer();
224224
exit;
225225
}
226-
echo html_writer::tag('h3', get_string('coursesiamteaching', 'grades'));
226+
echo $OUTPUT->heading(get_string('coursesiamteaching', 'grades'));
227227
$report->print_teacher_table();
228228
}
229229

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@gradereport @gradereport_overview
2+
Feature: Grade overview report can be viewed
3+
In order to see the courses I am enrolled in
4+
As a user
5+
I should be able to access the grade overview report's index page
6+
7+
Background:
8+
Given the following "courses" exist:
9+
| fullname | shortname |
10+
| Awesome course | C1 |
11+
And the following "users" exist:
12+
| username | firstname | lastname | email |
13+
| teacher1 | Teacher | 1 | t1@example.com |
14+
| student1 | Student | 1 | s1@example.com |
15+
And the following "course enrolments" exist:
16+
| user | course | role |
17+
| teacher1 | C1 | editingteacher |
18+
| student1 | C1 | student |
19+
20+
@javascript @accessibility
21+
Scenario Outline: The grade overview report index page should be accessible
22+
Given I am logged in as "<user>"
23+
When I follow "Grades" in the user menu
24+
Then "<headingname>" "heading" should exist
25+
And the page should meet accessibility standards with "best-practice" extra tests
26+
27+
Examples:
28+
| user | headingname |
29+
| student1 | Courses I am taking |
30+
| teacher1 | Courses I am teaching |

0 commit comments

Comments
 (0)