1 |
efrain |
1 |
@core @core_contentbank
|
|
|
2 |
Feature: Access permission to content Bank
|
|
|
3 |
In order to control access to content bank
|
|
|
4 |
As an admin
|
|
|
5 |
I need to be able to configure users' permissions
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | user1@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: Admins access content bank
|
|
|
19 |
Given I log in as "admin"
|
|
|
20 |
And I am on "Course 1" course homepage
|
|
|
21 |
Then "Content bank" "link" should exist
|
|
|
22 |
|
|
|
23 |
Scenario: Editing teachers can access content bank at course level
|
|
|
24 |
Given I log in as "teacher1"
|
|
|
25 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
26 |
Then "Content bank" "link" should exist
|
|
|
27 |
|
|
|
28 |
Scenario: Editing teachers can't access content bank at system level
|
|
|
29 |
Given I log in as "teacher1"
|
|
|
30 |
Then "Content bank" "link" should not exist
|