Merge branch 'MDL-73347-master' of https://github.com/sarjona/moodle
This commit is contained in:
@@ -7,7 +7,9 @@ Feature: Manage availability conditions
|
||||
@javascript
|
||||
Scenario: Display list of availability conditions
|
||||
# Check the report doesn't show when not enabled.
|
||||
Given I log in as "admin"
|
||||
Given the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I log in as "admin"
|
||||
And I turn editing mode on
|
||||
And I add the "Administration" block if not present
|
||||
And the following config values are set as admin:
|
||||
|
||||
@@ -6,6 +6,8 @@ Feature: Import course content bank content
|
||||
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
|
||||
@@ -11,6 +11,8 @@ Feature: Add badges to the system
|
||||
@javascript
|
||||
Scenario: Accessing the badges
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
@@ -132,6 +134,8 @@ Feature: Add badges to the system
|
||||
@javascript @_file_upload
|
||||
Scenario: Add a badge from Site badges section
|
||||
Given I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
When I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
|
||||
@@ -98,6 +98,8 @@ Feature: Award badges
|
||||
# Teacher 1 should NOT have access to manage/create site badges in the Site badges section.
|
||||
When I am on homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
|
||||
@@ -12,6 +12,8 @@ Feature: Feature: Students can use the recent blog entries block to view recent
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Recent blog entries" block
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I log out
|
||||
|
||||
@@ -23,6 +23,8 @@ Feature: Adding blog tag block
|
||||
When I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Blog tags" block
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ Feature: Enable the course_list block on a category page and view it's contents
|
||||
And I turn editing mode on
|
||||
And I am on course index
|
||||
And I follow "Category 1"
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Courses" block
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
@@ -49,6 +51,8 @@ Feature: Enable the course_list block on a category page and view it's contents
|
||||
And I turn editing mode on
|
||||
And I am on course index
|
||||
And I follow "Category 1"
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Courses" block
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
@@ -67,6 +71,8 @@ Feature: Enable the course_list block on a category page and view it's contents
|
||||
And I turn editing mode on
|
||||
And I am on course index
|
||||
And I follow "Category 1"
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
When I add the "Courses" block
|
||||
Then I should see "Category 1" in the "Course categories" "block"
|
||||
And I should see "Category A" in the "Course categories" "block"
|
||||
|
||||
@@ -28,6 +28,8 @@ Feature: Enable the course_list block on a course page and view it's contents
|
||||
Scenario: Add the course list block on course page and navigate to the course listing
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
When I add the "Courses" block
|
||||
Then I should see "Course 1" in the "My courses" "block"
|
||||
And I should see "Course 2" in the "My courses" "block"
|
||||
@@ -39,6 +41,8 @@ Feature: Enable the course_list block on a course page and view it's contents
|
||||
Scenario: Add the course list block on course page and navigate to another course
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
When I add the "Courses" block
|
||||
Then I should see "Course 1" in the "My courses" "block"
|
||||
And I should see "Course 2" in the "My courses" "block"
|
||||
@@ -50,6 +54,8 @@ Feature: Enable the course_list block on a course page and view it's contents
|
||||
Scenario: Add the course list block on course page and view as an admin
|
||||
Given I log in as "admin"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
When I add the "Courses" block
|
||||
Then I should see "Category 1" in the "Course categories" "block"
|
||||
And I should see "Category A" in the "Course categories" "block"
|
||||
@@ -62,7 +68,8 @@ Feature: Enable the course_list block on a course page and view it's contents
|
||||
|
||||
Scenario: View the course list block on course page with hide all courses link enabled
|
||||
Given the following config values are set as admin:
|
||||
| block_course_list_hideallcourseslink | 1 |
|
||||
| block_course_list_hideallcourseslink | 1 | |
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I add the "Courses" block
|
||||
@@ -70,7 +77,8 @@ Feature: Enable the course_list block on a course page and view it's contents
|
||||
|
||||
Scenario: View the course list block on course page with admin sees own course enabled
|
||||
Given the following config values are set as admin:
|
||||
| block_course_list_adminview | own |
|
||||
| block_course_list_adminview | own | |
|
||||
| unaddableblocks | | theme_boost|
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| admin | C1 | editingteacher |
|
||||
|
||||
@@ -28,6 +28,8 @@ Feature: Enable the course_list block on the dashboard and view it's contents
|
||||
Scenario: Add the course list block on the dashboard and navigate to the course listing
|
||||
Given I log in as "teacher1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
When I add the "Courses" block
|
||||
Then I should see "Course 1" in the "My courses" "block"
|
||||
And I should see "Course 2" in the "My courses" "block"
|
||||
@@ -39,6 +41,8 @@ Feature: Enable the course_list block on the dashboard and view it's contents
|
||||
Scenario: Add the course list block on the dashboard and navigate to another course
|
||||
Given I log in as "teacher1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
When I add the "Courses" block
|
||||
Then I should see "Course 1" in the "My courses" "block"
|
||||
And I should see "Course 2" in the "My courses" "block"
|
||||
@@ -50,6 +54,8 @@ Feature: Enable the course_list block on the dashboard and view it's contents
|
||||
Scenario: Add the course list block on the dashboard and view as an admin
|
||||
Given I log in as "admin"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
When I add the "Courses" block
|
||||
Then I should see "Category 1" in the "Course categories" "block"
|
||||
And I should see "Category A" in the "Course categories" "block"
|
||||
|
||||
@@ -29,6 +29,8 @@ Feature: Enable the course_list block on the frontpage and view it's contents
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Courses" block
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
@@ -44,6 +46,8 @@ Feature: Enable the course_list block on the frontpage and view it's contents
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Courses" block
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
@@ -59,6 +63,8 @@ Feature: Enable the course_list block on the frontpage and view it's contents
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
When I add the "Courses" block
|
||||
Then I should see "Category 1" in the "Course categories" "block"
|
||||
And I should see "Category A" in the "Course categories" "block"
|
||||
@@ -73,6 +79,8 @@ Feature: Enable the course_list block on the frontpage and view it's contents
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Courses" block
|
||||
And I log out
|
||||
When I log in as "guest"
|
||||
|
||||
@@ -39,6 +39,8 @@ Feature: Expand the courses nodes within the navigation block
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -18,6 +18,8 @@ Feature: Displaying the link to the Participants page
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -32,6 +32,8 @@ Feature: View my courses in navigation block
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -21,14 +21,18 @@ Feature: The section links block allows users to quickly navigate around a moodl
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
|
||||
Scenario: Add the section links block to a course.
|
||||
Given I add the "Section links" block
|
||||
Given the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Section links" block
|
||||
And I turn editing mode off
|
||||
And I should see "5" in the "Section links" "block"
|
||||
When I follow "5"
|
||||
Then I should see "Test assignment 1"
|
||||
|
||||
Scenario: Add the section links block to a course and limit the sections displayed.
|
||||
Given I add the "Section links" block
|
||||
Given the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Section links" block
|
||||
And I configure the "Section links" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_numsections1 | 5 |
|
||||
@@ -42,7 +46,9 @@ Feature: The section links block allows users to quickly navigate around a moodl
|
||||
Then I should see "Test assignment 1"
|
||||
|
||||
Scenario: Add the section links block to a course and limit the sections displayed using the alternative number of sections.
|
||||
Given I add the "Section links" block
|
||||
Given the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Section links" block
|
||||
And I configure the "Section links" block
|
||||
And I set the following fields to these values:
|
||||
| id_config_numsections1 | 5 |
|
||||
|
||||
@@ -20,6 +20,8 @@ Feature: The Section links block can be configured to display section name in ad
|
||||
| showsectionname | 1 | block_section_links |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Section links" block
|
||||
And I log out
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ Feature: Adding and configuring Flickr block
|
||||
Scenario: Adding Flickr block to the tags site page
|
||||
Given I log in as "admin"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
|
||||
@@ -15,6 +15,8 @@ Feature: Adding and configuring YouTube block
|
||||
| apikey | | block_tag_youtube |
|
||||
And I follow "Dashboard"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
@@ -35,6 +37,8 @@ Feature: Adding and configuring YouTube block
|
||||
| apikey | invalidapikeyvalue | block_tag_youtube |
|
||||
And I follow "Dashboard"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
And I click on "Tags" "link" in the "Navigation" "block"
|
||||
|
||||
@@ -12,6 +12,8 @@ Feature: Comment on a blog entry
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 "Site blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
|
||||
@@ -11,6 +11,8 @@ Feature: Delete a blog entry
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 "Site blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
|
||||
@@ -10,6 +10,8 @@ Feature: Replace H5P file from an existing content
|
||||
| System | | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
And I log in as "admin"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
|
||||
@@ -10,6 +10,8 @@ Feature: H5P file upload to content bank for admins
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Files" filemanager
|
||||
And I click on "Save changes" "button"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
@@ -66,6 +68,8 @@ Feature: H5P file upload to content bank for admins
|
||||
And I wait until the page is ready
|
||||
Then I should see "filltheblanks.h5p"
|
||||
And I am on "Course 1" course homepage
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
|
||||
@@ -21,6 +21,8 @@ Feature: Disable H5P content-types from the content bank
|
||||
| Course | C1 | contenttype_h5p | admin | invalidh5p | /h5p/tests/fixtures/h5ptest.zip |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I log out
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ Feature: Manage H5P content from the content bank
|
||||
| Course | C1 | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p | /h5p/tests/fixtures/ipsums.h5p |
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I log out
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ Feature: Replace H5P file from an existing content requires special capabilities
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
|
||||
@@ -26,12 +26,16 @@ Feature: H5P file upload to content bank for non admins
|
||||
|
||||
Scenario: Teachers can not access system level content bank
|
||||
Given I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
When I expand "Site pages" node
|
||||
Then I should not see "Content bank"
|
||||
|
||||
Scenario: Teachers can access course level content bank
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
When I expand "Site pages" node
|
||||
Then I should see "Content bank"
|
||||
@@ -45,6 +49,8 @@ Feature: H5P file upload to content bank for non admins
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
When I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
@@ -67,6 +73,8 @@ Feature: H5P file upload to content bank for non admins
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
When I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
@@ -81,6 +89,8 @@ Feature: H5P file upload to content bank for non admins
|
||||
And I log out
|
||||
When I log in as "teacher2"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
@@ -94,6 +104,8 @@ Feature: H5P file upload to content bank for non admins
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
@@ -127,6 +139,8 @@ Feature: H5P file upload to content bank for non admins
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
When I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
|
||||
@@ -11,6 +11,8 @@ Feature: Delete H5P file from the content bank
|
||||
And I click on "Save changes" "button"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -18,6 +18,8 @@ Feature: Download H5P content from the content bank
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -8,6 +8,8 @@ Feature: Content bank use editor feature
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -20,6 +20,8 @@ Feature: Confirm content bank events are triggered
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Files" filemanager
|
||||
And I click on "Save changes" "button"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
|
||||
Scenario: Content created and uploaded events when uploading a content file
|
||||
|
||||
@@ -29,6 +29,8 @@ Feature: Navigate to different contexts in the content bank
|
||||
Scenario: Admins can view and navigate to all the contexts in the content bank
|
||||
Given I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
When I click on "Content bank" "link"
|
||||
@@ -64,6 +66,8 @@ Feature: Navigate to different contexts in the content bank
|
||||
And I log out
|
||||
And I am on the "C0" "Course" page logged in as "teacher"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
When I click on "Content bank" "link"
|
||||
|
||||
@@ -23,6 +23,8 @@ Feature: Search content in the content bank
|
||||
Scenario: Admins can search content in the content bank
|
||||
Given I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
|
||||
@@ -27,6 +27,8 @@ Feature: Sort content in the content bank
|
||||
Scenario: Admins can order content in the content bank
|
||||
Given I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
@@ -43,6 +45,8 @@ Feature: Sort content in the content bank
|
||||
Scenario: Admins can order content depending on the author
|
||||
Given I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
|
||||
@@ -12,6 +12,8 @@ Feature: Store the content bank view preference
|
||||
And I click on "Save changes" "button"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -8,6 +8,8 @@ Feature: Make content public or unlisted
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -37,6 +37,8 @@ Feature: Restricting access to course lists
|
||||
| moodle/category:viewcourselist | Allow |
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I log out
|
||||
And the following "role assigns" exist:
|
||||
|
||||
@@ -68,6 +68,8 @@ Feature: Course activity controls works as expected
|
||||
And I show section "1"
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
And section "1" should be visible
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Section links" block
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
And I should see "1 2 3 4 5" in the "Section links" "block"
|
||||
@@ -127,6 +129,8 @@ Feature: Course activity controls works as expected
|
||||
And I show section "1"
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
And section "1" should be visible
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Section links" block
|
||||
And <belowpage> "section" <should_see_other_sections> exist
|
||||
And I should see "1 2 3 4 5" in the "Section links" "block"
|
||||
|
||||
@@ -48,6 +48,8 @@ Feature: Tagging courses
|
||||
And I log out
|
||||
And I log in as "user1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
@@ -85,6 +87,8 @@ Feature: Tagging courses
|
||||
And I log out
|
||||
And I log in as "user1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
|
||||
@@ -19,6 +19,8 @@ Feature: General section does not show in navigation when empty
|
||||
| forum | Test forum name | Test forum name description | C1 | forum1 | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
|
||||
Scenario: General section is visible in navigation when it is not empty
|
||||
|
||||
@@ -35,6 +35,8 @@ Feature: Browse course list and return back from enrolment page
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
+19
-2
@@ -214,15 +214,17 @@ class block_manager {
|
||||
return $this->addableblocks;
|
||||
}
|
||||
|
||||
$unaddableblocks = self::get_undeletable_block_types();
|
||||
$undeletableblocks = self::get_undeletable_block_types();
|
||||
$unaddablebythemeblocks = $this->get_unaddable_by_theme_block_types();
|
||||
$requiredbythemeblocks = $this->get_required_by_theme_block_types();
|
||||
$pageformat = $this->page->pagetype;
|
||||
foreach($allblocks as $block) {
|
||||
if (!$bi = block_instance($block->name)) {
|
||||
continue;
|
||||
}
|
||||
if ($block->visible && !in_array($block->name, $unaddableblocks) &&
|
||||
if ($block->visible && !in_array($block->name, $undeletableblocks) &&
|
||||
!in_array($block->name, $requiredbythemeblocks) &&
|
||||
!in_array($block->name, $unaddablebythemeblocks) &&
|
||||
$bi->can_block_be_added($this->page) &&
|
||||
($bi->instance_allow_multiple() || !$this->is_block_present($block->name)) &&
|
||||
blocks_name_allowed_in_format($block->name, $pageformat) &&
|
||||
@@ -428,6 +430,21 @@ class block_manager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* It returns the list of blocks that can't be displayed in the "Add a block" list.
|
||||
* This information is taken from the unaddableblocks theme setting.
|
||||
*
|
||||
* @return array A list with the blocks that won't be displayed in the "Add a block" list.
|
||||
*/
|
||||
public function get_unaddable_by_theme_block_types(): array {
|
||||
$unaddablebythemeblocks = [];
|
||||
if (isset($this->page->theme->settings->unaddableblocks) && !empty($this->page->theme->settings->unaddableblocks)) {
|
||||
$unaddablebythemeblocks = array_map('trim', explode(',', $this->page->theme->settings->unaddableblocks));
|
||||
}
|
||||
|
||||
return $unaddablebythemeblocks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make this block type undeletable and unaddable.
|
||||
*
|
||||
|
||||
@@ -826,6 +826,43 @@ class core_blocklib_testcase extends advanced_testcase {
|
||||
$this->assertEquals('8', $mybr[5]->instance->weight);
|
||||
$PAGE = $storedpage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get_unaddable_by_theme_block_types() method to return expected result depending on the theme.
|
||||
*
|
||||
* @covers \block_manager::get_unaddable_by_theme_block_types
|
||||
*/
|
||||
public function test_get_unaddable_by_theme_block_types(): void {
|
||||
global $CFG, $PAGE;
|
||||
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest();
|
||||
$regionname = 'side-pre';
|
||||
$context = context_system::instance();
|
||||
|
||||
$PAGE->reset_theme_and_output();
|
||||
$CFG->theme = 'boost';
|
||||
|
||||
list($page, $blockmanager) = $this->get_a_page_and_block_manager([$regionname], $context, 'page-type');
|
||||
$blockmanager->load_blocks();
|
||||
$blocks = $blockmanager->get_unaddable_by_theme_block_types();
|
||||
// Assert that a few blocks are excluded for boost theme.
|
||||
$this->assertCount(4, $blocks);
|
||||
$this->assertContains('navigation', $blocks);
|
||||
$this->assertContains('settings', $blocks);
|
||||
$this->assertContains('course_list', $blocks);
|
||||
$this->assertContains('section_links', $blocks);
|
||||
|
||||
// Change to a theme without unaddable blocks.
|
||||
$PAGE->reset_theme_and_output();
|
||||
$CFG->theme = 'classic';
|
||||
|
||||
list($page, $blockmanager) = $this->get_a_page_and_block_manager([$regionname], $context, 'page-type');
|
||||
$blockmanager->load_blocks();
|
||||
$blocks = $blockmanager->get_unaddable_by_theme_block_types();
|
||||
// Assert that no blocks are excluded for classic theme.
|
||||
$this->assertEmpty($blocks);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -163,6 +163,8 @@ current value for a pluginname depending on its status (enabled, disabled, other
|
||||
* /renderer.php
|
||||
* /rsslib.php
|
||||
This default applies both when there is no supplied coverage.php file, and is used to supplement any existing coverage configuration file if one is found.
|
||||
* New method get_unaddable_by_theme_block_types() has been added to block_manager class. It uses the 'unaddableblocks' theme setting
|
||||
value to get the list of blocks that won't be displayed for a theme.
|
||||
|
||||
=== 3.11.4 ===
|
||||
* A new option dontforcesvgdownload has been added to the $options parameter of the send_file() function.
|
||||
|
||||
@@ -69,6 +69,8 @@ Feature: A teacher can choose whether glossary entries require approval
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Tags" "link" in the "Navigation" "block"
|
||||
|
||||
@@ -30,6 +30,8 @@ Feature: Inline editing H5P content
|
||||
And I log in as "admin"
|
||||
# Add the navigation block.
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
# Create an H5P activity with a link to the content-bank file.
|
||||
And I add a "H5P" to section "1"
|
||||
@@ -90,6 +92,8 @@ Feature: Inline editing H5P content
|
||||
And I log in as "admin"
|
||||
# Add the navigation block.
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
# Create an H5P activity with a copy to the content-bank file.
|
||||
And I add a "H5P" to section "1"
|
||||
|
||||
@@ -20,7 +20,6 @@ Feature: Restrict which blocks can be added to Dashboard
|
||||
And I log in as "student1"
|
||||
And I turn editing mode on
|
||||
Then the add block selector should contain "Comments" block
|
||||
And the add block selector should contain "Courses" block
|
||||
And the add block selector should contain "Text" block
|
||||
And the add block selector should contain "Tags" block
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ Feature: Add notes to course participants
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -34,6 +34,8 @@ Feature: Updating a file in the content bank after using in a course
|
||||
And I switch to the main frame
|
||||
# Now edit the content in the content bank.
|
||||
When I am on "Course1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
@@ -73,6 +75,8 @@ Feature: Updating a file in the content bank after using in a course
|
||||
And I switch to the main frame
|
||||
# Now edit the content in the content bank.
|
||||
When I am on "Course1" course homepage with editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
|
||||
@@ -104,6 +104,8 @@ Feature: Managers can create and manage tag collections
|
||||
And I press "Create"
|
||||
And "Yes" "text" should not exist in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hiddencoll')]" "xpath_element"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
|
||||
@@ -32,6 +32,8 @@ Feature: Users can edit tags to add description or rename
|
||||
And I log out
|
||||
When I log in as "editor1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
@@ -57,6 +59,8 @@ Feature: Users can edit tags to add description or rename
|
||||
Scenario: Manager can change tag description, related tags and rename the tag from tag view page
|
||||
When I log in as "manager1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
@@ -90,6 +94,8 @@ Feature: Users can edit tags to add description or rename
|
||||
Scenario: Renaming the tag from tag view page
|
||||
When I log in as "manager1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Tags" "link" in the "Navigation" "block"
|
||||
|
||||
@@ -25,6 +25,8 @@ Feature: Users can flag tags and manager can reset flags
|
||||
And I log out
|
||||
And I log in as "user2"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
@@ -35,6 +37,8 @@ Feature: Users can flag tags and manager can reset flags
|
||||
And I follow "Flag as inappropriate"
|
||||
And I should see "The person responsible will be notified"
|
||||
And I am on homepage
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
@@ -47,6 +51,8 @@ Feature: Users can flag tags and manager can reset flags
|
||||
And I log out
|
||||
And I log in as "user3"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
|
||||
@@ -23,6 +23,8 @@ Feature: Browsing tagged items
|
||||
Scenario: Browse tag index with javascript disabled
|
||||
When I log in as "user1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Tags" "link" in the "Navigation" "block"
|
||||
@@ -70,6 +72,8 @@ Feature: Browsing tagged items
|
||||
Scenario: Browse tag index with javascript enabled
|
||||
When I log in as "user1"
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
# TODO MDL-57120 "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I click on "Site pages" "list_item" in the "Navigation" "block"
|
||||
|
||||
@@ -50,6 +50,8 @@ $string['rawscsspre'] = 'Raw initial SCSS';
|
||||
$string['rawscsspre_desc'] = 'In this field you can provide initialising SCSS code, it will be injected before everything else. Most of the time you will use this setting to define variables.';
|
||||
$string['region-side-pre'] = 'Right';
|
||||
$string['showfooter'] = 'Show footer';
|
||||
$string['unaddableblocks'] = 'Unaddable blocks';
|
||||
$string['unaddableblocks_desc'] = 'The blocks defined in this field will not be displayed in the "Add a block" list.';
|
||||
$string['privacy:metadata:preference:draweropenblock'] = 'The user\'s preference for hiding or showing the drawer with blocks.';
|
||||
$string['privacy:metadata:preference:draweropenindex'] = 'The user\'s preference for hiding or showing the drawer with course index.';
|
||||
$string['privacy:metadata:preference:draweropennav'] = 'The user\'s preference for hiding or showing the drawer menu navigation.';
|
||||
|
||||
@@ -26,6 +26,15 @@ if ($ADMIN->fulltree) {
|
||||
$settings = new theme_boost_admin_settingspage_tabs('themesettingboost', get_string('configtitle', 'theme_boost'));
|
||||
$page = new admin_settingpage('theme_boost_general', get_string('generalsettings', 'theme_boost'));
|
||||
|
||||
// Unaddable blocks.
|
||||
// Blocks to be excluded when this theme is enabled in the "Add a block" list: Administration, Navigation, Courses and
|
||||
// Section links.
|
||||
$default = 'navigation,settings,course_list,section_links';
|
||||
$setting = new admin_setting_configtext('theme_boost/unaddableblocks',
|
||||
get_string('unaddableblocks', 'theme_boost'), get_string('unaddableblocks_desc', 'theme_boost'), $default, PARAM_TEXT);
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$page->add($setting);
|
||||
|
||||
// Preset.
|
||||
$name = 'theme_boost/preset';
|
||||
$title = get_string('preset', 'theme_boost');
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
@javascript @theme_boost
|
||||
Feature: Add a block using boost theme
|
||||
In order to decide the blocks to display in the Add a block list for a theme
|
||||
As an administrator
|
||||
I need to define them using the unaddableblocks setting
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname |
|
||||
| Course 1 | C1 |
|
||||
And I log in as "admin"
|
||||
|
||||
Scenario: Default blocks defined in unaddableblocks settings are not displayed in the Add a block list
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
When I click on "Add a block" "link"
|
||||
Then I should not see "Administration"
|
||||
And I should not see "Navigation"
|
||||
And I should not see "Courses"
|
||||
And I should not see "Section links"
|
||||
And I should see "Online users"
|
||||
|
||||
Scenario: Admins can change unaddable blocks using the unaddableblocks setting
|
||||
Given the following config values are set as admin:
|
||||
| unaddableblocks | settings,private_files | theme_boost|
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I click on "Add a block" "link"
|
||||
Then I should not see "Administration"
|
||||
And I should not see "Private files"
|
||||
And I should see "Navigation"
|
||||
And I should see "Courses"
|
||||
And I should see "Section links"
|
||||
|
||||
Scenario: If unaddableblocks settting is empty, no block is excluded from the Add a block list
|
||||
Given the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I click on "Add a block" "link"
|
||||
Then I should see "Administration"
|
||||
And I should see "Navigation"
|
||||
And I should see "Courses"
|
||||
And I should see "Section links"
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2021052506;
|
||||
$plugin->version = 2022011000;
|
||||
$plugin->requires = 2021052500;
|
||||
$plugin->component = 'theme_boost';
|
||||
|
||||
@@ -35,6 +35,12 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$page->add($setting);
|
||||
|
||||
// Unaddable blocks.
|
||||
$setting = new admin_setting_configtext('theme_classic/unaddableblocks',
|
||||
get_string('unaddableblocks', 'theme_boost'), get_string('unaddableblocks_desc', 'theme_boost'), '', PARAM_TEXT);
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$page->add($setting);
|
||||
|
||||
// Preset.
|
||||
$name = 'theme_classic/preset';
|
||||
$title = get_string('preset', 'theme_classic');
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
@javascript @theme_classic
|
||||
Feature: Add a block using classic theme
|
||||
In order to check the blocks to display in the Add a block list for a them
|
||||
As an administrator
|
||||
I need to confirm the unaddableblocks setting is empty for classic.
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname |
|
||||
| Course 1 | C1 |
|
||||
And I log in as "admin"
|
||||
|
||||
Scenario: All the expected blocks are displayed in the Add a block list for classic
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
When I click on "Add a block" "select"
|
||||
Then I should see "Administration"
|
||||
And I should see "Navigation"
|
||||
And I should see "Courses"
|
||||
And I should see "Section links"
|
||||
|
||||
Scenario: Admins can change unaddable blocks using the unaddableblocks setting for classic
|
||||
Given the following config values are set as admin:
|
||||
| unaddableblocks | online_users,private_files,settings | theme_classic|
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I click on "Add a block" "select"
|
||||
Then I should not see "Online users"
|
||||
And I should not see "Private files"
|
||||
# The settings block is defined as required block for classic, so it will be displayed always.
|
||||
And I should see "Administration"
|
||||
And I should see "Navigation"
|
||||
And I should see "Courses"
|
||||
And I should see "Section links"
|
||||
@@ -25,7 +25,7 @@
|
||||
// This line protects the file from being accessed by a URL directly.
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2021052500;
|
||||
$plugin->version = 2022011400;
|
||||
$plugin->requires = 2021052500;
|
||||
$plugin->component = 'theme_classic';
|
||||
$plugin->dependencies = array('theme_boost' => 2021052500);
|
||||
|
||||
@@ -3,6 +3,7 @@ information provided here is intended especially for theme designer.
|
||||
|
||||
=== 4.0 ===
|
||||
* A new theme config 'usescourseindex' allows a theme to specify whether it implements and uses course index.
|
||||
* A new theme setting 'unaddableblocks' allows admins to define the blocks that won't be displayed in the "Add a block" list.
|
||||
|
||||
=== 3.11 ===
|
||||
* The classname 'viewmode-cobmined' in course/management.php has been changed to 'viewmode-combined'
|
||||
|
||||
@@ -20,6 +20,8 @@ Feature: Set the site home page and dashboard as the default home page
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And the following config values are set as admin:
|
||||
| unaddableblocks | | theme_boost|
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
Reference in New Issue
Block a user