1 |
efrain |
1 |
@core @core_completion @javascript
|
|
|
2 |
Feature: Students will be shown relevant completion state based on grade item visibility.
|
|
|
3 |
In order to understand completion states of course modules
|
|
|
4 |
As a student
|
|
|
5 |
I need to see relevant completion information for various combination of activity passgrade settings
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | enablecompletion |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | First | teacher1@example.com |
|
|
|
14 |
| student1 | Student | First | student1@example.com |
|
|
|
15 |
| student2 | Student | Second | student2@example.com |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
| student1 | C1 | student |
|
|
|
20 |
| student2 | C1 | student |
|
|
|
21 |
And the following "activity" exists:
|
|
|
22 |
| activity | assign |
|
|
|
23 |
| course | C1 |
|
|
|
24 |
| name | Test assignment name |
|
|
|
25 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
26 |
| assignsubmission_file_enabled | 0 |
|
|
|
27 |
| completion | 2 |
|
|
|
28 |
| completionpassgrade | 1 |
|
|
|
29 |
| completionusegrade | 1 |
|
|
|
30 |
| gradepass | 50 |
|
|
|
31 |
And I am on the "Course 1" course page logged in as teacher1
|
|
|
32 |
And "Student First" user has not completed "Test assignment name" activity
|
|
|
33 |
And I am on the "Course 1" course page logged in as student1
|
|
|
34 |
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "todo"
|
|
|
35 |
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "todo"
|
|
|
36 |
|
|
|
37 |
Scenario: Passing grade and receive a grade completions for visible grade item (passgrade completion enabled)
|
|
|
38 |
Given the following "grade grades" exist:
|
|
|
39 |
| gradeitem | user | grade |
|
|
|
40 |
| Test assignment name | student1 | 21.00 |
|
|
|
41 |
| Test assignment name | student2 | 50.00 |
|
|
|
42 |
And I am on the "Course 1" course page logged in as teacher1
|
|
|
43 |
And "Student First" user has completed "Test assignment name" activity
|
|
|
44 |
And "Student Second" user has completed "Test assignment name" activity
|
|
|
45 |
When I am on the "Course 1" course page logged in as student1
|
|
|
46 |
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
|
|
|
47 |
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed"
|
|
|
48 |
And I am on the "Course 1" course page logged in as student2
|
|
|
49 |
Then the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
|
|
|
50 |
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done"
|
|
|
51 |
|
|
|
52 |
Scenario: Passing grade and receive a grade completions for hidden grade item (passgrade completion enabled)
|
|
|
53 |
Given I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
|
|
|
54 |
And I hide the grade item "Test assignment name" of type "gradeitem" on "setup" page
|
|
|
55 |
And I navigate to "View > Grader report" in the course gradebook
|
|
|
56 |
And I turn editing mode on
|
|
|
57 |
And I give the grade "21" to the user "Student First" for the grade item "Test assignment name"
|
|
|
58 |
And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name"
|
|
|
59 |
And I press "Save changes"
|
|
|
60 |
And I am on "Course 1" course homepage
|
|
|
61 |
And "Student First" user has not completed "Test assignment name" activity
|
|
|
62 |
And "Student Second" user has completed "Test assignment name" activity
|
|
|
63 |
And I am on the "Course 1" course page logged in as student1
|
|
|
64 |
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
|
|
|
65 |
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "todo"
|
|
|
66 |
And I am on the "Course 1" course page logged in as student2
|
|
|
67 |
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
|
|
|
68 |
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done"
|
|
|
69 |
|
|
|
70 |
Scenario: Receive a grade completion for visible grade item (passgrade completion disabled)
|
|
|
71 |
Given I am on the "Test assignment name" "assign activity editing" page logged in as teacher1
|
|
|
72 |
And I set the following fields to these values:
|
|
|
73 |
| completionpassgrade | 0 |
|
|
|
74 |
And I press "Save and display"
|
|
|
75 |
And I am on the "Course 1" course page logged in as student1
|
|
|
76 |
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "todo"
|
|
|
77 |
And I should not see "Receive a passing grade"
|
|
|
78 |
And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
|
|
79 |
And I turn editing mode on
|
|
|
80 |
And I give the grade "21" to the user "Student First" for the grade item "Test assignment name"
|
|
|
81 |
And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name"
|
|
|
82 |
And I press "Save changes"
|
|
|
83 |
And I am on "Course 1" course homepage
|
|
|
84 |
And "Student First" user has completed "Test assignment name" activity
|
|
|
85 |
And "Student Second" user has completed "Test assignment name" activity
|
|
|
86 |
When I am on the "Course 1" course page logged in as student1
|
|
|
87 |
# Once MDL-75582 is fixed "failed" should be changed to "done"
|
|
|
88 |
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "failed"
|
|
|
89 |
And I should not see "Receive a passing grade"
|
|
|
90 |
And I am on the "Course 1" course page logged in as student2
|
|
|
91 |
Then the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
|
|
|
92 |
|
|
|
93 |
Scenario: Receive a grade completion for hidden grade item (passgrade completion disabled)
|
|
|
94 |
Given I am on the "Test assignment name" "assign activity editing" page logged in as teacher1
|
|
|
95 |
And I set the following fields to these values:
|
|
|
96 |
| completionpassgrade | 0 |
|
|
|
97 |
And I press "Save and display"
|
|
|
98 |
And I am on the "Course 1" course page logged in as student1
|
|
|
99 |
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "todo"
|
|
|
100 |
And I should not see "Receive a passing grade"
|
|
|
101 |
And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
|
|
|
102 |
And I hide the grade item "Test assignment name" of type "gradeitem" on "setup" page
|
|
|
103 |
And I navigate to "View > Grader report" in the course gradebook
|
|
|
104 |
And I turn editing mode on
|
|
|
105 |
And I give the grade "21" to the user "Student First" for the grade item "Test assignment name"
|
|
|
106 |
And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name"
|
|
|
107 |
And I press "Save changes"
|
|
|
108 |
And I am on "Course 1" course homepage
|
|
|
109 |
And "Student First" user has completed "Test assignment name" activity
|
|
|
110 |
And "Student Second" user has completed "Test assignment name" activity
|
|
|
111 |
When I am on the "Course 1" course page logged in as student1
|
|
|
112 |
Then the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
|
|
|
113 |
And I should not see "Receive a passing grade"
|
|
|
114 |
And I am on the "Course 1" course page logged in as student2
|
|
|
115 |
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
|