mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-14402-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
602b281dcb
@ -32,3 +32,27 @@ Feature: Add and configure blocks throughout the site
|
||||
And I follow "Course 1"
|
||||
# The first block matching the pattern should be top-left block
|
||||
And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element"
|
||||
|
||||
Scenario: Blocks on the my home page cannot have roles assigned to them
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| manager1 | Manager | 1 | manager1@asd.com |
|
||||
And I log in as "manager1"
|
||||
And I click on "My home" "link" in the "Navigation" "block"
|
||||
When I press "Customise this page"
|
||||
Then I should not see "Assign roles in Navigation block"
|
||||
|
||||
Scenario: Blocks on courses can have roles assigned to them
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | teacher | 1 | teacher@example.com |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Turn editing on"
|
||||
Then I should see "Assign roles in Search forums block"
|
||||
|
@ -1082,7 +1082,7 @@ class block_manager {
|
||||
}
|
||||
|
||||
// Assign roles icon.
|
||||
if (has_capability('moodle/role:assign', $block->context)) {
|
||||
if ($this->page->pagetype != 'my-index' && has_capability('moodle/role:assign', $block->context)) {
|
||||
//TODO: please note it is sloppy to pass urls through page parameters!!
|
||||
// it is shortened because some web servers (e.g. IIS by default) give
|
||||
// a 'security' error if you try to pass a full URL as a GET parameter in another URL.
|
||||
|
Loading…
x
Reference in New Issue
Block a user