1441 |
ariadna |
1 |
@mod @mod_workshop
|
|
|
2 |
Feature: Testing overview integration in mod_workshop
|
|
|
3 |
In order to summarize the workshops
|
|
|
4 |
As a user
|
|
|
5 |
I need to be able to see the workshop overview
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname |
|
|
|
10 |
| student1 | Student | 1 |
|
|
|
11 |
| student2 | Student | 2 |
|
|
|
12 |
| student3 | Student | 3 |
|
|
|
13 |
| student4 | Student | 4 |
|
|
|
14 |
| student5 | Student | 5 |
|
|
|
15 |
| student6 | Student | 6 |
|
|
|
16 |
| student7 | Student | 7 |
|
|
|
17 |
| student8 | Student | 8 |
|
|
|
18 |
| teacher1 | Teacher | T |
|
|
|
19 |
And the following "courses" exist:
|
|
|
20 |
| fullname | shortname | groupmode |
|
|
|
21 |
| Course 1 | C1 | 1 |
|
|
|
22 |
And the following "course enrolments" exist:
|
|
|
23 |
| user | course | role |
|
|
|
24 |
| student1 | C1 | student |
|
|
|
25 |
| student2 | C1 | student |
|
|
|
26 |
| student3 | C1 | student |
|
|
|
27 |
| student4 | C1 | student |
|
|
|
28 |
| student5 | C1 | student |
|
|
|
29 |
| student6 | C1 | student |
|
|
|
30 |
| student7 | C1 | student |
|
|
|
31 |
| student8 | C1 | student |
|
|
|
32 |
| teacher1 | C1 | editingteacher |
|
|
|
33 |
And the following "activities" exist:
|
|
|
34 |
| activity | name | course | idnumber | submissiontypetext | submissiontypefile | grade | gradinggrade | gradedecimals | overallfeedbackmethod |latesubmissions | submisstionstart | submissionend |
|
|
|
35 |
| workshop | Activity 1 | C1 | workshop1 | 2 | 1 | 100 | 5 | 1 | 2 |1 | ##1 Jan 2018 08:00## | ##1 Jan 2040 08:00## |
|
|
|
36 |
| workshop | Activity 2 | C1 | workshop1 | 2 | 1 | 100 | 5 | 1 | 2 |1 | ##1 Jan 2018 08:00## | ##1 Jan 2040 08:00## |
|
|
|
37 |
|
|
|
38 |
Scenario: The workshop overview report should generate log events
|
|
|
39 |
Given I am on the "Course 1" "course > activities > workshop" page logged in as "teacher1"
|
|
|
40 |
When I am on the "Course 1" "course" page logged in as "teacher1"
|
|
|
41 |
And I navigate to "Reports" in current page administration
|
|
|
42 |
And I click on "Logs" "link"
|
|
|
43 |
And I click on "Get these logs" "button"
|
|
|
44 |
Then I should see "Course activities overview page viewed"
|
|
|
45 |
And I should see "viewed the instance list for the module 'workshop'"
|
|
|
46 |
|
|
|
47 |
@javascript
|
|
|
48 |
Scenario: Students can see relevant columns in the workshop overview
|
|
|
49 |
# Workshop is not compatible with grade generators (hopefully someday).
|
|
|
50 |
Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
|
|
51 |
And I turn editing mode on
|
|
|
52 |
And I change window size to "large"
|
|
|
53 |
And I click on "Activity 1 (submission)" "core_grades > grade_actions" in the "Student 1" "table_row"
|
|
|
54 |
And I choose "Edit grade" in the open action menu
|
|
|
55 |
And I set the following fields to these values:
|
|
|
56 |
| Overridden | 1 |
|
|
|
57 |
| Final grade | 10 |
|
|
|
58 |
And I press "Save changes"
|
|
|
59 |
And I click on "Activity 2 (assessment)" "core_grades > grade_actions" in the "Student 1" "table_row"
|
|
|
60 |
And I choose "Edit grade" in the open action menu
|
|
|
61 |
And I set the following fields to these values:
|
|
|
62 |
| Overridden | 1 |
|
|
|
63 |
| Final grade | 20 |
|
|
|
64 |
And I press "Save changes"
|
|
|
65 |
And I change window size to "medium"
|
|
|
66 |
And I am on the "Activity 1" "workshop activity" page
|
|
|
67 |
And I change phase in workshop "Activity 1" to "Submission phase"
|
|
|
68 |
When I am on the "Course 1" "course > activities > workshop" page logged in as "student1"
|
|
|
69 |
# Check columns.
|
|
|
70 |
Then I should see "Name" in the "workshop_overview_collapsible" "region"
|
|
|
71 |
And I should see "Phase" in the "workshop_overview_collapsible" "region"
|
|
|
72 |
And I should see "Deadline" in the "workshop_overview_collapsible" "region"
|
|
|
73 |
And I should see "Assessment grade" in the "workshop_overview_collapsible" "region"
|
|
|
74 |
And I should see "Submission grade" in the "workshop_overview_collapsible" "region"
|
|
|
75 |
# Check phase.
|
|
|
76 |
And I should see "Submission phase" in the "Activity 1" "table_row"
|
|
|
77 |
And I should see "Setup phase" in the "Activity 2" "table_row"
|
|
|
78 |
# Cheack Deadline.
|
|
|
79 |
And I should see "1 January 2040" in the "Activity 1" "table_row"
|
|
|
80 |
And I should see "-" in the "Activity 2" "table_row"
|
|
|
81 |
# Check Grades.
|
|
|
82 |
And I should see "10.00" in the "Activity 1" "table_row"
|
|
|
83 |
And I should see "-" in the "Activity 1" "table_row"
|
|
|
84 |
And I should see "-" in the "Activity 2" "table_row"
|
|
|
85 |
# The worksup assessment grade is normalized to 5.00.
|
|
|
86 |
And I should see "5.00" in the "Activity 2" "table_row"
|
|
|
87 |
|
|
|
88 |
Scenario: Teachers can see relevant columns in the workshop overview
|
|
|
89 |
Given I log in as "teacher1"
|
|
|
90 |
And I am on the "C1" course page logged in as teacher1
|
|
|
91 |
And I edit assessment form in workshop "Activity 1" as:
|
|
|
92 |
| id_description__idx_0_editor | Aspect1 |
|
|
|
93 |
| id_description__idx_1_editor | |
|
|
|
94 |
| id_description__idx_2_editor | |
|
|
|
95 |
And I change phase in workshop "Activity 1" to "Submission phase"
|
|
|
96 |
# Change activity 2 to submission phase to see due date.
|
|
|
97 |
And I am on the "Activity 2" "workshop activity" page
|
|
|
98 |
And I change phase in workshop "Activity 2" to "Submission phase"
|
|
|
99 |
# student1 submits
|
|
|
100 |
And I am on the "Activity 1" "workshop activity" page logged in as student1
|
|
|
101 |
And I add a submission in workshop "Activity 1" as:
|
|
|
102 |
| Title | Submission1 |
|
|
|
103 |
| Submission content | Some content |
|
|
|
104 |
# teacher1 allocates reviewers and changes the phase to assessment
|
|
|
105 |
When I am on the "Activity 1" "workshop activity" page logged in as teacher1
|
|
|
106 |
And I allocate submissions in workshop "Activity 1" as:
|
|
|
107 |
| Participant | Reviewer |
|
|
|
108 |
| Student 1 | Student 2 |
|
|
|
109 |
| Student 1 | Student 3 |
|
|
|
110 |
| Student 1 | Student 4 |
|
|
|
111 |
And I am on the "Activity 1" "workshop activity" page
|
|
|
112 |
And I change phase in workshop "Activity 1" to "Assessment phase"
|
|
|
113 |
# student2 assesses work of student1
|
|
|
114 |
And I am on the "Activity 1" "workshop activity" page logged in as student2
|
|
|
115 |
And I assess submission "Student 1" in workshop "Activity 1" as:
|
|
|
116 |
| grade__idx_0 | 10 / 10 |
|
|
|
117 |
| peercomment__idx_0 | Amazing |
|
|
|
118 |
| Feedback for the author | Good work |
|
|
|
119 |
# student3 assesses work of student1
|
|
|
120 |
And I am on the "Activity 1" "workshop activity" page logged in as student3
|
|
|
121 |
And I assess submission "Student 1" in workshop "Activity 1" as:
|
|
|
122 |
| grade__idx_0 | 10 / 10 |
|
|
|
123 |
| peercomment__idx_0 | Amazing |
|
|
|
124 |
| Feedback for the author | Good work |
|
|
|
125 |
# student4 assesses work of student1
|
|
|
126 |
And I am on the "Activity 1" "workshop activity" page logged in as student4
|
|
|
127 |
And I assess submission "Student 1" in workshop "Activity 1" as:
|
|
|
128 |
| grade__idx_0 | 6 / 10 |
|
|
|
129 |
| peercomment__idx_0 | You can do better |
|
|
|
130 |
| Feedback for the author | Good work |
|
|
|
131 |
# teacher1 makes sure he can see all peer grades and changes to grading evaluation phase
|
|
|
132 |
And I am on the "Activity 1" "workshop activity" page logged in as teacher1
|
|
|
133 |
And I change phase in workshop "Activity 1" to "Grading evaluation phase"
|
|
|
134 |
And I press "Re-calculate grades"
|
|
|
135 |
# Now, the test itself.
|
|
|
136 |
When I am on the "Course 1" "course > activities > workshop" page logged in as "teacher1"
|
|
|
137 |
# Check columns.
|
|
|
138 |
Then I should see "Name" in the "workshop_overview_collapsible" "region"
|
|
|
139 |
And I should see "Phase" in the "workshop_overview_collapsible" "region"
|
|
|
140 |
And I should see "Deadline" in the "workshop_overview_collapsible" "region"
|
|
|
141 |
And I should see "Submissions" in the "workshop_overview_collapsible" "region"
|
|
|
142 |
And I should see "Assessments" in the "workshop_overview_collapsible" "region"
|
|
|
143 |
# Check phase.
|
|
|
144 |
And I should see "Grading evaluation phase" in the "Activity 1" "table_row"
|
|
|
145 |
And I should see "Submission phase" in the "Activity 2" "table_row"
|
|
|
146 |
# Cheack Deadline.
|
|
|
147 |
And I should see "-" in the "Activity 1" "table_row"
|
|
|
148 |
And I should see "1 January 2040" in the "Activity 2" "table_row"
|
|
|
149 |
# Check Submissions.
|
|
|
150 |
And I should see "1 of 8" in the "Activity 1" "table_row"
|
|
|
151 |
And I should see "0 of 8" in the "Activity 2" "table_row"
|
|
|
152 |
# Check Assessments.
|
|
|
153 |
And I should see "3 of 3" in the "Activity 1" "table_row"
|
|
|
154 |
And I should see "-" in the "Activity 2" "table_row"
|
|
|
155 |
|
|
|
156 |
@javascript
|
|
|
157 |
Scenario: The workshop index redirect to the activities overview
|
|
|
158 |
When I log in as "admin"
|
|
|
159 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
160 |
And I add the "Activities" block
|
|
|
161 |
And I click on "Workshops" "link" in the "Activities" "block"
|
|
|
162 |
Then I should see "An overview of all activities in the course"
|
|
|
163 |
And I should see "Name" in the "workshop_overview_collapsible" "region"
|
|
|
164 |
And I should see "Phase" in the "workshop_overview_collapsible" "region"
|
|
|
165 |
And I should see "Submissions" in the "workshop_overview_collapsible" "region"
|
|
|
166 |
And I should see "Assessments" in the "workshop_overview_collapsible" "region"
|