[ Index ] |
PHP Cross Reference of moodle-2.8 |
[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 | [email protected] | 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 @javascript 33 Scenario: Activities can not be added when the admin restricts the permissions 34 Given I log in as "admin" 35 And I set the following system permissions of "Teacher" role: 36 | mod/chat:addinstance | Prohibit | 37 And I am on homepage 38 And I follow "Course 1" 39 And I expand "Users" node 40 And I follow "Permissions" 41 And I override the system permissions of "Teacher" role with: 42 | mod/glossary:addinstance | Prohibit | 43 And I log out 44 And I log in as "teacher1" 45 And I follow "Course 1" 46 When I turn editing mode on 47 And I follow "Activity chooser off" 48 Then the "Add an activity to section 'Topic 1'" select box should not contain "Chat" 49 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: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |