Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_user
2
Feature: Set email display preference
3
  In order to control who can see my email address on my profile page
4
  As a student
5
  I need my email to be shown to only the user groups chosen
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username  | firstname | lastname    | email                 | maildisplay |
10
      | teacher1  | Teacher   | 1           | teacher1@example.com  | 2           |
11
      | studentp  | Student   | PEER        | studentP@example.com  | 2           |
12
      | studentn  | Student   | NONE        | studentN@example.com  | 0           |
13
      | studente  | Student   | EVERYONE    | studentE@example.com  | 1           |
14
      | studentm  | Student   | MEMBERS     | studentM@example.com  | 2           |
15
    And the following "courses" exist:
16
      | fullname  | shortname | format |
17
      | Course 1  | C1        | topics |
18
    And the following "course enrolments" exist:
19
      | user      | course | role           | status | timeend |
20
      | teacher1  | C1     | teacher        |    0   |    0    |
21
      | studentp  | C1     | student        |    0   |    0    |
22
      | studentn  | C1     | student        |    0   |    0    |
23
      | studente  | C1     | student        |    0   |    0    |
24
      | studentm  | C1     | student        |    0   |    0    |
25
 
26
  @javascript
27
  Scenario: Student viewing own profile
28
    Given I log in as "studentp"
29
    When I follow "Profile" in the user menu
30
    Then I should see "studentP@example.com"
31
    And I should see "(Visible to other course participants)"
32
 
33
  @javascript
34
  Scenario: Student peer on the same course viewing profiles
35
    Given I log in as "studentp"
36
    And I am on "Course 1" course homepage
37
    And I navigate to course participants
38
    When I follow "Student NONE"
39
    Then I should not see "studentN@example.com"
40
    And I navigate to course participants
41
    When I follow "Student EVERYONE"
42
    Then I should see "studentE@example.com"
43
    And I navigate to course participants
44
    When I follow "Student MEMBERS"
45
    Then I should see "studentM@example.com"
46
 
47
  @javascript
48
  Scenario: Student viewing teacher email (whose maildisplay = MEMBERS)
49
    Given I log in as "studentp"
50
    And I am on "Course 1" course homepage
51
    And I navigate to course participants
52
    When I follow "Teacher 1"
53
    Then I should see "teacher1@example.com"
54
 
55
  @javascript
56
  Scenario: Teacher viewing student email, whilst site:showuseridentity = “email”
57
    Given the following config values are set as admin:
58
      | showuseridentity      | email |
59
    Given I log in as "teacher1"
60
    And I am on "Course 1" course homepage
61
    And I navigate to course participants
62
    When I follow "Student NONE"
63
    Then I should see "studentN@example.com"
64
    And I navigate to course participants
65
    When I follow "Student MEMBERS"
66
    Then I should see "studentM@example.com"
67
 
68
  @javascript
69
  Scenario: Teacher viewing student email, whilst site:showuseridentity = “”
70
    Given I log in as "teacher1"
71
    And the following config values are set as admin:
72
      | showuseridentity      | |
73
    And I am on "Course 1" course homepage
74
    And I navigate to course participants
75
    When I follow "Student NONE"
76
    Then I should not see "studentN@example.com"
77
    And I navigate to course participants
78
    When I follow "Student MEMBERS"
79
    Then I should see "studentM@example.com"
80
 
81
  @javascript
82
  Scenario: User can see user's email address settings on own profile
83
    Given I log in as "studentp"
84
    And I follow "Profile" in the user menu
85
    Then I should see "studentP@example.com"
86
    And I should see "(Visible to other course participants)"
87
    When I click on "Edit profile" "link" in the "region-main" "region"
88
    And I set the following fields to these values:
89
      | maildisplay | 0 |
90
    And I click on "Update profile" "button"
91
    Then I should see "(Hidden from everyone except users with appropriate permissions)"
92
    When I click on "Edit profile" "link" in the "region-main" "region"
93
    And I set the following fields to these values:
94
      | maildisplay | 1 |
95
    And I click on "Update profile" "button"
96
    Then I should see "(Visible to everyone)"