1441 |
ariadna |
1 |
@mod @mod_assign
|
|
|
2 |
Feature: Assignments settings can be changed
|
|
|
3 |
In order to allow managing assignments
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to change various assignment 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 "activity" exists:
|
|
|
12 |
| activity | assign |
|
|
|
13 |
| course | C1 |
|
|
|
14 |
| name | Test assignment name |
|
|
|
15 |
| intro | Submit your online text |
|
|
|
16 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
17 |
| assignsubmission_file_enabled | 0 |
|
|
|
18 |
| maxattempts | -1 |
|
|
|
19 |
| attemptreopenmethod | manual |
|
|
|
20 |
| hidegrader | 1 |
|
|
|
21 |
| submissiondrafts | 0 |
|
|
|
22 |
| completion | 2 |
|
|
|
23 |
| completionview | 1 |
|
|
|
24 |
| completionusegrade | 1 |
|
|
|
25 |
| gradepass | 50 |
|
|
|
26 |
| completionpassgrade | 1 |
|
|
|
27 |
And the following "users" exist:
|
|
|
28 |
| username | firstname | lastname | email |
|
|
|
29 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
30 |
| student1 | Student | 1 | student1@example.com |
|
|
|
31 |
| student2 | Student | 2 | student2@example.com |
|
|
|
32 |
| student3 | Student | 3 | student2@example.com |
|
|
|
33 |
And the following "course enrolments" exist:
|
|
|
34 |
| user | course | role |
|
|
|
35 |
| teacher1 | C1 | editingteacher |
|
|
|
36 |
| student1 | C1 | student |
|
|
|
37 |
| student2 | C1 | student |
|
|
|
38 |
| student3 | C1 | student |
|
|
|
39 |
|
|
|
40 |
@javascript
|
|
|
41 |
Scenario: Changing Grant Attempts settings on activity page
|
|
|
42 |
# Initially Grant Attempts is set to Manually.
|
|
|
43 |
Given I am on the "Test assignment name" Activity page logged in as student1
|
|
|
44 |
And I press "Add submission"
|
|
|
45 |
And I set the following fields to these values:
|
|
|
46 |
| Online text | I'm the student attempt |
|
|
|
47 |
And I press "Save changes"
|
|
|
48 |
|
|
|
49 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
50 |
And I go to "Student 1" "Test assignment name" activity advanced grading page
|
|
|
51 |
And I set the field "Grade out of 100" to "40"
|
|
|
52 |
And I set the field "Notify student" to "0"
|
|
|
53 |
And I press "Save changes"
|
|
|
54 |
|
|
|
55 |
And I am on the "Test assignment name" Activity page logged in as student1
|
|
|
56 |
And "Add a new attempt" "button" should not exist
|
|
|
57 |
And "Add a new attempt based on previous submission" "button" should not exist
|
|
|
58 |
|
|
|
59 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
60 |
And I navigate to "Submissions" in current page administration
|
|
|
61 |
And I open the action menu in "Student 1" "table_row"
|
|
|
62 |
And I follow "Allow another attempt"
|
|
|
63 |
|
|
|
64 |
And I am on the "Test assignment name" Activity page logged in as student1
|
|
|
65 |
And "Add a new attempt" "button" should exist
|
|
|
66 |
And "Add a new attempt based on previous submission" "button" should exist
|
|
|
67 |
|
|
|
68 |
# Set Grant Attempts to Automatically Until Pass.
|
|
|
69 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
70 |
And I navigate to "Settings" in current page administration
|
|
|
71 |
And the field "attemptreopenmethod" matches value "manual"
|
|
|
72 |
And I set the following fields to these values:
|
|
|
73 |
| attemptreopenmethod | untilpass |
|
|
|
74 |
And I press "Save and display"
|
|
|
75 |
|
|
|
76 |
And I am on the "Test assignment name" Activity page logged in as student2
|
|
|
77 |
And I press "Add submission"
|
|
|
78 |
And I set the following fields to these values:
|
|
|
79 |
| Online text | I'm the student attempt |
|
|
|
80 |
And I press "Save changes"
|
|
|
81 |
|
|
|
82 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
83 |
And I go to "Student 2" "Test assignment name" activity advanced grading page
|
|
|
84 |
And I set the field "Grade out of 100" to "40"
|
|
|
85 |
And I set the field "Notify student" to "0"
|
|
|
86 |
And I press "Save changes"
|
|
|
87 |
|
|
|
88 |
And I am on the "Test assignment name" Activity page logged in as student2
|
|
|
89 |
And "Add a new attempt" "button" should exist
|
|
|
90 |
And "Add a new attempt based on previous submission" "button" should exist
|
|
|
91 |
|
|
|
92 |
# Set Grant Attempts back to Manually.
|
|
|
93 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
94 |
And I navigate to "Settings" in current page administration
|
|
|
95 |
And the field "attemptreopenmethod" matches value "untilpass"
|
|
|
96 |
And I set the following fields to these values:
|
|
|
97 |
| attemptreopenmethod | manual |
|
|
|
98 |
And I press "Save and display"
|
|
|
99 |
|
|
|
100 |
And I am on the "Test assignment name" Activity page logged in as student3
|
|
|
101 |
And I press "Add submission"
|
|
|
102 |
And I set the following fields to these values:
|
|
|
103 |
| Online text | I'm the student attempt |
|
|
|
104 |
And I press "Save changes"
|
|
|
105 |
|
|
|
106 |
When I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
107 |
And I change window size to "large"
|
|
|
108 |
And I go to "Student 3" "Test assignment name" activity advanced grading page
|
|
|
109 |
And I change window size to "medium"
|
|
|
110 |
And I set the field "Grade out of 100" to "40"
|
|
|
111 |
And I set the field "Notify student" to "0"
|
|
|
112 |
And I press "Save changes"
|
|
|
113 |
|
|
|
114 |
And I am on the "Test assignment name" Activity page logged in as student3
|
|
|
115 |
And "Add a new attempt" "button" should not exist
|
|
|
116 |
And "Add a new attempt based on previous submission" "button" should not exist
|
|
|
117 |
|
|
|
118 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
119 |
And I navigate to "Submissions" in current page administration
|
|
|
120 |
And I change window size to "large"
|
|
|
121 |
And I open the action menu in "Student 3" "table_row"
|
|
|
122 |
And I change window size to "medium"
|
|
|
123 |
And I follow "Allow another attempt"
|
|
|
124 |
|
|
|
125 |
And I am on the "Test assignment name" Activity page logged in as student3
|
|
|
126 |
Then "Add a new attempt" "button" should exist
|
|
|
127 |
And "Add a new attempt based on previous submission" "button" should exist
|