Merge branch 'MDL-50033-master-enfix' of git://github.com/mudrd8mz/moodle
[moodle.git] / mod / assign / tests / behat / steps_blind_marking.feature
CommitLineData
6e972bdd
NM
1@mod @mod_assign
2Feature: Assignments correctly add feedback to the grade report when workflow and blind marking are enabled.
3 In order to give students feedback when blind marking
4 As a teacher
5 I should be able to reveal student identities at any time and have my feedback show
6 to the student in the gradebook when the grades are in a released state.
7
8 Background:
9 Given the following "courses" exist:
10 | fullname | shortname | category | groupmode |
11 | Course 1 | C1 | 0 | 1 |
12 And the following "users" exist:
13 | username | firstname | lastname | email |
14 | teacher1 | Teacher | 1 | teacher1@example.com |
15 | student1 | Student | 1 | student1@example.com |
16 And the following "course enrolments" exist:
17 | user | course | role |
18 | teacher1 | C1 | editingteacher |
19 | student1 | C1 | student |
20 # Add the assignment.
21 And I log in as "teacher1"
22 And I follow "Course 1"
23 And I turn editing mode on
24 And I add a "Assignment" to section "1" and I fill the form with:
25 | Assignment name | Test assignment name |
26 | Description | Test assignment description |
27 | Online text | 1 |
28 | File submissions | 0 |
29 | Use marking workflow | Yes |
30 | Blind marking | Yes |
31 And I log out
32 # Add a submission.
33 And I log in as "student1"
34 And I follow "Course 1"
35 When I follow "Test assignment name"
36 Then I should not see "Feedback"
37 And I should see "Not marked" in the "Grading status" "table_row"
38 And I press "Add submission"
39 And I set the following fields to these values:
40 | Online text | I'm the student's first submission |
41 And I press "Save changes"
42 And I log out
43 # Mark the submission.
44 And I log in as "teacher1"
45 And I follow "Course 1"
46 And I follow "Test assignment name"
47 And I follow "View/grade all submissions"
48 And I should see "Not marked" in the "Participant 1" "table_row"
49 And I click on "Grade Participant 1" "link" in the "Participant 1" "table_row"
50 And I set the field "Grade out of 100" to "50"
51 And I set the field "Marking workflow state" to "In review"
52 And I set the field "Feedback comments" to "Great job! Lol, not really."
53 And I press "Save changes"
54 And I press "Continue"
55 And I should see "In review" in the "Participant 1" "table_row"
56
57 @javascript
58 Scenario: Student identities are revealed after releasing the grades.
59 When I click on "Grade Participant 1" "link" in the "Participant 1" "table_row"
60 And I set the field "Marking workflow state" to "Ready for release"
61 And I press "Save changes"
62 And I press "Continue"
63 And I should see "Ready for release" in the "Participant 1" "table_row"
64 And I click on "Grade Participant 1" "link" in the "Participant 1" "table_row"
65 And I set the field "Marking workflow state" to "Released"
66 And I press "Save changes"
67 And I press "Continue"
68 And I should see "Released" in the "Participant 1" "table_row"
69 And I set the field "Grading action" to "Reveal student identities"
70 And I press "Continue"
71 And I log out
72 And I log in as "student1"
73 And I follow "Course 1"
74 And I follow "Grades"
75 And I set the field "Grade report" to "User report"
76 Then I should see "50"
77 And I should see "Great job! Lol, not really."
78
79 @javascript
80 Scenario: Student identities are revealed before releasing the grades.
81 When I click on "Grade Participant 1" "link" in the "Participant 1" "table_row"
82 And I set the field "Marking workflow state" to "Ready for release"
83 And I press "Save changes"
84 And I press "Continue"
85 And I should see "Ready for release" in the "Participant 1" "table_row"
86 And I set the field "Grading action" to "Reveal student identities"
87 And I press "Continue"
88 And I click on "Grade Student 1" "link" in the "Student 1" "table_row"
89 And I set the field "Marking workflow state" to "Released"
90 And I press "Save changes"
91 And I press "Continue"
92 And I should see "Released" in the "Student 1" "table_row"
93 And I log out
94 And I log in as "student1"
95 And I follow "Course 1"
96 And I follow "Grades"
97 And I set the field "Grade report" to "User report"
98 Then I should see "50"
99 And I should see "Great job! Lol, not really."