[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_course 2 Feature: Restrict activities availability 3 In order to prevent the use of some activities 4 As an admin 5 I need to control which activities can 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 | format | 13 | Course 1 | C1 | 0 | topics | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | teacher1 | C1 | editingteacher | 17 18 @javascript 19 Scenario: Activities can be added with the default permissions 20 Given I log in as "teacher1" 21 And I follow "Course 1" 22 And I turn editing mode on 23 When I add a "Glossary" to section "1" and I fill the form with: 24 | Name | Test glossary name | 25 | Description | Test glossary description | 26 And I add a "Chat" to section "1" and I fill the form with: 27 | Name of this chat room | Test chat name | 28 | Description | Test chat description | 29 Then I should see "Test glossary name" 30 And I should see "Test chat name" 31 32 Scenario: Activities can not be added when the admin restricts the permissions 33 Given I log in as "admin" 34 And I set the following system permissions of "Teacher" role: 35 | mod/chat:addinstance | Prohibit | 36 And I am on site homepage 37 And I follow "Course 1" 38 And I expand "Users" node 39 And I follow "Permissions" 40 And I override the system permissions of "Teacher" role with: 41 | mod/glossary:addinstance | Prohibit | 42 And I log out 43 And I log in as "teacher1" 44 And I follow "Course 1" 45 When I turn editing mode on 46 Then the "Add an activity to section 'Topic 1'" select box should not contain "Chat" 47 Then the "Add an activity to section 'Topic 1'" select box should not contain "Glossary"
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 |