1 |
efrain |
1 |
@mod @mod_assign @core_completion
|
|
|
2 |
Feature: View activity completion in the assignment activity
|
|
|
3 |
In order to have visibility of assignment completion requirements
|
|
|
4 |
As a student
|
|
|
5 |
I need to be able to view my assignment completion progress
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Vinnie | Student1 | student1@example.com |
|
|
|
11 |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | enablecompletion | showcompletionconditions |
|
|
|
14 |
| Course 1 | C1 | 1 | 1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| student1 | C1 | student |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
And the following "activity" exists:
|
|
|
20 |
| activity | assign |
|
|
|
21 |
| course | C1 |
|
|
|
22 |
| idnumber | mh1 |
|
|
|
23 |
| name | Music history |
|
|
|
24 |
| section | 1 |
|
|
|
25 |
| completion | 1 |
|
|
|
26 |
| grade[modgrade_type] | point |
|
|
|
27 |
| grade[modgrade_point] | 100 |
|
|
|
28 |
And the following "activity" exists:
|
|
|
29 |
| activity | assign |
|
|
|
30 |
| course | C1 |
|
|
|
31 |
| idnumber | mh2 |
|
|
|
32 |
| name | Music history 2 |
|
|
|
33 |
| section | 1 |
|
|
|
34 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
35 |
| attemptreopenmethod | manual |
|
|
|
36 |
| maxattempts | -1 |
|
|
|
37 |
| completion | 2 |
|
|
|
38 |
| completionsubmit | 1 |
|
|
|
39 |
| grade[modgrade_type] | point |
|
|
|
40 |
| grade[modgrade_point] | 100 |
|
|
|
41 |
|
|
|
42 |
@javascript
|
|
|
43 |
Scenario: The manual completion button will be shown on the course page if the Show activity completion conditions is set to Yes
|
|
|
44 |
Given I am on the "Course 1" course page logged in as teacher1
|
|
|
45 |
# Teacher view.
|
|
|
46 |
And "Music history" should have the "Mark as done" completion condition
|
|
|
47 |
And I log out
|
|
|
48 |
# Student view.
|
|
|
49 |
When I log in as "student1"
|
|
|
50 |
And I am on "Course 1" course homepage
|
|
|
51 |
Then the manual completion button for "Music history" should exist
|
|
|
52 |
And the manual completion button of "Music history" is displayed as "Mark as done"
|
|
|
53 |
And I toggle the manual completion state of "Music history"
|
|
|
54 |
And the manual completion button of "Music history" is displayed as "Done"
|
|
|
55 |
|
|
|
56 |
@javascript
|
|
|
57 |
Scenario: The manual completion button will not be shown on the course page if the Show activity completion conditions is set to No
|
|
|
58 |
Given I am on the "Course 1" course page logged in as teacher1
|
|
|
59 |
And I navigate to "Settings" in current page administration
|
|
|
60 |
And I expand all fieldsets
|
|
|
61 |
And I set the field "Show activity completion conditions" to "No"
|
|
|
62 |
And I press "Save and display"
|
|
|
63 |
# Teacher view.
|
|
|
64 |
And "Completion" "button" should not exist in the "Music history" "activity"
|
|
|
65 |
And I log out
|
|
|
66 |
# Student view.
|
|
|
67 |
When I am on the "Course 1" course page logged in as "student1"
|
|
|
68 |
Then the manual completion button for "Music history" should not exist
|
|
|
69 |
And I am on the "Music history" "assign activity" page
|
|
|
70 |
And the manual completion button for "Music history" should exist
|
|
|
71 |
|
|
|
72 |
@javascript
|
|
|
73 |
Scenario: Use manual completion from the activity page
|
|
|
74 |
Given I am on the "Music history" "assign activity" page logged in as teacher1
|
|
|
75 |
# Teacher view.
|
|
|
76 |
And the manual completion button for "Music history" should be disabled
|
|
|
77 |
And I log out
|
|
|
78 |
# Student view.
|
|
|
79 |
And I am on the "Music history" "assign activity" page logged in as student1
|
|
|
80 |
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
|
|
81 |
And I toggle the manual completion state of "Music history"
|
|
|
82 |
And the manual completion button of "Music history" is displayed as "Done"
|
|
|
83 |
|
|
|
84 |
Scenario: View automatic completion items as a teacher
|
|
|
85 |
Given I am on the "Music history" "assign activity editing" page logged in as teacher1
|
|
|
86 |
And I expand all fieldsets
|
|
|
87 |
And I set the following fields to these values:
|
|
|
88 |
| Add requirements | 1 |
|
|
|
89 |
| View the activity | 1 |
|
|
|
90 |
| completionusegrade | 1 |
|
|
|
91 |
| completionsubmit | 1 |
|
|
|
92 |
And I press "Save and display"
|
|
|
93 |
Then "Music history" should have the "View" completion condition
|
|
|
94 |
And "Music history" should have the "Make a submission" completion condition
|
|
|
95 |
And "Music history" should have the "Receive a grade" completion condition
|
|
|
96 |
|
|
|
97 |
@javascript
|
|
|
98 |
Scenario: View automatic completion items as a student
|
|
|
99 |
Given I am on the "Music history" "assign activity editing" page logged in as teacher1
|
|
|
100 |
And I expand all fieldsets
|
|
|
101 |
And I set the following fields to these values:
|
|
|
102 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
103 |
| Add requirements | 1 |
|
|
|
104 |
| View the activity | 1 |
|
|
|
105 |
| completionusegrade | 1 |
|
|
|
106 |
| completionsubmit | 1 |
|
|
|
107 |
And I press "Save and display"
|
|
|
108 |
And I log out
|
|
|
109 |
And I am on the "Music history" "assign activity" page logged in as student1
|
|
|
110 |
And the "View" completion condition of "Music history" is displayed as "done"
|
|
|
111 |
And the "Make a submission" completion condition of "Music history" is displayed as "todo"
|
|
|
112 |
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
|
|
113 |
And I am on the "Music history" "assign activity" page
|
|
|
114 |
And I press "Add submission"
|
|
|
115 |
And I set the field "Online text" to "History of playing with drumsticks reversed"
|
|
|
116 |
And I press "Save changes"
|
|
|
117 |
And I press "Submit assignment"
|
|
|
118 |
And I press "Continue"
|
|
|
119 |
And the "View" completion condition of "Music history" is displayed as "done"
|
|
|
120 |
And the "Make a submission" completion condition of "Music history" is displayed as "done"
|
|
|
121 |
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
|
|
122 |
And I log out
|
|
|
123 |
And I am on the "Music history" "assign activity" page logged in as teacher1
|
|
|
124 |
And I follow "View all submissions"
|
|
|
125 |
And I click on "Grade" "link" in the "Vinnie Student1" "table_row"
|
|
|
126 |
And I set the field "Grade out of 100" to "33"
|
|
|
127 |
And I set the field "Notify student" to "0"
|
|
|
128 |
And I press "Save changes"
|
|
|
129 |
And I follow "View all submissions"
|
|
|
130 |
And I log out
|
|
|
131 |
When I am on the "Music history" "assign activity" page logged in as student1
|
|
|
132 |
Then the "View" completion condition of "Music history" is displayed as "done"
|
|
|
133 |
And the "Make a submission" completion condition of "Music history" is displayed as "done"
|
|
|
134 |
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
|
|
135 |
|
|
|
136 |
@javascript
|
|
|
137 |
Scenario: Automatic completion items should reset when a new attempt is manually given.
|
|
|
138 |
Given I am on the "Music history 2" "assign activity" page logged in as student1
|
|
|
139 |
And the "Make a submission" completion condition of "Music history 2" is displayed as "todo"
|
|
|
140 |
And I press "Add submission"
|
|
|
141 |
And I set the field "Online text" to "History of playing with drumsticks reversed"
|
|
|
142 |
And I press "Save changes"
|
|
|
143 |
And I press "Submit assignment"
|
|
|
144 |
And I press "Continue"
|
|
|
145 |
And the "Make a submission" completion condition of "Music history 2" is displayed as "done"
|
|
|
146 |
And I log out
|
|
|
147 |
And I am on the "Music history 2" "assign activity" page logged in as teacher1
|
|
|
148 |
And I follow "View all submissions"
|
|
|
149 |
And I click on "Grade" "link" in the "Vinnie Student1" "table_row"
|
|
|
150 |
And I set the field "Grade out of 100" to "33"
|
|
|
151 |
And I set the field "Notify student" to "0"
|
|
|
152 |
And I set the field "Allow another attempt" to "Yes"
|
|
|
153 |
And I press "Save changes"
|
|
|
154 |
And I log out
|
|
|
155 |
When I am on the "Music history 2" "assign activity" page logged in as student1
|
|
|
156 |
And I should see "Reopened"
|
|
|
157 |
And "Add a new attempt based on previous submission" "button" should exist
|
|
|
158 |
Then the "Make a submission" completion condition of "Music history 2" is displayed as "todo"
|