[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_user 2 Feature: Access to full profiles of users 3 In order to allow visibility of full profiles 4 As an admin 5 I need to set global permission or disable forceloginforprofiles 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | student1 | Student | 1 | student1@example.com | 11 | student2 | Student | 2 | student2@example.com | 12 | student3 | Student | 3 | student2@example.com | 13 | teacher1 | Teacher | 1 | teacher1@example.com | 14 And the following "courses" exist: 15 | fullname | shortname | format | 16 | Course 1 | C1 | topics | 17 | Course 2 | C2 | topics | 18 And the following "course enrolments" exist: 19 | user | course | role | 20 | student1 | C1 | student | 21 | student2 | C1 | student | 22 | teacher1 | C1 | editingteacher | 23 | student3 | C2 | student | 24 25 Scenario: Viewing full profiles with default settings 26 When I log in as "student1" 27 And I follow "Course 1" 28 # Another student's full profile is not visible 29 And I navigate to "Participants" node in "Current course > C1" 30 And I follow "Student 2" 31 Then I should not see "Full profile" 32 # Teacher's full profile is visible 33 And I navigate to "Participants" node in "Current course > C1" 34 And I follow "Teacher 1" 35 And I follow "Full profile" 36 And I should see "First access to site" 37 # Own full profile is visible 38 And I follow "Course 1" 39 And I navigate to "Participants" node in "Current course > C1" 40 And I click on "Student 1" "link" in the "#participants" "css_element" 41 And I follow "Full profile" 42 And I should see "First access to site" 43 44 @javascript 45 Scenario: Viewing full profiles with forceloginforprofiles off 46 Given the following config values are set as admin: 47 | forceloginforprofiles | 0 | 48 When I log in as "student1" 49 And I follow "Course 1" 50 And I navigate to "Participants" node in "Current course > C1" 51 And I follow "Student 2" 52 And I follow "Full profile" 53 Then I should see "First access to site" 54 55 Scenario: Viewing full profiles with global permission 56 Given I log in as "admin" 57 And I set the following system permissions of "Authenticated user" role: 58 | moodle/user:viewdetails | Allow | 59 And I log out 60 When I log in as "student1" 61 And I follow "Course 1" 62 And I navigate to "Participants" node in "Current course > C1" 63 And I follow "Student 2" 64 And I follow "Full profile" 65 Then I should see "First access to site" 66 67 @javascript 68 Scenario: Viewing own full profile 69 Given I log in as "student1" 70 When I follow "Profile" in the user menu 71 Then I should see "First access to site" 72 73 @javascript 74 Scenario: Viewing full profiles of someone with the course contact role 75 Given I log in as "admin" 76 And I navigate to "Courses" node in "Site administration > Appearance" 77 And I set the following fields to these values: 78 | Course creator | 1 | 79 And I press "Save changes" 80 And I navigate to "Assign system roles" node in "Site administration > Users > Permissions" 81 And I follow "Course creator" 82 And I click on "//div[@class='userselector']/descendant::option[contains(., 'Student 3')]" "xpath_element" 83 And I press "Add" 84 And I log out 85 When I log in as "student1" 86 And I follow "Messages" in the user menu 87 And I set the following fields to these values: 88 | Search people and messages | Student 3 | 89 And I press "Search people and messages" 90 And I follow "Picture of Student 3" 91 Then I should see "First access to site" 92 93 @javascript 94 Scenario: View full profiles of someone in the same group in a course with separate groups. 95 Given I log in as "admin" 96 And I am on site homepage 97 And I follow "Course 1" 98 And I follow "Edit settings" 99 And I set the following fields to these values: 100 | Group mode | Separate groups | 101 | Force group mode | Yes | 102 And I press "Save and display" 103 And I log out 104 When I log in as "student1" 105 And I follow "Messages" in the user menu 106 And I set the following fields to these values: 107 | Search people and messages | Student 2 | 108 And I press "Search people and messages" 109 And I follow "Picture of Student 2" 110 And I should not see "First access to site" 111 And I should see "The details of this user are not available to you" 112 And I log out 113 And I log in as "admin" 114 And I am on site homepage 115 And I follow "Course 1" 116 And I expand "Users" node 117 And I follow "Groups" 118 And I press "Create group" 119 And I set the following fields to these values: 120 | Group name | Group 1 | 121 And I press "Save changes" 122 And I add "Student 1 (student1@example.com)" user to "Group 1" group members 123 And I add "Student 2 (student2@example.com)" user to "Group 1" group members 124 And I log out 125 And I log in as "student1" 126 And I follow "Messages" in the user menu 127 And I set the following fields to these values: 128 | Search people and messages | Student 2 | 129 And I press "Search people and messages" 130 And I follow "Picture of Student 2" 131 Then I should see "First access to site"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |