|
|
|
|
@ -47,6 +47,9 @@ $_course = api_get_course_info(); |
|
|
|
|
$sessionId = api_get_session_id(); |
|
|
|
|
$_user = api_get_user_info(); |
|
|
|
|
|
|
|
|
|
$hideNotifications = api_get_course_setting('hide_forum_notifications'); |
|
|
|
|
$hideNotifications = $hideNotifications == 1; |
|
|
|
|
|
|
|
|
|
// Including necessary files. |
|
|
|
|
require_once 'forumconfig.inc.php'; |
|
|
|
|
require_once 'forumfunction.inc.php'; |
|
|
|
|
@ -456,25 +459,28 @@ if (is_array($forumCategories)) { |
|
|
|
|
|
|
|
|
|
$toolActions = null; |
|
|
|
|
$forumInfo['alert'] = null; |
|
|
|
|
// The number of topics and posts. |
|
|
|
|
if ($forum['forum_of_group'] !== '0') { |
|
|
|
|
if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) { |
|
|
|
|
$forumInfo['alert'] = ' '. |
|
|
|
|
Display::return_icon( |
|
|
|
|
'alert.png', |
|
|
|
|
get_lang('Forum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) { |
|
|
|
|
$forumInfo['alert'] = ' '.Display::return_icon( |
|
|
|
|
'alert.png', |
|
|
|
|
get_lang('Forum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if ($hideNotifications == false) { |
|
|
|
|
// The number of topics and posts. |
|
|
|
|
if ($forum['forum_of_group'] !== '0') { |
|
|
|
|
if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) { |
|
|
|
|
$forumInfo['alert'] = ' '. |
|
|
|
|
Display::return_icon( |
|
|
|
|
'alert.png', |
|
|
|
|
get_lang('Forum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) { |
|
|
|
|
$forumInfo['alert'] = ' '.Display::return_icon( |
|
|
|
|
'alert.png', |
|
|
|
|
get_lang('Forum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$poster_id = null; |
|
|
|
|
@ -551,7 +557,7 @@ if (is_array($forumCategories)) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) { |
|
|
|
|
if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true) && $hideNotifications == false) { |
|
|
|
|
$toolActions .= '<a href="'.api_get_self().'?'.api_get_cidreq() |
|
|
|
|
.'&action=notify&content=forum&id='.$forum['forum_id'].'">' |
|
|
|
|
.Display::return_icon($iconnotify, get_lang('NotifyMe'), null, ICON_SIZE_SMALL) |
|
|
|
|
|