Proposal
Instead of using a plain text element for the flagmessage, which doesn't even allow line breaks inside the message:
echo $OUTPUT->box($msg, 'generalbox', 'notice');
we could allow markdown:
$context = $PAGE->context ?? context_system::instance();
$markdown = format_text($msg, FORMAT_MARKDOWN, [
'context' => $context,
'filter' => true,
]);
echo $OUTPUT->box($markdown, 'generalbox', 'notice');
This allows formatting and also the use of the {mlang} modifier directly inside the flagmessage field in the Settings GUI:
{mlang en}
## Test-heading english
info-text english
{mlang}
{mlang en}
## Test-heading german
info-text german
{mlang}
Environment
- Moodle: 4.5.7
- Auth SAML2 Plugin: latest MOODLE_405_STABLE release