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 can be configured to display section name in addition to section number
3
 
4
  Background:
5
    Given the following "course" exists:
6
      | fullname      | Course 1 |
7
      | shortname     | C1       |
8
      | category      | 0        |
9
      | numsections   | 10       |
10
      | coursedisplay | 1        |
11
      | initsections  | 1        |
12
    And the following "activities" exist:
13
      | activity | name              | course | idnumber | section |
14
      | assign   | First assignment  | C1     | assign1  | 7       |
15
    And the following "users" exist:
16
      | username | firstname | lastname | email |
17
      | teacher1 | Teacher   | 1        | teacher1@example.com |
18
      | student1 | Student   | 1        | student1@example.com |
19
    And the following "course enrolments" exist:
20
      | user     | course | role           |
21
      | teacher1 | C1     | editingteacher |
22
      | student1 | C1     | student        |
23
    And the following config values are set as admin:
24
      | showsectionname | 1 | block_section_links |
25
      | unaddableblocks | | theme_boost|
26
    And the following "blocks" exist:
27
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
28
      | section_links | Course       | C1        | course-view-*   | side-pre      |
29
 
30
  Scenario: Student can see section name under the Section links block
31
    When I am on the "Course 1" course page logged in as student1
1441 ariadna 32
    Then I should see "Section 7" in the "Section links" "block"
33
    And I should not see "7: Section 7" in the "Section links" "block"
34
    And I follow "Section 7"
1 efrain 35
    And I should see "First assignment"
36
 
37
  Scenario: Teacher can configure existing Section links block to display section number or section name
38
    Given I log in as "teacher1"
39
    And I am on "Course 1" course homepage with editing mode on
40
    When I configure the "Section links" block
41
    And I set the following fields to these values:
42
      | Display section name | No |
43
    And I click on "Save changes" "button"
44
    Then I should not see "7: Section 7" in the "Section links" "block"
1441 ariadna 45
    And I should not see "Section 7" in the "Section links" "block"
1 efrain 46
    And I should see "7" in the "Section links" "block"
47
    And I follow "7"
48
    And I should see "First assignment"
1441 ariadna 49
 
50
  Scenario: Subsections names are not displayed in the Section links block
51
    Given the following "activity" exists:
52
      | activity | subsection  |
53
      | name     | Subsection1 |
54
      | course   | C1          |
55
      | idnumber | subsection1 |
56
      | section  | 1           |
57
    When I am on the "Course 1" course page logged in as student1
58
    Then I should not see "Subsection1" in the "Section links" "block"