1 |
efrain |
1 |
@block @block_section_links
|
|
|
2 |
Feature: The section links block allows users to quickly navigate around a moodle course
|
|
|
3 |
In order to navigate a moodle course
|
|
|
4 |
As a teacher
|
|
|
5 |
I can use the section links block
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | numsections | coursedisplay |
|
|
|
10 |
| Course 1 | C1 | 0 | 20 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | intro | course | section | idnumber | assignsubmission_file_enabled |
|
|
|
19 |
| assign | Test assignment 1 | Offline text | C1 | 5 | assign1 | 0 |
|
|
|
20 |
And I log in as "teacher1"
|
|
|
21 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
22 |
|
|
|
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 |
And I add the "Section links" block
|
|
|
27 |
And I turn editing mode off
|
|
|
28 |
And I should see "5" in the "Section links" "block"
|
|
|
29 |
When I follow "5"
|
|
|
30 |
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:
|
|
|
34 |
| unaddableblocks | | theme_boost|
|
|
|
35 |
And I add the "Section links" block
|
|
|
36 |
And I configure the "Section links" block
|
|
|
37 |
And I set the following fields to these values:
|
|
|
38 |
| config_numsections1 | 5 |
|
|
|
39 |
| config_incby1 | 5 |
|
|
|
40 |
| config_numsections2 | 40 |
|
|
|
41 |
| config_incby2 | 10 |
|
|
|
42 |
And I press "Save changes"
|
|
|
43 |
And I turn editing mode off
|
|
|
44 |
And I should see "5" in the "Section links" "block"
|
|
|
45 |
When I follow "5"
|
|
|
46 |
Then I should see "Test assignment 1"
|
|
|
47 |
|
|
|
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|
|
|
|
51 |
And I add the "Section links" block
|
|
|
52 |
And I configure the "Section links" block
|
|
|
53 |
And I set the following fields to these values:
|
|
|
54 |
| config_numsections1 | 5 |
|
|
|
55 |
| config_incby1 | 1 |
|
|
|
56 |
| config_numsections2 | 10 |
|
|
|
57 |
| config_incby2 | 5 |
|
|
|
58 |
And I press "Save changes"
|
|
|
59 |
And I turn editing mode off
|
|
|
60 |
And I should see "5" in the "Section links" "block"
|
|
|
61 |
When I follow "5"
|
|
|
62 |
Then I should see "Test assignment 1"
|