Línea 15... |
Línea 15... |
15 |
| user | course | role |
|
15 |
| user | course | role |
|
16 |
| teacher1 | C1 | editingteacher |
|
16 |
| teacher1 | C1 | editingteacher |
|
17 |
And the following "activities" exist:
|
17 |
And the following "activities" exist:
|
18 |
| activity | name | intro | course | section | idnumber | assignsubmission_file_enabled |
|
18 |
| activity | name | intro | course | section | idnumber | assignsubmission_file_enabled |
|
19 |
| assign | Test assignment 1 | Offline text | C1 | 5 | assign1 | 0 |
|
19 |
| assign | Test assignment 1 | Offline text | C1 | 5 | assign1 | 0 |
|
- |
|
20 |
And the following config values are set as admin:
|
- |
|
21 |
| showsectionname | 0 | block_section_links |
|
- |
|
22 |
| unaddableblocks | | theme_boost |
|
20 |
And I log in as "teacher1"
|
23 |
And I log in as "teacher1"
|
21 |
And I am on "Course 1" course homepage with editing mode on
|
24 |
And I am on "Course 1" course homepage with editing mode on
|
Línea 22... |
Línea 25... |
22 |
|
25 |
|
23 |
Scenario: Add the section links block to a course.
|
- |
|
24 |
Given the following config values are set as admin:
|
- |
|
25 |
| unaddableblocks | | theme_boost|
|
26 |
Scenario: Add the section links block to a course.
|
26 |
And I add the "Section links" block
|
27 |
Given I add the "Section links" block
|
27 |
And I turn editing mode off
|
28 |
And I turn editing mode off
|
28 |
And I should see "5" in the "Section links" "block"
|
29 |
And I should see "5" in the "Section links" "block"
|
29 |
When I follow "5"
|
30 |
When I follow "5"
|
Línea 30... |
Línea 31... |
30 |
Then I should see "Test assignment 1"
|
31 |
Then I should see "Test assignment 1"
|
31 |
|
- |
|
32 |
Scenario: Add the section links block to a course and limit the sections displayed.
|
- |
|
33 |
Given the following config values are set as admin:
|
32 |
|
34 |
| unaddableblocks | | theme_boost|
|
33 |
Scenario: Add the section links block to a course and limit the sections displayed.
|
35 |
And I add the "Section links" block
|
34 |
Given I add the "Section links" block
|
36 |
And I configure the "Section links" block
|
35 |
And I configure the "Section links" block
|
37 |
And I set the following fields to these values:
|
36 |
And I set the following fields to these values:
|
38 |
| config_numsections1 | 5 |
|
37 |
| config_numsections1 | 5 |
|
Línea 44... |
Línea 43... |
44 |
And I should see "5" in the "Section links" "block"
|
43 |
And I should see "5" in the "Section links" "block"
|
45 |
When I follow "5"
|
44 |
When I follow "5"
|
46 |
Then I should see "Test assignment 1"
|
45 |
Then I should see "Test assignment 1"
|
Línea 47... |
Línea 46... |
47 |
|
46 |
|
48 |
Scenario: Add the section links block to a course and limit the sections displayed using the alternative number of sections.
|
- |
|
49 |
Given the following config values are set as admin:
|
- |
|
50 |
| unaddableblocks | | theme_boost|
|
47 |
Scenario: Add the section links block to a course and limit the sections displayed using the alternative number of sections.
|
51 |
And I add the "Section links" block
|
48 |
Given I add the "Section links" block
|
52 |
And I configure the "Section links" block
|
49 |
And I configure the "Section links" block
|
53 |
And I set the following fields to these values:
|
50 |
And I set the following fields to these values:
|
54 |
| config_numsections1 | 5 |
|
51 |
| config_numsections1 | 5 |
|
55 |
| config_incby1 | 1 |
|
52 |
| config_incby1 | 1 |
|
Línea 58... |
Línea 55... |
58 |
And I press "Save changes"
|
55 |
And I press "Save changes"
|
59 |
And I turn editing mode off
|
56 |
And I turn editing mode off
|
60 |
And I should see "5" in the "Section links" "block"
|
57 |
And I should see "5" in the "Section links" "block"
|
61 |
When I follow "5"
|
58 |
When I follow "5"
|
62 |
Then I should see "Test assignment 1"
|
59 |
Then I should see "Test assignment 1"
|
- |
|
60 |
|
- |
|
61 |
Scenario: Subsections numbers are not displayed in the Section links block
|
- |
|
62 |
Given the following "activity" exists:
|
- |
|
63 |
| activity | subsection |
|
- |
|
64 |
| name | Subsection1 |
|
- |
|
65 |
| course | C1 |
|
- |
|
66 |
| idnumber | subsection1 |
|
- |
|
67 |
| section | 1 |
|
- |
|
68 |
And the following "blocks" exist:
|
- |
|
69 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
- |
|
70 |
| section_links | Course | C1 | course-view-* | side-pre |
|
- |
|
71 |
When I am on "Course 1" course homepage
|
- |
|
72 |
Then "21" "link" should not exist in the "Section links" "block"
|