Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_navigation
2
Feature: Displaying the link to the Participants page
3
  In order to see the course / site participants
4
  As a student / admin respectively
5
  I need a link to the Participants page be displayed (but only if I can access that page)
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Student   | One      | student1@example.com |
11
      | student2 | Student   | Two      | student2@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname |
14
      | Course1  | C1        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role    |
17
      | student1 | C1     | student |
18
    And I log in as "admin"
19
    And I am on site homepage
20
    And I turn editing mode on
21
    And the following config values are set as admin:
22
      | unaddableblocks | | theme_boost|
23
    And I add the "Navigation" block if not present
24
    And I configure the "Navigation" block
25
    And I set the following fields to these values:
26
      | Page contexts | Display throughout the entire site |
27
    And I press "Save changes"
28
    And I log out
29
 
30
  @javascript
31
  Scenario: Course participants link is displayed to enrolled students after expanding the course node
32
    When I log in as "student1"
33
    And I expand "C1" node
34
    Then "Participants" "link" should exist in the "Navigation" "block"
35
    And I click on "Participants" "link" in the "Navigation" "block"
36
    And I should see "Participants"
37
    And "Student One" "link" should exist
38
    And "Student Two" "link" should not exist
39
 
40
  @javascript
41
  Scenario: Course participants link is displayed to users depending on role permissions settings
42
    Given the following "activities" exist:
43
      | activity | course | name            |
44
      | forum    | C1     | Test forum name |
45
    And I am on the "Course1" "enrolment methods" page logged in as admin
46
    And I click on "Edit" "link" in the "Guest access" "table_row"
47
    And I set the following fields to these values:
48
      | Allow guest access | Yes |
49
    And I press "Save changes"
50
    When I am on the "Course1" course page logged in as guest
51
    Then I should not see "Participants" in the "Navigation" "block"
52
    And I am on the "Test forum name" "forum activity" page
53
    And I should not see "Participants" in the "Navigation" "block"
54
    And I log out
55
    And the following "role capability" exists:
56
      | role                           | guest |
57
      | moodle/course:viewparticipants | allow |
58
    And I am on the "Course1" course page logged in as guest
59
    And I should see "Participants" in the "Navigation" "block"
60
    And I am on the "Test forum name" "forum activity" page
61
    And I should see "Participants" in the "Navigation" "block"
62
 
63
  Scenario: Site participants link is displayed to admins
64
    When I log in as "admin"
65
    Then "Participants" "link" should exist in the "Navigation" "block"
66
    And I click on "Participants" "link" in the "Navigation" "block"
67
    And I should see "Participants"
68
    And "Student One" "link" should exist
69
    And "Student Two" "link" should exist
70
 
71
  @javascript
72
  Scenario: Site participants link is not displayed to students (MDL-55667)
73
    Given I log in as "admin"
74
    And I set the following administration settings values:
75
      | defaultfrontpageroleid | Student (student) |
76
    And I log out
77
    When I log in as "student2"
78
    And I expand "Site pages" node
79
    Then "Participants" "link" should not exist in the "Navigation" "block"