Línea 5... |
Línea 5... |
5 |
I need to grant students extensions at any time
|
5 |
I need to grant students extensions at any time
|
Línea 6... |
Línea 6... |
6 |
|
6 |
|
7 |
Background:
|
7 |
Background:
|
8 |
Given the following "courses" exist:
|
8 |
Given the following "courses" exist:
|
9 |
| fullname | shortname | category | groupmode |
|
9 |
| fullname | shortname | category | groupmode |
|
10 |
| Course 1 | C1 | 0 | 1 |
|
10 |
| Course 1 | C1 | 0 | 1 |
|
11 |
And the following "users" exist:
|
11 |
And the following "users" exist:
|
12 |
| username | firstname | lastname | email |
|
12 |
| username | firstname | lastname | email |
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
14 |
| student1 | Student | 1 | student1@example.com |
|
14 |
| student1 | Student | 1 | student1@example.com |
|
15 |
| student2 | Student | 2 | student2@example.com |
|
15 |
| student2 | Student | 2 | student2@example.com |
|
16 |
| student3 | Student | 3 | student3@example.com |
|
16 |
| student3 | Student | 3 | student3@example.com |
|
17 |
| student4 | Student | 4 | student4@example.com |
|
17 |
| student4 | Student | 4 | student4@example.com |
|
18 |
| student5 | Student | 5 | student5@example.com |
|
18 |
| student5 | Student | 5 | student5@example.com |
|
19 |
| student6 | Student | 6 | student6@example.com |
|
19 |
| student6 | Student | 6 | student6@example.com |
|
20 |
And the following "course enrolments" exist:
|
20 |
And the following "course enrolments" exist:
|
21 |
| user | course | role |
|
21 |
| user | course | role |
|
22 |
| teacher1 | C1 | editingteacher |
|
22 |
| teacher1 | C1 | editingteacher |
|
23 |
| student1 | C1 | student |
|
23 |
| student1 | C1 | student |
|
24 |
| student2 | C1 | student |
|
24 |
| student2 | C1 | student |
|
25 |
| student3 | C1 | student |
|
25 |
| student3 | C1 | student |
|
26 |
| student4 | C1 | student |
|
26 |
| student4 | C1 | student |
|
27 |
| student5 | C1 | student |
|
27 |
| student5 | C1 | student |
|
Línea 28... |
Línea 28... |
28 |
| student6 | C1 | student |
|
28 |
| student6 | C1 | student |
|
29 |
|
29 |
|
30 |
@javascript
|
30 |
@javascript
|
31 |
Scenario: Granting an extension to an offline assignment
|
31 |
Scenario: Granting an extension to an offline assignment
|
32 |
Given the following "activities" exist:
|
32 |
Given the following "activities" exist:
|
33 |
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate |
|
33 |
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate |
|
34 |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 |
|
34 |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | ## 2014-01-01 ## |
|
35 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
35 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
36 |
When I follow "View all submissions"
|
36 |
When I navigate to "Submissions" in current page administration
|
37 |
And I open the action menu in "Student 1" "table_row"
|
37 |
And I open the action menu in "Student 1" "table_row"
|
- |
|
38 |
And I follow "Grant extension"
|
- |
|
39 |
And I should see "Student 1 (student1@example.com)"
|
- |
|
40 |
And I should see "Wednesday, 1 January 2014, 12:00 AM" in the "fitem_id_duedate" "region"
|
38 |
And I follow "Grant extension"
|
41 |
And I should see "Current extension due date" in the "fitem_id_currentextension" "region"
|
39 |
And I should see "Student 1 (student1@example.com)"
|
42 |
And I should see "None" in the "fitem_id_currentextension" "region"
|
40 |
And I set the field "Enable" to "1"
|
43 |
And I set the field "Extension due date" to "## 2014-02-02 ##"
|
- |
|
44 |
And I press "Save changes"
|
- |
|
45 |
Then I should see "Extension granted until:" in the "Student 1" "table_row"
|
- |
|
46 |
And I open the action menu in "Student 1" "table_row"
|
- |
|
47 |
And I follow "Grant extension"
|
- |
|
48 |
And I should see "Student 1 (student1@example.com)"
|
- |
|
49 |
And I should see "Wednesday, 1 January 2014, 12:00 AM" in the "fitem_id_duedate" "region"
|
- |
|
50 |
And I should see "Sunday, 2 February 2014, 12:00 AM" in the "fitem_id_currentextension" "region"
|
41 |
And I press "Save changes"
|
51 |
And the field "id_extensionduedate_day" matches value "2"
|
42 |
Then I should see "Extension granted until:" in the "Student 1" "table_row"
|
- |
|
43 |
And I log out
|
52 |
And the field "id_extensionduedate_month" matches value "February"
|
44 |
|
53 |
And I log out
|
Línea 45... |
Línea 54... |
45 |
And I am on the "Test assignment name" Activity page logged in as student1
|
54 |
And I am on the "Test assignment name" Activity page logged in as student1
|
46 |
And I should see "Extension due date"
|
55 |
And I should see "Extension due date"
|
47 |
|
56 |
|
48 |
@javascript @_alert
|
57 |
@javascript
|
49 |
Scenario: Granting extensions to an offline assignment (batch action)
|
58 |
Scenario: Granting extensions to an offline assignment (batch action)
|
- |
|
59 |
Given the following "activities" exist:
|
- |
|
60 |
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate |
|
- |
|
61 |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | ## 2014-01-01 ## |
|
- |
|
62 |
And the following "mod_assign > extensions" exist:
|
50 |
Given the following "activities" exist:
|
63 |
| assign | user | extensionduedate |
|
51 |
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate |
|
64 |
| Test assignment name | student2 | ## 2014-02-02 ## |
|
52 |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 |
|
65 |
| Test assignment name | student3 | ## 2014-03-03 ## |
|
53 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
66 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
54 |
When I follow "View all submissions"
|
67 |
When I navigate to "Submissions" in current page administration
|
55 |
And I set the field "selectall" to "1"
|
68 |
And I set the field "selectall" to "1"
|
56 |
And I set the field "operation" to "Grant extension"
|
69 |
And I click on "Extend" "button" in the "sticky-footer" "region"
|
57 |
And I click on "Go" "button" confirming the dialogue
|
70 |
And I click on "Extend" "button" in the "Grant extension" "dialogue"
|
58 |
And I should see "Student 1 (student1@example.com)"
|
71 |
And I should see "Student 1 (student1@example.com)"
|
59 |
And I should see "Student 2 (student2@example.com)"
|
72 |
And I should see "Student 2 (student2@example.com)"
|
60 |
And I should see "Student 3 (student3@example.com)"
|
73 |
And I should see "Student 3 (student3@example.com)"
|
- |
|
74 |
And I should see "Student 4 (student4@example.com)"
|
- |
|
75 |
And I should see "Student 5 (student5@example.com)"
|
- |
|
76 |
And I should see "1 more..."
|
61 |
And I should see "Student 4 (student4@example.com)"
|
77 |
And I should see "Wednesday, 1 January 2014, 12:00 AM" in the "fitem_id_duedate" "region"
|
62 |
And I should see "Student 5 (student5@example.com)"
|
78 |
And I should see "Various between Sunday, 2 February 2014, 12:00 AM and Monday, 3 March 2014, 12:00 AM" in the "fitem_id_currentextension" "region"
|
63 |
And I should see "1 more..."
|
79 |
And I should see "Users with no current extension: 4" in the "fitem_id_currentextension" "region"
|
64 |
And I set the field "Enable" to "1"
|
80 |
And I set the field "Enable" to "1"
|
65 |
And I press "Save changes"
|
81 |
And I press "Save changes"
|
66 |
Then I should see "Extension granted until:" in the "Student 1" "table_row"
|
82 |
Then I should see "Extension granted until:" in the "Student 1" "table_row"
|
67 |
And I should see "Extension granted until:" in the "Student 2" "table_row"
|
83 |
And I should see "Extension granted until:" in the "Student 2" "table_row"
|
68 |
And I should see "Extension granted until:" in the "Student 3" "table_row"
|
84 |
And I should see "Extension granted until:" in the "Student 3" "table_row"
|
69 |
And I should see "Extension granted until:" in the "Student 4" "table_row"
|
85 |
And I should see "Extension granted until:" in the "Student 4" "table_row"
|
70 |
And I should see "Extension granted until:" in the "Student 5" "table_row"
|
- |
|
71 |
And I should see "Extension granted until:" in the "Student 6" "table_row"
|
86 |
And I should see "Extension granted until:" in the "Student 5" "table_row"
|
72 |
And I log out
|
87 |
And I should see "Extension granted until:" in the "Student 6" "table_row"
|
Línea 73... |
Línea 88... |
73 |
|
88 |
And I log out
|
74 |
And I am on the "Test assignment name" Activity page logged in as student1
|
89 |
And I am on the "Test assignment name" Activity page logged in as student1
|
75 |
And I should see "Extension due date"
|
90 |
And I should see "Extension due date"
|
76 |
|
91 |
|
77 |
@javascript
|
92 |
@javascript
|
78 |
Scenario: Validating that extension date is after due date
|
93 |
Scenario: Validating that extension date is after due date
|
79 |
Given the following "activities" exist:
|
94 |
Given the following "activities" exist:
|
80 |
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate |
|
95 |
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate |
|
81 |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 | 1388620800 |
|
96 |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | ## 2034-01-01 ## | ## 2034-01-02 ## |
|
82 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
97 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
83 |
When I follow "View all submissions"
|
98 |
When I navigate to "Submissions" in current page administration
|
84 |
And I open the action menu in "Student 1" "table_row"
|
99 |
And I open the action menu in "Student 1" "table_row"
|
85 |
And I follow "Grant extension"
|
100 |
And I follow "Grant extension"
|
86 |
And I should see "Student 1 (student1@example.com)"
|
101 |
And I should see "Student 1 (student1@example.com)"
|
87 |
And I set the field "Enable" to "1"
|
102 |
And I set the field "Enable" to "1"
|
88 |
And I set the following fields to these values:
|
103 |
And I set the following fields to these values:
|
89 |
| extensionduedate[day] | 1 |
|
104 |
| extensionduedate[day] | 1 |
|
90 |
And I press "Save changes"
|
105 |
And I press "Save changes"
|
91 |
Then I should see "Extension date must be after the due date"
|
106 |
Then I should see "Extension date must be after the due date"
|
Línea 92... |
Línea 107... |
92 |
And I set the following fields to these values:
|
107 |
And I set the following fields to these values:
|
93 |
| extensionduedate[year] | 2013 |
|
108 |
| extensionduedate[year] | 2023 |
|
94 |
And I press "Save changes"
|
109 |
And I press "Save changes"
|
95 |
Then I should see "Extension date must be after the allow submissions from date"
|
110 |
Then I should see "Extension date must be after the allow submissions from date"
|
96 |
|
111 |
|
97 |
@javascript @_alert
|
112 |
@javascript
|
98 |
Scenario: Granting extensions to an offline assignment (batch action)
|
113 |
Scenario: Granting extensions to an offline assignment (batch action)
|
99 |
Given the following "activities" exist:
|
114 |
Given the following "activities" exist:
|
100 |
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate |
|
115 |
| activity | course | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate |
|
101 |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 | 1388620800 |
|
116 |
| assign | C1 | Test assignment name | Test assignment description | 0 | 0 | ## 2034-01-01 ## | ## 2034-01-02 ## |
|
102 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
117 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
103 |
When I follow "View all submissions"
|
118 |
When I navigate to "Submissions" in current page administration
|
104 |
And I set the field "selectall" to "1"
|
119 |
And I set the field "selectall" to "1"
|
105 |
And I set the field "operation" to "Grant extension"
|
120 |
And I click on "Extend" "button" in the "sticky-footer" "region"
|
106 |
And I click on "Go" "button" confirming the dialogue
|
121 |
And I click on "Extend" "button" in the "Grant extension" "dialogue"
|
Línea 114... |
Línea 129... |
114 |
And I set the following fields to these values:
|
129 |
And I set the following fields to these values:
|
115 |
| extensionduedate[day] | 1 |
|
130 |
| extensionduedate[day] | 1 |
|
116 |
And I press "Save changes"
|
131 |
And I press "Save changes"
|
117 |
Then I should see "Extension date must be after the due date"
|
132 |
Then I should see "Extension date must be after the due date"
|
118 |
And I set the following fields to these values:
|
133 |
And I set the following fields to these values:
|
119 |
| extensionduedate[year] | 2013 |
|
134 |
| extensionduedate[year] | 2023 |
|
120 |
And I press "Save changes"
|
135 |
And I press "Save changes"
|
121 |
Then I should see "Extension date must be after the allow submissions from date"
|
136 |
Then I should see "Extension date must be after the allow submissions from date"
|