Merge branch 'wip-MDL-51062-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE
This commit is contained in:
@@ -15,7 +15,6 @@ Feature: Edit capabilities
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
|
||||
@javascript
|
||||
Scenario: Default system capabilities modification
|
||||
Given I log in as "admin"
|
||||
And I set the following system permissions of "Teacher" role:
|
||||
@@ -30,7 +29,6 @@ Feature: Edit capabilities
|
||||
And "moodle/grade:managesharedforms" capability has "Prevent" permission
|
||||
And "moodle/course:request" capability has "Prohibit" permission
|
||||
|
||||
@javascript
|
||||
Scenario: Course capabilities overrides
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
@@ -41,11 +39,11 @@ Feature: Edit capabilities
|
||||
| mod/forum:editanypost | Prevent |
|
||||
| mod/forum:addquestion | Allow |
|
||||
When I set the field "Advanced role override" to "Student (3)"
|
||||
And I press "Go"
|
||||
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
|
||||
And "mod/forum:editanypost" capability has "Prevent" permission
|
||||
And "mod/forum:addquestion" capability has "Allow" permission
|
||||
|
||||
@javascript
|
||||
Scenario: Module capabilities overrides
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
@@ -60,6 +58,7 @@ Feature: Edit capabilities
|
||||
| mod/forum:editanypost | Prevent |
|
||||
| mod/forum:addquestion | Allow |
|
||||
When I set the field "Advanced role override" to "Student (3)"
|
||||
And I press "Go"
|
||||
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
|
||||
And "mod/forum:editanypost" capability has "Prevent" permission
|
||||
And "mod/forum:addquestion" capability has "Allow" permission
|
||||
|
||||
@@ -24,7 +24,6 @@ Feature: Allowed blocks controls
|
||||
Then I should see "Activities" in the "Activities" "block"
|
||||
And I should see "Course completion status" in the "Course completion status" "block"
|
||||
|
||||
@javascript
|
||||
Scenario: Blocks can not be added when the admin restricts the permissions
|
||||
Given I log in as "admin"
|
||||
And I set the following system permissions of "Teacher" role:
|
||||
|
||||
@@ -42,7 +42,6 @@ Feature: Browse course list and return back from enrolment page
|
||||
And I press "Continue"
|
||||
Then I should see "Edit profile" in the ".breadcrumb-nav" "css_element"
|
||||
|
||||
@javascript
|
||||
Scenario: User can return to the choice activity from enrolment page
|
||||
Given the following "roles" exist:
|
||||
| name | shortname | description | archetype |
|
||||
|
||||
@@ -29,7 +29,6 @@ Feature: Restrict activities availability
|
||||
Then I should see "Test glossary name"
|
||||
And I should see "Test chat name"
|
||||
|
||||
@javascript
|
||||
Scenario: Activities can not be added when the admin restricts the permissions
|
||||
Given I log in as "admin"
|
||||
And I set the following system permissions of "Teacher" role:
|
||||
|
||||
@@ -57,7 +57,6 @@ Feature: Organize students into groups
|
||||
And I should see "Student 3"
|
||||
And I should not see "Student 0"
|
||||
|
||||
@javascript
|
||||
Scenario: Create groups and groupings without the 'moodle/course:changeidnumber' capability
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category | groupmode |
|
||||
|
||||
@@ -74,12 +74,15 @@ class behat_permissions extends behat_base {
|
||||
// We don't know the number of overrides so we have to get it to match the option contents.
|
||||
$roleoption = $this->find('xpath', '//select[@name="roleid"]/option[contains(.,"' . $this->escape($rolename) . '")]');
|
||||
|
||||
return array(
|
||||
$result = array(
|
||||
new Given('I set the field "' . get_string('advancedoverride', 'role') .
|
||||
'" to "' . $this->escape($roleoption->getText()) . '"'),
|
||||
new Given('I fill the capabilities form with the following permissions:', $table),
|
||||
new Given('I press "' . get_string('savechanges') . '"')
|
||||
);
|
||||
'" to "' . $this->escape($roleoption->getText()) . '"'));
|
||||
if (!$this->running_javascript()) {
|
||||
$result[] = new Given('I press "' . get_string('go') . '"');
|
||||
}
|
||||
$result[] = new Given('I fill the capabilities form with the following permissions:', $table);
|
||||
$result[] = new Given('I press "' . get_string('savechanges') . '"');
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,7 +135,8 @@ class behat_permissions extends behat_base {
|
||||
|
||||
// Here we wait for the element to appear and exception if it does not exist.
|
||||
$radio = $this->find('xpath', '//input[@name="' . $capability . '" and @value="' . $permissionvalue . '"]');
|
||||
$radio->click();
|
||||
$field = behat_field_manager::get_field_instance('radio', $radio, $this->getSession());
|
||||
$field->set_value(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
And the "Group" select box should contain "Group B"
|
||||
And I should see "Post a copy to all groups"
|
||||
|
||||
@javascript
|
||||
Scenario: Teacher in all groups but without accessallgroups can only post in their groups
|
||||
And I log in as "admin"
|
||||
And I set the following system permissions of "Non-editing teacher" role:
|
||||
@@ -71,7 +70,6 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
And the "Group" select box should contain "Group B"
|
||||
And I should see "Post a copy to all groups"
|
||||
|
||||
@javascript
|
||||
Scenario: Teacher in some groups and without accessallgroups can only post in their groups
|
||||
And I log in as "admin"
|
||||
And I set the following system permissions of "Non-editing teacher" role:
|
||||
|
||||
@@ -66,7 +66,6 @@ Feature: Posting to groups in a separate group discussion when restricted to gro
|
||||
And the "Group" select box should contain "G2G1"
|
||||
And I should see "Post a copy to all groups"
|
||||
|
||||
@javascript
|
||||
Scenario: Teacher in all groups but without accessallgroups can post in either group but not to All Participants
|
||||
And I log in as "admin"
|
||||
And I set the following system permissions of "Non-editing teacher" role:
|
||||
|
||||
@@ -25,7 +25,6 @@ Feature: Restrict which blocks can be added to Dashboard
|
||||
And the "Add a block" select box should contain "HTML"
|
||||
And the "Add a block" select box should contain "Tags"
|
||||
|
||||
@javascript
|
||||
Scenario: Remove the ability to add the comments block to Dashboard
|
||||
When I log in as "admin"
|
||||
And I set the following system permissions of "Authenticated user" role:
|
||||
|
||||
@@ -49,7 +49,6 @@ Feature: Access to full profiles of users
|
||||
And I follow "Full profile"
|
||||
Then I should see "First access to site"
|
||||
|
||||
@javascript
|
||||
Scenario: Viewing full profiles with global permission
|
||||
Given I log in as "admin"
|
||||
And I set the following system permissions of "Authenticated user" role:
|
||||
|
||||
Reference in New Issue
Block a user