| 1441 |
ariadna |
1 |
@mod @mod_subsection
|
|
|
2 |
Feature: Subsection does not have completion.
|
|
|
3 |
In order to use subsections as normal sections
|
|
|
4 |
As an teacher
|
|
|
5 |
I need to use subsection activity without completion
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category | numsections | initsections | enablecompletion |
|
|
|
13 |
| Course 1 | C1 | 0 | 1 | 1 | 1 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | course | idnumber | section |
|
|
|
19 |
| wiki | Wiki activity | C1 | subsection1 | 1 |
|
|
|
20 |
| subsection | Subsection 1 | C1 | subsection1 | 1 |
|
|
|
21 |
| page | Page in Subsection | C1 | page1 | 2 |
|
|
|
22 |
|
|
|
23 |
Scenario: Subsection does not appear in the site default completion form
|
|
|
24 |
Given I log in as "admin"
|
|
|
25 |
When I navigate to "Courses > Default settings > Default activity completion" in site administration
|
|
|
26 |
And I should see "Default activity completion"
|
|
|
27 |
Then I should see "Forum" in the "region-main" "region"
|
|
|
28 |
And I should not see "Subsection" in the "region-main" "region"
|
|
|
29 |
|
|
|
30 |
@javascript
|
|
|
31 |
Scenario: Subsection does not appear in the course default completion form
|
|
|
32 |
Given I am on the "C1" "Course" page logged in as "teacher1"
|
|
|
33 |
When I navigate to "Course completion" in current page administration
|
|
|
34 |
And I set the field "Course completion tertiary navigation" to "Default activity completion"
|
|
|
35 |
And I should see "Default activity completion"
|
|
|
36 |
Then I should see "Forum" in the "region-main" "region"
|
|
|
37 |
And I should not see "Subsection" in the "region-main" "region"
|
|
|
38 |
|
|
|
39 |
@javascript
|
|
|
40 |
Scenario: Subsection completion should not be editable in the completion bulk edit
|
|
|
41 |
Given I am on the "C1" "Course" page logged in as "teacher1"
|
|
|
42 |
When I navigate to "Course completion" in current page administration
|
|
|
43 |
And I set the field "Course completion tertiary navigation" to "Bulk edit activity completion"
|
|
|
44 |
And I should see "Bulk edit activity completion"
|
|
|
45 |
Then I should see "Wiki activity" in the "region-main" "region"
|
|
|
46 |
Then I should see "Page in Subsection" in the "region-main" "region"
|
|
|
47 |
# It appears as a subsection but not as an editable element.
|
|
|
48 |
Then I should see "Subsection 1" in the "region-main" "region"
|
|
|
49 |
And "Subsection 1" "link" in the "region-main" "region" should not be visible
|