mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-71163 mod_forum: Remove duplicate due date info
This commit is contained in:
parent
b23bbc2711
commit
4b593aaeef
2 changed files with 9 additions and 18 deletions
|
@ -383,14 +383,15 @@ class discussion {
|
||||||
$notifications = $this->notifications;
|
$notifications = $this->notifications;
|
||||||
$discussion = $this->discussion;
|
$discussion = $this->discussion;
|
||||||
$forum = $this->forum;
|
$forum = $this->forum;
|
||||||
$renderer = $this->renderer;
|
|
||||||
|
|
||||||
if ($forum->is_cutoff_date_reached()) {
|
if ($forum->is_cutoff_date_reached()) {
|
||||||
$notifications[] = (new notification(
|
$notifications[] = (new notification(
|
||||||
get_string('cutoffdatereached', 'forum'),
|
get_string('cutoffdatereached', 'forum'),
|
||||||
notification::NOTIFY_INFO
|
notification::NOTIFY_INFO
|
||||||
))->set_show_closebutton();
|
))->set_show_closebutton();
|
||||||
} else if ($forum->is_due_date_reached()) {
|
} 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(
|
$notifications[] = (new notification(
|
||||||
get_string('thisforumisdue', 'forum', userdate($forum->get_due_date())),
|
get_string('thisforumisdue', 'forum', userdate($forum->get_due_date())),
|
||||||
notification::NOTIFY_INFO
|
notification::NOTIFY_INFO
|
||||||
|
@ -401,6 +402,7 @@ class discussion {
|
||||||
notification::NOTIFY_INFO
|
notification::NOTIFY_INFO
|
||||||
))->set_show_closebutton();
|
))->set_show_closebutton();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($forum->is_discussion_locked($discussion)) {
|
if ($forum->is_discussion_locked($discussion)) {
|
||||||
$notifications[] = (new notification(
|
$notifications[] = (new notification(
|
||||||
|
|
|
@ -337,7 +337,6 @@ class discussion_list {
|
||||||
private function get_notifications(stdClass $user, ?int $groupid) : array {
|
private function get_notifications(stdClass $user, ?int $groupid) : array {
|
||||||
$notifications = $this->notifications;
|
$notifications = $this->notifications;
|
||||||
$forum = $this->forum;
|
$forum = $this->forum;
|
||||||
$renderer = $this->renderer;
|
|
||||||
$capabilitymanager = $this->capabilitymanager;
|
$capabilitymanager = $this->capabilitymanager;
|
||||||
|
|
||||||
if ($forum->is_cutoff_date_reached()) {
|
if ($forum->is_cutoff_date_reached()) {
|
||||||
|
@ -345,16 +344,6 @@ class discussion_list {
|
||||||
get_string('cutoffdatereached', 'forum'),
|
get_string('cutoffdatereached', 'forum'),
|
||||||
notification::NOTIFY_INFO
|
notification::NOTIFY_INFO
|
||||||
))->set_show_closebutton();
|
))->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()) {
|
if ($forum->has_blocking_enabled()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue