[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_user 2 Feature: Access to preferences page 3 In order to view the preferences page 4 As a user 5 I need global permissions to view the page. 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 | manager1 | Manager | 1 | manager1@example.com | 13 | teacher1 | Teacher | 1 | teacher1@example.com | 14 | parent | Parent | 1 | parent1@example.com | 15 And the following "courses" exist: 16 | fullname | shortname | format | 17 | Course 1 | C1 | topics | 18 | Course 2 | C2 | topics | 19 And the following "course enrolments" exist: 20 | user | course | role | 21 | student1 | C1 | student | 22 | student2 | C1 | student | 23 | teacher1 | C1 | editingteacher | 24 And the following "system role assigns" exist: 25 | user | course | role | 26 | manager1 | Acceptance test site | manager | 27 28 Scenario: A student and teacher with normal permissions can not view another user's permissions page. 29 Given I log in as "student1" 30 And I follow "Course 1" 31 And I navigate to "Participants" node in "Current course > C1" 32 And I follow "Student 2" 33 And I should not see "Preferences" in the "#region-main" "css_element" 34 And I log out 35 And I log in as "teacher1" 36 And I follow "Course 1" 37 When I navigate to "Participants" node in "Current course > C1" 38 And I follow "Student 2" 39 Then I should not see "Preferences" in the "#region-main" "css_element" 40 41 Scenario: Administrators and Managers can view another user's permissions page. 42 Given I log in as "admin" 43 And I am on site homepage 44 And I follow "Course 1" 45 And I navigate to "Participants" node in "Current course > C1" 46 And I follow "Student 2" 47 And I should see "Preferences" in the "#region-main" "css_element" 48 And I log out 49 And I log in as "manager1" 50 And I am on site homepage 51 And I follow "Course 1" 52 When I navigate to "Participants" node in "Current course > C1" 53 And I follow "Student 2" 54 Then I should see "Preferences" in the "#region-main" "css_element" 55 56 Scenario: A user with the appropriate permissions can view another user's permissions page. 57 Given I log in as "admin" 58 And I am on site homepage 59 And I follow "Turn editing on" 60 And I add the "Mentees" block 61 And I navigate to "Define roles" node in "Site administration > Users > Permissions" 62 And I click on "Add a new role" "button" 63 And I click on "Continue" "button" 64 And I set the following fields to these values: 65 | Short name | Parent | 66 | Custom full name | Parent | 67 | contextlevel30 | 1 | 68 | moodle/user:editprofile | 1 | 69 | moodle/user:viewalldetails | 1 | 70 | moodle/user:viewuseractivitiesreport | 1 | 71 | moodle/user:viewdetails | 1 | 72 And I click on "Create this role" "button" 73 And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" 74 And I follow "Student 1" 75 And I click on "Preferences" "link" in the ".profile_tree" "css_element" 76 And I follow "Assign roles relative to this user" 77 And I follow "Parent" 78 And I set the field "Potential users" to "Parent 1 (parent1@example.com)" 79 And I click on "Add" "button" 80 And I log out 81 And I log in as "parent" 82 And I am on site homepage 83 When I follow "Student 1" 84 Then I should see "Preferences" in the "#region-main" "css_element"
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 |