1 |
efrain |
1 |
@mod @mod_workshop
|
|
|
2 |
Feature: Workshop submission and assessment
|
|
|
3 |
In order to use workshop activity
|
|
|
4 |
As a student
|
|
|
5 |
I need to be able to add a submission and assess those of my peers
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Sam1 | Student1 | student1@example.com |
|
|
|
11 |
| student2 | Sam2 | Student2 | student2@example.com |
|
|
|
12 |
| student3 | Sam3 | Student3 | student3@example.com |
|
|
|
13 |
| student4 | Sam4 | Student4 | student3@example.com |
|
|
|
14 |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
|
|
|
15 |
And the following "courses" exist:
|
|
|
16 |
| fullname | shortname |
|
|
|
17 |
| Course1 | c1 |
|
|
|
18 |
And the following "course enrolments" exist:
|
|
|
19 |
| user | course | role |
|
|
|
20 |
| student1 | c1 | student |
|
|
|
21 |
| student2 | c1 | student |
|
|
|
22 |
| student3 | c1 | student |
|
|
|
23 |
| student4 | c1 | student |
|
|
|
24 |
| teacher1 | c1 | editingteacher |
|
|
|
25 |
And the following "activities" exist:
|
|
|
26 |
| activity | name | course | idnumber | submissiontypetext | submissiontypefile |
|
|
|
27 |
| workshop | TestWorkshop | c1 | workshop1 | 2 | 1 |
|
|
|
28 |
# teacher1 sets up assessment form and changes the phase to submission
|
|
|
29 |
When I am on the "Course1" course page logged in as teacher1
|
|
|
30 |
And I edit assessment form in workshop "TestWorkshop" as:
|
|
|
31 |
| id_description__idx_0_editor | Aspect1 |
|
|
|
32 |
| id_description__idx_1_editor | Aspect2 |
|
|
|
33 |
| id_description__idx_2_editor | |
|
|
|
34 |
And I change phase in workshop "TestWorkshop" to "Submission phase"
|
|
|
35 |
# student1 submits
|
|
|
36 |
And I am on the TestWorkshop "workshop activity" page logged in as student1
|
|
|
37 |
Then I should see "Submit your work"
|
|
|
38 |
And I add a submission in workshop "TestWorkshop" as:
|
|
|
39 |
| Title | Submission1 |
|
|
|
40 |
| Submission content | Some content |
|
|
|
41 |
And "//div[@class='submission-full' and contains(.,'Submission1') and contains(.,'submitted on')]" "xpath_element" should exist
|
|
|
42 |
# student2 submits
|
|
|
43 |
And I am on the "Course1" course page logged in as student2
|
|
|
44 |
And I add a submission in workshop "TestWorkshop" as:
|
|
|
45 |
| Title | Submission2 |
|
|
|
46 |
| Submission content | Some content |
|
|
|
47 |
# student3 submits
|
|
|
48 |
And I am on the "Course1" course page logged in as student3
|
|
|
49 |
And I add a submission in workshop "TestWorkshop" as:
|
|
|
50 |
| Title | Submission3 |
|
|
|
51 |
| Submission content | Some content |
|
|
|
52 |
# teacher1 allocates reviewers and changes the phase to assessment
|
|
|
53 |
And I am on the TestWorkshop "workshop activity" page logged in as teacher1
|
|
|
54 |
And I should see "to allocate: 3"
|
|
|
55 |
And I should see "There is at least one author who has not yet submitted their work"
|
|
|
56 |
Then I should see "Workshop submissions report"
|
|
|
57 |
And I should see "Submitted (3) / not submitted (1)"
|
|
|
58 |
And I should see "Submission1" in the "Sam1 Student1" "table_row"
|
|
|
59 |
And I should see "Submission2" in the "Sam2 Student2" "table_row"
|
|
|
60 |
And I should see "Submission3" in the "Sam3 Student3" "table_row"
|
|
|
61 |
And I should see "No submission found for this user" in the "Sam4 Student4" "table_row"
|
|
|
62 |
And I allocate submissions in workshop "TestWorkshop" as:
|
|
|
63 |
| Participant | Reviewer |
|
|
|
64 |
| Sam1 Student1 | Sam2 Student2 |
|
|
|
65 |
| Sam2 Student2 | Sam1 Student1 |
|
|
|
66 |
| Sam3 Student3 | Sam1 Student1 |
|
|
|
67 |
| Sam2 Student2 | Sam4 Student4 |
|
|
|
68 |
And I am on the TestWorkshop "workshop activity" page
|
|
|
69 |
And I should see "to allocate: 0"
|
|
|
70 |
And I change phase in workshop "TestWorkshop" to "Assessment phase"
|
|
|
71 |
# student1 assesses work of student2 and student3
|
|
|
72 |
And I am on the TestWorkshop "workshop activity" page logged in as student1
|
|
|
73 |
And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 2') and contains(.,'total: 2')]" "xpath_element" should exist
|
|
|
74 |
And I assess submission "Sam2" in workshop "TestWorkshop" as:
|
|
|
75 |
| grade__idx_0 | 5 / 10 |
|
|
|
76 |
| peercomment__idx_0 | You can do better |
|
|
|
77 |
| grade__idx_1 | 10 / 10 |
|
|
|
78 |
| peercomment__idx_1 | Amazing |
|
|
|
79 |
| Feedback for the author | Good work |
|
|
|
80 |
And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 1') and contains(.,'total: 2')]" "xpath_element" should exist
|
|
|
81 |
And I am on "Course1" course homepage
|
|
|
82 |
And I assess submission "Sam3" in workshop "TestWorkshop" as:
|
|
|
83 |
| grade__idx_0 | 9 / 10 |
|
|
|
84 |
| peercomment__idx_0 | Well done |
|
|
|
85 |
| grade__idx_1 | 8 / 10 |
|
|
|
86 |
| peercomment__idx_1 | Very good |
|
|
|
87 |
| Feedback for the author | No comments |
|
|
|
88 |
And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 0') and contains(.,'total: 2')]" "xpath_element" should exist
|
|
|
89 |
# student2 assesses work of student1
|
|
|
90 |
And I am on the TestWorkshop "workshop activity" page logged in as student2
|
|
|
91 |
And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 1') and contains(.,'total: 1')]" "xpath_element" should exist
|
|
|
92 |
And I assess submission "Sam1" in workshop "TestWorkshop" as:
|
|
|
93 |
| grade__idx_0 | 6 / 10 |
|
|
|
94 |
| peercomment__idx_0 | |
|
|
|
95 |
| grade__idx_1 | 7 / 10 |
|
|
|
96 |
| peercomment__idx_1 | |
|
|
|
97 |
| Feedback for the author | Keep it up |
|
|
|
98 |
And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 0') and contains(.,'total: 1')]" "xpath_element" should exist
|
|
|
99 |
# teacher1 makes sure he can see all peer grades
|
|
|
100 |
And I am on the TestWorkshop "workshop activity" page logged in as teacher1
|
|
|
101 |
And I should see grade "52" for workshop participant "Sam1" set by peer "Sam2"
|
|
|
102 |
And I should see grade "60" for workshop participant "Sam2" set by peer "Sam1"
|
|
|
103 |
And I should see grade "-" for workshop participant "Sam2" set by peer "Sam4"
|
|
|
104 |
And I should see "No submission found for this user" in the "//table/tbody/tr[td[contains(concat(' ', normalize-space(@class), ' '), ' participant ') and contains(.,'Sam4')]]" "xpath_element"
|
|
|
105 |
And I should see grade "68" for workshop participant "Sam3" set by peer "Sam1"
|
|
|
106 |
And I click on "//table/tbody/tr[td[contains(concat(' ', normalize-space(@class), ' '), ' participant ') and contains(.,'Sam2')]]/td[contains(concat(' ', normalize-space(@class), ' '), ' receivedgrade ') and contains(.,'Sam1')]/descendant::a[@class='grade']" "xpath_element"
|
|
|
107 |
And I should see "5 / 10" in the "//fieldset[contains(.,'Aspect1')]" "xpath_element"
|
|
|
108 |
And I should see "You can do better" in the "//fieldset[contains(.,'Aspect1')]" "xpath_element"
|
|
|
109 |
And I should see "10 / 10" in the "//fieldset[contains(.,'Aspect2')]" "xpath_element"
|
|
|
110 |
And I should see "Amazing" in the "//fieldset[contains(.,'Aspect2')]" "xpath_element"
|
|
|
111 |
And I should see "Good work" in the ".overallfeedback" "css_element"
|
|
|
112 |
# teacher1 assesses the work on submission1 and assesses the assessment of peer
|
|
|
113 |
And I set the following fields to these values:
|
|
|
114 |
| Override grade for assessment | 11 |
|
|
|
115 |
| Feedback for the reviewer | |
|
|
|
116 |
And I press "Save and close"
|
|
|
117 |
And I change phase in workshop "TestWorkshop" to "Grading evaluation phase"
|
|
|
118 |
And I follow "Submission1"
|
|
|
119 |
And I should see "Grade: 52 of 80" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' assessment-full ') and contains(.,'Sam2')]" "xpath_element"
|
|
|
120 |
And I press "Assess"
|
|
|
121 |
And I set the following fields to these values:
|
|
|
122 |
| grade__idx_0 | 1 / 10 |
|
|
|
123 |
| peercomment__idx_0 | Extremely bad |
|
|
|
124 |
| grade__idx_1 | 2 / 10 |
|
|
|
125 |
| peercomment__idx_1 | Very bad |
|
|
|
126 |
| Feedback for the author | Your peers overestimate you |
|
|
|
127 |
And I press "Save and close"
|
|
|
128 |
And I press "Re-calculate grades"
|
|
|
129 |
And I should see "32" in the "//table/tbody/tr[td[contains(concat(' ', normalize-space(@class), ' '), ' participant ') and contains(.,'Sam1')]]/td[contains(concat(' ', normalize-space(@class), ' '), ' submissiongrade ')]" "xpath_element"
|
|
|
130 |
And I should see "16" in the "//table/tbody/tr[td[contains(concat(' ', normalize-space(@class), ' '), ' participant ') and contains(.,'Sam1')]]/td[contains(concat(' ', normalize-space(@class), ' '), ' gradinggrade ')]" "xpath_element"
|
|
|
131 |
And I change phase in workshop "TestWorkshop" to "Closed"
|
|
|
132 |
|
|
|
133 |
# student1 looks at the activity
|
|
|
134 |
And I am on the TestWorkshop "workshop activity" page logged in as student1
|
|
|
135 |
Then I should see "Your submission with assessments"
|
|
|
136 |
|
|
|
137 |
@javascript
|
|
|
138 |
Scenario: Add and assess submissions in workshop with javascript enabled
|