Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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                             |
1441 ariadna 20
    And the following config values are set as admin:
21
      | showsectionname | 0 | block_section_links |
22
      | unaddableblocks |   | theme_boost         |
1 efrain 23
    And I log in as "teacher1"
24
    And I am on "Course 1" course homepage with editing mode on
25
 
26
  Scenario: Add the section links block to a course.
1441 ariadna 27
    Given I add the "Section links" block
1 efrain 28
    And I turn editing mode off
29
    And I should see "5" in the "Section links" "block"
30
    When I follow "5"
31
    Then I should see "Test assignment 1"
32
 
33
  Scenario: Add the section links block to a course and limit the sections displayed.
1441 ariadna 34
    Given I add the "Section links" block
1 efrain 35
    And I configure the "Section links" block
36
    And I set the following fields to these values:
37
      | config_numsections1 | 5 |
38
      | config_incby1 | 5 |
39
      | config_numsections2 | 40 |
40
      | config_incby2 | 10 |
41
    And I press "Save changes"
42
    And I turn editing mode off
43
    And I should see "5" in the "Section links" "block"
44
    When I follow "5"
45
    Then I should see "Test assignment 1"
46
 
47
  Scenario: Add the section links block to a course and limit the sections displayed using the alternative number of sections.
1441 ariadna 48
    Given I add the "Section links" block
1 efrain 49
    And I configure the "Section links" block
50
    And I set the following fields to these values:
51
      | config_numsections1 | 5 |
52
      | config_incby1 | 1 |
53
      | config_numsections2 | 10 |
54
      | config_incby2 | 5 |
55
    And I press "Save changes"
56
    And I turn editing mode off
57
    And I should see "5" in the "Section links" "block"
58
    When I follow "5"
59
    Then I should see "Test assignment 1"
1441 ariadna 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"