1 |
efrain |
1 |
@mod @mod_forum @core_completion
|
|
|
2 |
Feature: Completion pass grade view activity completion in the forum activity
|
|
|
3 |
In order to have visibility of forum completion requirements
|
|
|
4 |
As a student
|
|
|
5 |
I need to be able to view my forum 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 | category | enablecompletion |
|
|
|
14 |
| Course 1 | C1 | 0 | 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 | forum |
|
|
|
21 |
| course | C1 |
|
|
|
22 |
| idnumber | mh1 |
|
|
|
23 |
| name | Music history |
|
|
|
24 |
And I am on the "Music history" "forum activity editing" page logged in as teacher1
|
|
|
25 |
And I expand all fieldsets
|
|
|
26 |
And I set the following fields to these values:
|
|
|
27 |
| Whole forum grading > Type | Point |
|
|
|
28 |
| Whole forum grading > Grade to pass | 50 |
|
|
|
29 |
| Add requirements | 1 |
|
|
|
30 |
| View the activity | 1 |
|
|
|
31 |
| Receive a grade | 1 |
|
|
|
32 |
| Passing grade | 1 |
|
|
|
33 |
| completiongradeitemnumber | Whole forum |
|
|
|
34 |
| completionpostsenabled | 1 |
|
|
|
35 |
| completionposts | 2 |
|
|
|
36 |
| completiondiscussionsenabled | 1 |
|
|
|
37 |
| completiondiscussions | 1 |
|
|
|
38 |
| completionrepliesenabled | 1 |
|
|
|
39 |
| completionreplies | 1 |
|
|
|
40 |
And I press "Save and display"
|
|
|
41 |
|
|
|
42 |
Scenario: View automatic completion items as a teacher
|
|
|
43 |
Given I am on the "Music history" "forum activity" page logged in as teacher1
|
|
|
44 |
Then "Music history" should have the "View" completion condition
|
|
|
45 |
And "Music history" should have the "Start discussions: 1" completion condition
|
|
|
46 |
And "Music history" should have the "Make forum posts: 2" completion condition
|
|
|
47 |
And "Music history" should have the "Post replies: 1" completion condition
|
|
|
48 |
And "Music history" should have the "Receive a grade" completion condition
|
|
|
49 |
And "Music history" should have the "Receive a passing grade" completion condition
|
|
|
50 |
|
|
|
51 |
@javascript
|
|
|
52 |
Scenario: View automatic completion items as a failing student
|
|
|
53 |
Given I am on the "Music history" "forum activity" page logged in as student1
|
|
|
54 |
And the "View" completion condition of "Music history" is displayed as "done"
|
|
|
55 |
And the "Start discussions: 1" completion condition of "Music history" is displayed as "todo"
|
|
|
56 |
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
|
|
|
57 |
And the "Post replies: 1" completion condition of "Music history" is displayed as "todo"
|
|
|
58 |
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
|
|
59 |
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
|
|
|
60 |
And I add a new discussion to "Music history" forum with:
|
|
|
61 |
| Subject | Fun instruments |
|
|
|
62 |
| Message | I like drums |
|
|
|
63 |
And I am on the "Music history" "forum activity" page
|
|
|
64 |
And the "View" completion condition of "Music history" is displayed as "done"
|
|
|
65 |
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
|
|
|
66 |
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
|
|
|
67 |
And the "Post replies: 1" completion condition of "Music history" is displayed as "todo"
|
|
|
68 |
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
|
|
69 |
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
|
|
|
70 |
And I reply "Fun instruments" post from "Music history" forum with:
|
|
|
71 |
| Subject | Reply 1 to Fun instruments |
|
|
|
72 |
| Message | Guitar is also Fun |
|
|
|
73 |
And I am on the "Music history" "forum activity" page
|
|
|
74 |
And the "View" completion condition of "Music history" is displayed as "done"
|
|
|
75 |
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
|
|
|
76 |
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
|
|
|
77 |
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
|
|
|
78 |
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
|
|
79 |
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
|
|
|
80 |
# Grade the student
|
|
|
81 |
And I am on the "Music history" "forum activity" page logged in as teacher1
|
|
|
82 |
And I press "Grade users"
|
|
|
83 |
And I set the field "grade" to "33"
|
|
|
84 |
And I press "Save"
|
|
|
85 |
And I press "Close grader"
|
|
|
86 |
# All conditions should now be completed.
|
|
|
87 |
When I am on the "Music history" "forum activity" page logged in as student1
|
|
|
88 |
Then the "View" completion condition of "Music history" is displayed as "done"
|
|
|
89 |
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
|
|
|
90 |
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
|
|
|
91 |
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
|
|
|
92 |
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
|
|
93 |
And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
|
|
|
94 |
|
|
|
95 |
@javascript
|
|
|
96 |
Scenario: View automatic completion items as a passing student
|
|
|
97 |
Given I am on the "Music history" "forum activity" page logged in as student1
|
|
|
98 |
And the "View" completion condition of "Music history" is displayed as "done"
|
|
|
99 |
And the "Start discussions: 1" completion condition of "Music history" is displayed as "todo"
|
|
|
100 |
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
|
|
|
101 |
And the "Post replies: 1" completion condition of "Music history" is displayed as "todo"
|
|
|
102 |
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
|
|
103 |
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
|
|
|
104 |
And I add a new discussion to "Music history" forum with:
|
|
|
105 |
| Subject | Fun instruments |
|
|
|
106 |
| Message | I like drums |
|
|
|
107 |
And I am on the "Music history" "forum activity" page
|
|
|
108 |
And the "View" completion condition of "Music history" is displayed as "done"
|
|
|
109 |
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
|
|
|
110 |
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
|
|
|
111 |
And the "Post replies: 1" 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 the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
|
|
|
114 |
And I reply "Fun instruments" post from "Music history" forum with:
|
|
|
115 |
| Subject | Reply 1 to Fun instruments |
|
|
|
116 |
| Message | Guitar is also Fun |
|
|
|
117 |
And I am on the "Music history" "forum activity" page
|
|
|
118 |
And the "View" completion condition of "Music history" is displayed as "done"
|
|
|
119 |
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
|
|
|
120 |
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
|
|
|
121 |
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
|
|
|
122 |
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
|
|
|
123 |
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
|
|
|
124 |
# Grade the student
|
|
|
125 |
And I am on the "Music history" "forum activity" page logged in as teacher1
|
|
|
126 |
And I press "Grade users"
|
|
|
127 |
And I set the field "grade" to "60"
|
|
|
128 |
And I press "Save"
|
|
|
129 |
And I press "Close grader"
|
|
|
130 |
# All conditions should now be completed.
|
|
|
131 |
When I am on the "Music history" "forum activity" page logged in as student1
|
|
|
132 |
Then the "View" completion condition of "Music history" is displayed as "done"
|
|
|
133 |
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
|
|
|
134 |
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
|
|
|
135 |
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
|
|
|
136 |
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
|
|
|
137 |
And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"
|