From 68ff5f0ce005c7b84de3d81a2e3018f3fb6084cc Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Fri, 30 Oct 2020 14:08:43 +0800 Subject: [PATCH] MDL-70071 forum: Convert post threshold warnings to info --- mod/forum/classes/local/renderers/discussion.php | 3 ++- mod/forum/classes/local/renderers/discussion_list.php | 3 ++- mod/forum/classes/post_form.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mod/forum/classes/local/renderers/discussion.php b/mod/forum/classes/local/renderers/discussion.php index 620cf89412d..abf72e87e56 100644 --- a/mod/forum/classes/local/renderers/discussion.php +++ b/mod/forum/classes/local/renderers/discussion.php @@ -435,7 +435,8 @@ class discussion { get_string('thisforumisthrottled', 'forum', [ 'blockafter' => $forum->get_block_after(), 'blockperiod' => get_string('secondstotime' . $forum->get_block_period()) - ]) + ]), + notification::NOTIFY_INFO ))->set_show_closebutton(); } diff --git a/mod/forum/classes/local/renderers/discussion_list.php b/mod/forum/classes/local/renderers/discussion_list.php index 2ef3c88d5b6..b16a2ad1110 100644 --- a/mod/forum/classes/local/renderers/discussion_list.php +++ b/mod/forum/classes/local/renderers/discussion_list.php @@ -353,7 +353,8 @@ class discussion_list { get_string('thisforumisthrottled', 'forum', [ 'blockafter' => $forum->get_block_after(), 'blockperiod' => get_string('secondstotime' . $forum->get_block_period()) - ]) + ]), + notification::NOTIFY_INFO ))->set_show_closebutton(); } diff --git a/mod/forum/classes/post_form.php b/mod/forum/classes/post_form.php index 948468176fd..5e603e2be25 100644 --- a/mod/forum/classes/post_form.php +++ b/mod/forum/classes/post_form.php @@ -107,7 +107,7 @@ class mod_forum_post_form extends moodleform { // Here we want to display a warning if they can still post but have reached the warning threshold. if ($thresholdwarning->canpost) { $message = get_string($thresholdwarning->errorcode, $thresholdwarning->module, $thresholdwarning->additional); - $mform->addElement('html', $OUTPUT->notification($message)); + $mform->addElement('html', $OUTPUT->notification($message, \core\output\notification::NOTIFY_INFO)); } }