|
|
|
@ -88,7 +88,6 @@ Event::event_access_tool(TOOL_ANNOUNCEMENT); |
|
|
|
|
|
|
|
|
|
|
|
$announcement_id = isset($_GET['id']) ? intval($_GET['id']) : null; |
|
|
|
$announcement_id = isset($_GET['id']) ? intval($_GET['id']) : null; |
|
|
|
$action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'list'; |
|
|
|
$action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'list'; |
|
|
|
|
|
|
|
|
|
|
|
$announcement_number = AnnouncementManager::getNumberAnnouncements(); |
|
|
|
$announcement_number = AnnouncementManager::getNumberAnnouncements(); |
|
|
|
|
|
|
|
|
|
|
|
$homeUrl = api_get_self().'?action=list&'.api_get_cidreq(); |
|
|
|
$homeUrl = api_get_self().'?action=list&'.api_get_cidreq(); |
|
|
|
@ -97,7 +96,6 @@ $searchFormToString = ''; |
|
|
|
|
|
|
|
|
|
|
|
switch ($action) { |
|
|
|
switch ($action) { |
|
|
|
case 'move': |
|
|
|
case 'move': |
|
|
|
|
|
|
|
|
|
|
|
if (!$allowToEdit) { |
|
|
|
if (!$allowToEdit) { |
|
|
|
api_not_allowed(true); |
|
|
|
api_not_allowed(true); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -119,7 +117,6 @@ switch ($action) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$announcementInfo = AnnouncementManager::get_by_id($courseId, $thisAnnouncementId); |
|
|
|
$announcementInfo = AnnouncementManager::get_by_id($courseId, $thisAnnouncementId); |
|
|
|
|
|
|
|
|
|
|
|
$sql = "SELECT DISTINCT announcement.id, announcement.display_order |
|
|
|
$sql = "SELECT DISTINCT announcement.id, announcement.display_order |
|
|
|
FROM $tbl_announcement announcement, |
|
|
|
FROM $tbl_announcement announcement, |
|
|
|
$tbl_item_property itemproperty |
|
|
|
$tbl_item_property itemproperty |
|
|
|
@ -143,7 +140,6 @@ switch ($action) { |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
$sql = "UPDATE $tbl_announcement SET display_order = '$thisAnnouncementOrder' |
|
|
|
$sql = "UPDATE $tbl_announcement SET display_order = '$thisAnnouncementOrder' |
|
|
|
WHERE c_id = $courseId AND id = $nextAnnouncementId"; |
|
|
|
WHERE c_id = $courseId AND id = $nextAnnouncementId"; |
|
|
|
|
|
|
|
|
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -479,7 +475,6 @@ switch ($action) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$announcementInfo = AnnouncementManager::get_by_id($courseId, $id); |
|
|
|
$announcementInfo = AnnouncementManager::get_by_id($courseId, $id); |
|
|
|
|
|
|
|
|
|
|
|
if (isset($announcementInfo) && !empty($announcementInfo)) { |
|
|
|
if (isset($announcementInfo) && !empty($announcementInfo)) { |
|
|
|
$to = AnnouncementManager::load_edit_users('announcement', $id); |
|
|
|
$to = AnnouncementManager::load_edit_users('announcement', $id); |
|
|
|
|
|
|
|
|
|
|
|
|