1 |
efrain |
1 |
@gradereport @gradereport_overview
|
|
|
2 |
Feature: Grade overview report should be hidden from suspended enrolments
|
|
|
3 |
While viewing the grade overview report
|
|
|
4 |
As a student
|
|
|
5 |
I should only see courses I am active in
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname |
|
|
|
10 |
| Active course | C1 |
|
|
|
11 |
| Suspended course | C2 |
|
|
|
12 |
And the following "users" exist:
|
|
|
13 |
| username | firstname | lastname | email |
|
|
|
14 |
| student1 | Student | 1 | student1@example.com |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role | status |
|
|
|
17 |
| student1 | C1 | student | 0 |
|
|
|
18 |
| student1 | C2 | student | 1 |
|
|
|
19 |
|
|
|
20 |
Scenario: Students should not see grades for courses with suspended enrolments
|
|
|
21 |
Given I am on the "Active course" "grades > Overview report > View" page logged in as "student1"
|
|
|
22 |
Then I should not see "Suspended course" in the "overview-grade" "table"
|
|
|
23 |
And I should see "Active course" in the "overview-grade" "table"
|
|
|
24 |
|
|
|
25 |
Scenario: Admins should see courses with suspended enrolments
|
|
|
26 |
Given I log in as "admin"
|
|
|
27 |
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
|
|
28 |
And I follow "Student 1"
|
|
|
29 |
When I click on "Grades overview" "link"
|
|
|
30 |
Then I should see "Suspended course" in the "overview-grade" "table"
|
|
|
31 |
And I should see "Active course" in the "overview-grade" "table"
|