1441 |
ariadna |
1 |
@mod @mod_workshop
|
|
|
2 |
Feature: Teacher can allocate submissions randomly or manually
|
|
|
3 |
In order to manage submissions
|
|
|
4 |
As a teacher
|
|
|
5 |
I should be able to allocate workshop submissions randomly or manually
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Student | One | student1@example.com |
|
|
|
11 |
| student2 | Student | Two | student2@example.com |
|
|
|
12 |
| student3 | Student | Three | student3@example.com |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
And the following "courses" exist:
|
|
|
15 |
| fullname | shortname |
|
|
|
16 |
| Course 1 | C1 |
|
|
|
17 |
And the following "course enrolments" exist:
|
|
|
18 |
| user | course | role |
|
|
|
19 |
| student1 | C1 | student |
|
|
|
20 |
| student2 | C1 | student |
|
|
|
21 |
| student3 | C1 | student |
|
|
|
22 |
| teacher1 | C1 | editingteacher |
|
|
|
23 |
And the following "activities" exist:
|
|
|
24 |
| activity | name | course | submissiontypetext |
|
|
|
25 |
| workshop | Workshop 1 | C1 | 2 |
|
|
|
26 |
And I am on the "Course 1" course page logged in as teacher1
|
|
|
27 |
And I edit assessment form in workshop "Workshop 1" as:
|
|
|
28 |
| id_description__idx_0_editor | Aspect 1 |
|
|
|
29 |
| id_description__idx_1_editor | Aspect 2 |
|
|
|
30 |
| id_description__idx_2_editor | Aspect 3 |
|
|
|
31 |
And I change phase in workshop "Workshop 1" to "Submission phase"
|
|
|
32 |
And I am on the "Workshop 1" "workshop activity" page logged in as student1
|
|
|
33 |
And I add a submission in workshop "Workshop 1" as:
|
|
|
34 |
| Title | Submitted by s1 |
|
|
|
35 |
| Submission content | Some content by s1 |
|
|
|
36 |
And I am on the "Workshop 1" "workshop activity" page logged in as student2
|
|
|
37 |
And I add a submission in workshop "Workshop 1" as:
|
|
|
38 |
| Title | Submitted by s2 |
|
|
|
39 |
| Submission content | Some content by s2 |
|
|
|
40 |
And I am on the "Workshop 1" "workshop activity" page logged in as student3
|
|
|
41 |
And I add a submission in workshop "Workshop 1" as:
|
|
|
42 |
| Title | Submitted by s3 |
|
|
|
43 |
| Submission content | Some content by s3 |
|
|
|
44 |
|
|
|
45 |
Scenario: Teacher can allocate workshop submissions randomly
|
|
|
46 |
Given I am on the "Workshop 1" "workshop activity" page logged in as teacher1
|
|
|
47 |
And I click on "Submissions allocation" "link"
|
|
|
48 |
# Allocate submissions randomly.
|
|
|
49 |
When I select "Random allocation" from the "jump" singleselect
|
|
|
50 |
And I set the following fields to these values:
|
|
|
51 |
| numofreviews | 3 |
|
|
|
52 |
And I press "Save changes"
|
|
|
53 |
# Confirm that random allocations was successful.
|
|
|
54 |
Then I should see "Trying to allocate 3 review(s) per author"
|
|
|
55 |
And I should see "Randomly assigning 6 allocations"
|
|
|
56 |
And I should see "New assessment to be done: Student Three is reviewer of Student One"
|
|
|
57 |
And I should see "New assessment to be done: Student Two is reviewer of Student One"
|
|
|
58 |
And I should see "New assessment to be done: Student Two is reviewer of Student Three"
|
|
|
59 |
And I should see "New assessment to be done: Student One is reviewer of Student Three"
|
|
|
60 |
And I should see "New assessment to be done: Student One is reviewer of Student Two"
|
|
|
61 |
And I should see "New assessment to be done: Student Three is reviewer of Student Two"
|
|
|
62 |
|
|
|
63 |
Scenario: Teacher can allocate workshop submissions manually
|
|
|
64 |
# Allocate submissions manually.
|
|
|
65 |
Given I am on the "Workshop 1" "workshop activity" page logged in as teacher1
|
|
|
66 |
When I allocate submissions in workshop "Workshop 1" as:
|
|
|
67 |
| Participant | Reviewer |
|
|
|
68 |
| Student Two | Student One |
|
|
|
69 |
# Remove submission allocation.
|
|
|
70 |
And I click on "//li[contains(text(), 'Student One')]/a[contains(@class, 'action-icon')]" "xpath_element"
|
|
|
71 |
Then I should see "Are you sure you want to deallocate the selected assessment?"
|
|
|
72 |
And I press "Yes, I am sure"
|
|
|
73 |
# Confirm submission allocation was removed.
|
|
|
74 |
And I should see "Assessment deallocated"
|