| 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:
|
| 1441 |
ariadna |
17 |
| user | course | role |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
| student1 | C2 | student |
|
|
|
20 |
| teacher1 | C1 | editingteacher |
|
|
|
21 |
| teacher1 | C2 | editingteacher |
|
| 1 |
efrain |
22 |
|
| 1441 |
ariadna |
23 |
Scenario: A teacher can view a page resource automatic completion items
|
| 1 |
efrain |
24 |
Given the following "activity" exists:
|
|
|
25 |
| activity | page |
|
|
|
26 |
| course | C1 |
|
|
|
27 |
| idnumber | page1 |
|
|
|
28 |
| name | Music history |
|
|
|
29 |
| intro | A lesson learned in life |
|
|
|
30 |
| completion | 2 |
|
|
|
31 |
| completionview | 1 |
|
|
|
32 |
When I am on the "Music history" "page activity" page logged in as teacher1
|
|
|
33 |
Then "Music history" should have the "View" completion condition
|
|
|
34 |
|
| 1441 |
ariadna |
35 |
Scenario: A student can complete a page resource by viewing it
|
| 1 |
efrain |
36 |
Given the following "activity" exists:
|
|
|
37 |
| activity | page |
|
|
|
38 |
| course | C1 |
|
|
|
39 |
| idnumber | page1 |
|
|
|
40 |
| name | Music history |
|
|
|
41 |
| intro | A lesson learned in life |
|
|
|
42 |
| completion | 2 |
|
|
|
43 |
| completionview | 1 |
|
|
|
44 |
When I am on the "Music history" "page activity" page logged in as student1
|
|
|
45 |
Then the "View" completion condition of "Music history" is displayed as "done"
|
|
|
46 |
|
|
|
47 |
@javascript
|
| 1441 |
ariadna |
48 |
Scenario: A teacher cannot manually mark the page activity as done
|
| 1 |
efrain |
49 |
Given the following "activity" exists:
|
|
|
50 |
| activity | page |
|
|
|
51 |
| course | C1 |
|
|
|
52 |
| idnumber | page1 |
|
|
|
53 |
| name | Music history |
|
|
|
54 |
| intro | A lesson learned in life |
|
|
|
55 |
| completion | 1 |
|
|
|
56 |
# Teacher view.
|
|
|
57 |
When I am on the "Music history" "page activity" page logged in as teacher1
|
|
|
58 |
Then the manual completion button for "Music history" should be disabled
|
|
|
59 |
|
|
|
60 |
@javascript
|
| 1441 |
ariadna |
61 |
Scenario: A student can manually mark the page activity as done
|
| 1 |
efrain |
62 |
Given the following "activity" exists:
|
|
|
63 |
| activity | page |
|
|
|
64 |
| course | C1 |
|
|
|
65 |
| idnumber | page1 |
|
|
|
66 |
| name | Music history |
|
|
|
67 |
| intro | A lesson learned in life |
|
|
|
68 |
| completion | 1 |
|
|
|
69 |
# Teacher view.
|
|
|
70 |
When I am on the "Music history" "page activity" page logged in as student1
|
|
|
71 |
And I toggle the manual completion state of "Music history"
|
|
|
72 |
And the manual completion button of "Music history" is displayed as "Done"
|
|
|
73 |
|
| 1441 |
ariadna |
74 |
Scenario Outline: Page module manual completion button hidden if Show activity completion is set to No
|
| 1 |
efrain |
75 |
Given the following "activity" exists:
|
|
|
76 |
| activity | page |
|
|
|
77 |
| course | C2 |
|
|
|
78 |
| idnumber | page1 |
|
|
|
79 |
| name | Music history |
|
|
|
80 |
| intro | A lesson learned in life |
|
|
|
81 |
| completion | 1 |
|
| 1441 |
ariadna |
82 |
When I am on the "Course 2" course page logged in as <user>
|
|
|
83 |
# Course 2 has 'Show activity completion conditions' set to No, so the manual completion button should not be displayed.
|
| 1 |
efrain |
84 |
Then the manual completion button for "Music history" should not exist
|
|
|
85 |
|
| 1441 |
ariadna |
86 |
Examples:
|
|
|
87 |
| user |
|
|
|
88 |
| teacher1 |
|
|
|
89 |
| student1 |
|