1 |
efrain |
1 |
@mod @mod_page @core_completion
|
|
|
2 |
Feature: View activity completion information in the Page resource
|
|
|
3 |
In order to have visibility of page completion requirements
|
|
|
4 |
As a student
|
|
|
5 |
I need to be able to view my page 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 | showcompletionconditions |
|
|
|
14 |
| Course 1 | C1 | 0 | 1 | 1 |
|
|
|
15 |
| Course 2 | C2 | 0 | 1 | 0 |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
| teacher1 | C1 | editingteacher |
|
|
|
20 |
|
|
|
21 |
Scenario: View automatic completion items as teacher
|
|
|
22 |
Given the following "activity" exists:
|
|
|
23 |
| activity | page |
|
|
|
24 |
| course | C1 |
|
|
|
25 |
| idnumber | page1 |
|
|
|
26 |
| name | Music history |
|
|
|
27 |
| intro | A lesson learned in life |
|
|
|
28 |
| completion | 2 |
|
|
|
29 |
| completionview | 1 |
|
|
|
30 |
When I am on the "Music history" "page activity" page logged in as teacher1
|
|
|
31 |
Then "Music history" should have the "View" completion condition
|
|
|
32 |
|
|
|
33 |
Scenario: View automatic completion items as student
|
|
|
34 |
Given the following "activity" exists:
|
|
|
35 |
| activity | page |
|
|
|
36 |
| course | C1 |
|
|
|
37 |
| idnumber | page1 |
|
|
|
38 |
| name | Music history |
|
|
|
39 |
| intro | A lesson learned in life |
|
|
|
40 |
| completion | 2 |
|
|
|
41 |
| completionview | 1 |
|
|
|
42 |
When I am on the "Music history" "page activity" page logged in as student1
|
|
|
43 |
Then the "View" completion condition of "Music history" is displayed as "done"
|
|
|
44 |
|
|
|
45 |
@javascript
|
|
|
46 |
Scenario: Use manual completion as teacher
|
|
|
47 |
Given the following "activity" exists:
|
|
|
48 |
| activity | page |
|
|
|
49 |
| course | C1 |
|
|
|
50 |
| idnumber | page1 |
|
|
|
51 |
| name | Music history |
|
|
|
52 |
| intro | A lesson learned in life |
|
|
|
53 |
| completion | 1 |
|
|
|
54 |
# Teacher view.
|
|
|
55 |
When I am on the "Music history" "page activity" page logged in as teacher1
|
|
|
56 |
Then the manual completion button for "Music history" should be disabled
|
|
|
57 |
|
|
|
58 |
@javascript
|
|
|
59 |
Scenario: Use manual completion as student
|
|
|
60 |
Given the following "activity" exists:
|
|
|
61 |
| activity | page |
|
|
|
62 |
| course | C1 |
|
|
|
63 |
| idnumber | page1 |
|
|
|
64 |
| name | Music history |
|
|
|
65 |
| intro | A lesson learned in life |
|
|
|
66 |
| completion | 1 |
|
|
|
67 |
# Teacher view.
|
|
|
68 |
When I am on the "Music history" "page activity" page logged in as student1
|
|
|
69 |
And I toggle the manual completion state of "Music history"
|
|
|
70 |
And the manual completion button of "Music history" is displayed as "Done"
|
|
|
71 |
|
|
|
72 |
Scenario: The manual completion button will not be shown on the course page if the Show activity completion conditions is set to No as teacher
|
|
|
73 |
Given the following "activity" exists:
|
|
|
74 |
| activity | page |
|
|
|
75 |
| course | C2 |
|
|
|
76 |
| idnumber | page1 |
|
|
|
77 |
| name | Music history |
|
|
|
78 |
| intro | A lesson learned in life |
|
|
|
79 |
| completion | 1 |
|
|
|
80 |
When I am on the "Music history" "page activity" page logged in as teacher1
|
|
|
81 |
Then the manual completion button for "Music history" should not exist
|
|
|
82 |
|
|
|
83 |
Scenario: The manual completion button will not be shown on the course page if the Show activity completion conditions is set to No as student
|
|
|
84 |
Given the following "activity" exists:
|
|
|
85 |
| activity | page |
|
|
|
86 |
| course | C2 |
|
|
|
87 |
| idnumber | page1 |
|
|
|
88 |
| name | Music history |
|
|
|
89 |
| intro | A lesson learned in life |
|
|
|
90 |
| completion | 1 |
|
|
|
91 |
When I am on the "Music history" "page activity" page logged in as student1
|
|
|
92 |
Then the manual completion button for "Music history" should not exist
|