mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-71163 mod_forum: Remove duplicate due date info
This commit is contained in:
parent
2946894701
commit
70ac3b091f
@ -383,23 +383,25 @@ class discussion {
|
||||
$notifications = $this->notifications;
|
||||
$discussion = $this->discussion;
|
||||
$forum = $this->forum;
|
||||
$renderer = $this->renderer;
|
||||
|
||||
if ($forum->is_cutoff_date_reached()) {
|
||||
$notifications[] = (new notification(
|
||||
get_string('cutoffdatereached', 'forum'),
|
||||
notification::NOTIFY_INFO
|
||||
))->set_show_closebutton();
|
||||
} else if ($forum->is_due_date_reached()) {
|
||||
$notifications[] = (new notification(
|
||||
} else if ($forum->get_type() != 'single') {
|
||||
// Due date is already shown at the top of the page for single simple discussion forums.
|
||||
if ($forum->is_due_date_reached()) {
|
||||
$notifications[] = (new notification(
|
||||
get_string('thisforumisdue', 'forum', userdate($forum->get_due_date())),
|
||||
notification::NOTIFY_INFO
|
||||
))->set_show_closebutton();
|
||||
} else if ($forum->has_due_date()) {
|
||||
$notifications[] = (new notification(
|
||||
))->set_show_closebutton();
|
||||
} else if ($forum->has_due_date()) {
|
||||
$notifications[] = (new notification(
|
||||
get_string('thisforumhasduedate', 'forum', userdate($forum->get_due_date())),
|
||||
notification::NOTIFY_INFO
|
||||
))->set_show_closebutton();
|
||||
))->set_show_closebutton();
|
||||
}
|
||||
}
|
||||
|
||||
if ($forum->is_discussion_locked($discussion)) {
|
||||
|
@ -337,7 +337,6 @@ class discussion_list {
|
||||
private function get_notifications(stdClass $user, ?int $groupid) : array {
|
||||
$notifications = $this->notifications;
|
||||
$forum = $this->forum;
|
||||
$renderer = $this->renderer;
|
||||
$capabilitymanager = $this->capabilitymanager;
|
||||
|
||||
if ($forum->is_cutoff_date_reached()) {
|
||||
@ -345,16 +344,6 @@ class discussion_list {
|
||||
get_string('cutoffdatereached', 'forum'),
|
||||
notification::NOTIFY_INFO
|
||||
))->set_show_closebutton();
|
||||
} else if ($forum->is_due_date_reached()) {
|
||||
$notifications[] = (new notification(
|
||||
get_string('thisforumisdue', 'forum', userdate($forum->get_due_date())),
|
||||
notification::NOTIFY_INFO
|
||||
))->set_show_closebutton();
|
||||
} else if ($forum->has_due_date()) {
|
||||
$notifications[] = (new notification(
|
||||
get_string('thisforumhasduedate', 'forum', userdate($forum->get_due_date())),
|
||||
notification::NOTIFY_INFO
|
||||
))->set_show_closebutton();
|
||||
}
|
||||
|
||||
if ($forum->has_blocking_enabled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user