Merge branch 'MDL-87600-405' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE

This commit is contained in:
Mihail Geshoski
2026-02-13 14:18:36 +08:00
3 changed files with 33 additions and 3 deletions
+2 -2
View File
@@ -169,7 +169,7 @@ if (has_capability('moodle/grade:viewall', $context) && $courseid != SITEID) {
echo $OUTPUT->header();
if ($report->fill_table(true, true)) {
echo html_writer::tag('h3', get_string('coursesiamtaking', 'grades'));
echo $OUTPUT->heading(get_string('coursesiamtaking', 'grades'));
echo '<br />' . $report->print_table(true);
}
} else { // We have a course context. We must be navigating from the gradebook.
@@ -189,7 +189,7 @@ if (has_capability('moodle/grade:viewall', $context) && $courseid != SITEID) {
}
if (count($report->teachercourses)) {
echo html_writer::tag('h3', get_string('coursesiamteaching', 'grades'));
echo $OUTPUT->heading(get_string('coursesiamteaching', 'grades'));
$report->print_teacher_table();
}
@@ -0,0 +1,30 @@
@gradereport @gradereport_overview
Feature: Grade overview report can be viewed
In order to see the courses I am enrolled in
As a user
I should be able to access the grade overview report's index page
Background:
Given the following "courses" exist:
| fullname | shortname |
| Awesome course | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | t1@example.com |
| student1 | Student | 1 | s1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript @accessibility
Scenario Outline: The grade overview report index page should be accessible
Given I am logged in as "<user>"
When I follow "Grades" in the user menu
Then "<headingname>" "heading" should exist
And the page should meet accessibility standards with "best-practice" extra tests
Examples:
| user | headingname |
| student1 | Courses I am taking |
| teacher1 | Courses I am teaching |
@@ -39,7 +39,7 @@ Feature: The student can navigate to their grades page and user grade report.
Then "//img[contains(@class, 'userpicture')]" "xpath_element" should exist
And I should see "Student 1" in the "h1" "css_element"
# Confirm that there is a subheader text - "Courses I am taking".
And "//h3[normalize-space(.)='Courses I am taking']" "xpath_element" should exist
And "Courses I am taking" "heading" should exist
# Confirm that the overview-grade table has the correct data.
And the following should exist in the "overview-grade" table:
| Course name | Grade |