Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2025-10-24 - Bugfix: Site support form success message is shown below blocks or advert tiles on frontpage, resolves #488
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog entries with bug fixes should be formulated in the past tense, if possible.
I will fix that in a review changes commit.

* 2025-10-23 - Feature: Add a type for smart menu item to use mailto links, resolves #702

### v5.0-r11
Expand Down
2 changes: 1 addition & 1 deletion templates/theme_boost/drawers.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
{{> core/moremenu}}
</div>
{{/secondarymoremenu}}
{{{ output.course_content_header }}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid that we can't move that function call that easily. The course_content_header() outputs the page notifications, but it also outputs course content which should not be moved on the page.

My gut feeling is that we could move forward by overwriting the course_content_header() function in Boost Union's core renderer class and by splitting it into two parts, the first one which just shows the notifications and the second one which just shows the course content. Both functions could then be called here in Mustache individually.

We have done something like that before with the standard_end_of_body_html_endtoken() and standard_end_of_body_html_additionalhtmlfooter() function.

Do you think you could proceed into this direction?

{{#regions.contentupper.hasblocks}}
<section id="theme-block-region-content-upper" class="theme-block-region" aria-label="{{#str}}blocks{{/str}}">
{{{ regions.contentupper.addblockbutton }}}
Expand All @@ -217,7 +218,6 @@
{{#hasregionmainsettingsmenu}}
<div class="region_main_settings_menu_proxy"></div>
{{/hasregionmainsettingsmenu}}
{{{ output.course_content_header }}}
{{#headercontent}}
{{> core/activity_header }}
{{/headercontent}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,25 @@ Feature: Configuring the theme_boost_union plugin for the "Support page" tab on
Then I should see "Your accessibility support request was sent"
# Unfortunately, the content of the email can't be tested with Behat yet as we do not have a way to test sent emails yet.

@javascript
Scenario: Support form success notification is shown before content-upper blocks on the homepage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is perfecly fine and it's great that you re-used Boost Union's accessibility support form (instead of Moodle core's support form) to trigger the notification on site home.

I would just move the scenario to theme_boost_union_feelsettings_blocks.feature as its goal is to test the behaviour of blocks and not the support form.

I will move that with a review changes commit.

Given the following config values are set as admin:
| config | value | plugin |
| defaulthomepage | Home | |
| enableaccessibilitysupport | yes | theme_boost_union |
| blockregionsforfrontpage | content-upper | theme_boost_union |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| online_users | Course | Acceptance test site | site-index | content-upper |
When I log in as "admin"
And I am on site homepage
And I should see "Online users" in the "#theme-block-region-content-upper" "css_element"
And I am on accessibilitysupport page
And I set the field "Message" to "Frontpage notification order test"
And I click on "Submit" "button"
And I wait until the page is ready
Then "Your accessibility support request was sent" "text" should appear before ".block_online_users" "css_element"

# Unfortunately, this can't be tested with Behat yet as we do not have a way to test sent emails yet (or rather block the sending of the email).
# Scenario: Sending the accessibility support form fails and the fallback message is shown

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'theme_boost_union';
$plugin->version = 2025041428;
$plugin->version = 2025041429;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this patch, no version bump is necessary.
I will remove that with a review changes commit

$plugin->release = 'v5.0-r11';
$plugin->requires = 2025041401;
$plugin->supported = [500, 500];
Expand Down
Loading