|
|
|
@ -198,6 +198,7 @@ if (api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_ed |
|
|
|
|
} |
|
|
|
|
if (!api_is_course_coach() || api_is_element_in_the_session(TOOL_ANNOUNCEMENT, $_GET['id'])) { |
|
|
|
|
if ($ctok == $_GET['sec_token']) { |
|
|
|
|
|
|
|
|
|
AnnouncementManager::change_visibility_announcement($_course, $_GET['id']); |
|
|
|
|
$message = get_lang('VisibilityChanged'); |
|
|
|
|
} |
|
|
|
@ -552,8 +553,7 @@ if(api_is_allowed_to_edit(false,true)) { |
|
|
|
|
} |
|
|
|
|
$sql = "SELECT announcement.*, ip.visibility, ip.to_group_id, ip.insert_user_id |
|
|
|
|
FROM $tbl_announcement announcement, $tbl_item_property ip |
|
|
|
|
WHERE |
|
|
|
|
announcement.c_id = $course_id AND |
|
|
|
|
WHERE announcement.c_id = $course_id AND |
|
|
|
|
ip.c_id = $course_id AND |
|
|
|
|
announcement.id = ip.ref AND |
|
|
|
|
ip.tool = 'announcement' AND |
|
|
|
@ -1113,6 +1113,9 @@ if ($display_announcement_list) { |
|
|
|
|
/* DATE */ |
|
|
|
|
$last_post_datetime = $myrow['end_date']; |
|
|
|
|
|
|
|
|
|
$item_visibility = api_get_item_visibility($_course, TOOL_ANNOUNCEMENT, $myrow['id'], $session_id); |
|
|
|
|
$myrow['visibility'] = $item_visibility; |
|
|
|
|
|
|
|
|
|
// the styles |
|
|
|
|
if ($myrow['visibility'] == '0') { |
|
|
|
|
$style='invisible'; |
|
|
|
@ -1126,7 +1129,6 @@ if ($display_announcement_list) { |
|
|
|
|
$attachment_list = array(); |
|
|
|
|
$attachment_list = AnnouncementManager::get_attachment($myrow['id']); |
|
|
|
|
|
|
|
|
|
$attachment = ''; |
|
|
|
|
$attachment_icon = ''; |
|
|
|
|
if (count($attachment_list)>0) { |
|
|
|
|
$attachment_icon = ' '.Display::return_icon('attachment.gif',get_lang('Attachment')); |
|
|
|
|