| [ Index ] |
PHP Cross Reference of moodle-2.8 |
[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 | [email protected] | 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 @javascript 28 Scenario: Blocks can not be added when the admin restricts the permissions 29 Given I log in as "admin" 30 And I set the following system permissions of "Teacher" role: 31 | block/activity_modules:addinstance | Prohibit | 32 And I am on homepage 33 And I follow "Course 1" 34 And I expand "Users" node 35 And I follow "Permissions" 36 And I override the system permissions of "Teacher" role with: 37 | block/completionstatus:addinstance | Prohibit | 38 And I log out 39 When I log in as "teacher1" 40 And I follow "Course 1" 41 And I turn editing mode on 42 Then the "Add a block" select box should not contain "Activities" 43 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: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |