__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@block @core_block @javascript @addablocklink
Feature: Add a block when main feature is enabled
In order to add a block to my course
As a teacher
Some blocks should be only added to courses if the main feature they are based on is enabled.
Background:
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And I am on the "C1" "course" page logged in as "admin"
Scenario Outline: The block can be added when main feature is enabled
Given the following config values are set as admin:
| <settingname1> | 1 | <settingplugin1> |
| <settingname2> | 1 | |
And I turn editing mode on
When I click on "Add a block" "link"
Then I should see "<blockname>"
Examples:
| blockname | settingname1 | settingname2 | settingplugin1 |
| Accessibility review | enableaccessibilitytools | | |
| Blog menu | enableblogs | | |
| Recent blog entries | enableblogs | | |
| Blog tags | enableblogs | usetags | |
| Comments | usecomments | | |
| Course completion status | enablecompletion | | |
| Global search | enableglobalsearch | | |
| Latest badges | enablebadges | | |
| Tags | usetags | | |
| Learning plans | enabled | | core_competency |
Scenario Outline: The block cannot be added when main feature is disabled
Given the following config values are set as admin:
| <settingname1> | 0 | <settingplugin1> |
| <settingname2> | 0 | |
And I turn editing mode on
When I click on "Add a block" "link"
Then I should not see "<blockname>"
Examples:
| blockname | settingname1 | settingname2 | settingplugin1 |
| Accessibility review | enableaccessibilitytools | | |
| Blog menu | enableblogs | | |
| Recent blog entries | enableblogs | | |
| Blog tags | enableblogs | usetags | |
| Comments | usecomments | | |
| Course completion status | enablecompletion | | |
| Global search | enableglobalsearch | | |
| Latest badges | enablebadges | | |
| Tags | usetags | | |
| Learning plans | enabled | | core_competency |
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| add_blocks.feature | File | 931 B | 0777 |
|
| add_blocks_overridden.feature | File | 3.76 KB | 0777 |
|
| add_blocks_overridden_disabled.feature | File | 5.48 KB | 0777 |
|
| behat_blocks.php | File | 8.24 KB | 0777 |
|
| configure_block_throughout_site.feature | File | 3.03 KB | 0777 |
|
| delete_block.feature | File | 1.42 KB | 0777 |
|
| hidden_block_region.feature | File | 2.39 KB | 0777 |
|
| hide_blocks.feature | File | 1.27 KB | 0777 |
|
| manage_blocks.feature | File | 2.4 KB | 0777 |
|
| move_blocks.feature | File | 1.69 KB | 0777 |
|
| restrict_available_blocks.feature | File | 1.64 KB | 0777 |
|
| return_block_original_state.feature | File | 1.98 KB | 0777 |
|