[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_block 2 Feature: Allowed blocks controls 3 In order to prevent the use of some blocks 4 As an admin 5 I need to restrict some blocks to be used in courses 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | teacher1@example.com | 11 And the following "courses" exist: 12 | fullname | shortname | category | 13 | Course 1 | C1 | 0 | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | teacher1 | C1 | editingteacher | 17 18 Scenario: Blocks can be added with the default permissions 19 Given I log in as "teacher1" 20 And I follow "Course 1" 21 And I turn editing mode on 22 When I add the "Course completion status" block 23 And I add the "Activities" block 24 Then I should see "Activities" in the "Activities" "block" 25 And I should see "Course completion status" in the "Course completion status" "block" 26 27 Scenario: Blocks can not be added when the admin restricts the permissions 28 Given I log in as "admin" 29 And I set the following system permissions of "Teacher" role: 30 | block/activity_modules:addinstance | Prohibit | 31 And I am on site homepage 32 And I follow "Course 1" 33 And I expand "Users" node 34 And I follow "Permissions" 35 And I override the system permissions of "Teacher" role with: 36 | block/completionstatus:addinstance | Prohibit | 37 And I log out 38 When I log in as "teacher1" 39 And I follow "Course 1" 40 And I turn editing mode on 41 Then the "Add a block" select box should not contain "Activities" 42 And the "Add a block" select box should not contain "Course completion status"
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 |