|
|
|
@ -40,10 +40,10 @@ if (isset($_GET['action'])) { |
|
|
|
|
$interbreadcrumb[] = array ("url" => "system_announcements.php", "name" => get_lang('SystemAnnouncements')); |
|
|
|
|
if ($_GET['action'] == 'add') { |
|
|
|
|
$interbreadcrumb[] = array ("url" => '#', "name" => get_lang('AddAnnouncement')); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ($_GET['action'] == 'edit') { |
|
|
|
|
$interbreadcrumb[] = array ("url" => '#', "name" => get_lang('Edit')); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$tool_name = get_lang('SystemAnnouncements'); |
|
|
|
|
} |
|
|
|
@ -82,7 +82,7 @@ switch($action) { |
|
|
|
|
SystemAnnouncementManager :: delete_announcement($_GET['id']); |
|
|
|
|
Display :: display_confirmation_message(get_lang('AnnouncementDeleted')); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 'delete_selected': |
|
|
|
|
foreach($_POST['id'] as $index => $id) { |
|
|
|
|
SystemAnnouncementManager :: delete_announcement($id); |
|
|
|
@ -141,13 +141,13 @@ if ($action_todo) { |
|
|
|
|
} |
|
|
|
|
$form->add_timewindow('start','end',get_lang('StartTimeWindow'),get_lang('EndTimeWindow')); |
|
|
|
|
$group = array(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$group[]= $form->createElement('checkbox', 'visible_teacher', null, get_lang('Teacher')); |
|
|
|
|
$group[]= $form->createElement('checkbox', 'visible_student', null, get_lang('Student')); |
|
|
|
|
$group[]= $form->createElement('checkbox', 'visible_guest', null, get_lang('Guest')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form->addGroup($group, null, get_lang('Visible'), ''); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form->addElement('hidden', 'id'); |
|
|
|
|
|
|
|
|
|
$group_list = GroupPortalManager::get_groups_list(); |
|
|
|
@ -155,7 +155,7 @@ if ($action_todo) { |
|
|
|
|
$form->addElement('select', 'group',get_lang('AnnouncementForGroup'),$group_list); |
|
|
|
|
$values['group'] = isset($values['group']) ? $values['group'] : '0'; |
|
|
|
|
|
|
|
|
|
$form->addElement('checkbox', 'send_mail', null, get_lang('SendMail')); |
|
|
|
|
$form->addElement('checkbox', 'send_mail', null, get_lang('SendMail')); |
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['action']) && $_REQUEST['action']=='add') { |
|
|
|
|
$form->addElement('checkbox', 'add_to_calendar', null, get_lang('AddToCalendar')); |
|
|
|
@ -189,7 +189,7 @@ if ($action_todo) { |
|
|
|
|
$values['lang'] = null; |
|
|
|
|
} |
|
|
|
|
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') { |
|
|
|
|
$values['content'] = WCAG_Rendering::text_to_HTML($values['content']); |
|
|
|
|
//$values['content'] = WCAG_Rendering::text_to_HTML($values['content']); |
|
|
|
|
} |
|
|
|
|
switch ($values['action']) { |
|
|
|
|
case 'add': |
|
|
|
@ -234,13 +234,13 @@ if ($show_announcement_list) { |
|
|
|
|
$row = array(); |
|
|
|
|
$row[] = $announcement->id; |
|
|
|
|
$row[] = Display::return_icon(($announcement->visible ? 'accept.png' : 'exclamation.png'), ($announcement->visible ? get_lang('AnnouncementAvailable') : get_lang('AnnouncementNotAvailable'))); |
|
|
|
|
$row[] = $announcement->title; |
|
|
|
|
$row[] = $announcement->title; |
|
|
|
|
$row[] = api_convert_and_format_date($announcement->date_start); |
|
|
|
|
$row[] = api_convert_and_format_date($announcement->date_end); |
|
|
|
|
$row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_TEACHER."&action=". ($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher ? 'visible.gif' : 'invisible.gif'), get_lang('ShowOrHide'))."</a>"; |
|
|
|
|
$row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_STUDENT."&action=". ($announcement->visible_student ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student ? 'visible.gif' : 'invisible.gif'), get_lang('ShowOrHide'))."</a>"; |
|
|
|
|
$row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_GUEST."&action=". ($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest ? 'visible.gif' : 'invisible.gif'), get_lang('ShowOrHide'))."</a>"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$row[] = $announcement->lang; |
|
|
|
|
$row[] = "<a href=\"?action=edit&id=".$announcement->id."\">".Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a> <a href=\"?action=delete&id=".$announcement->id."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)."</a>"; |
|
|
|
|
$announcement_data[] = $row; |
|
|
|
@ -254,7 +254,7 @@ if ($show_announcement_list) { |
|
|
|
|
$table->set_header(5, get_lang('Teacher')); |
|
|
|
|
$table->set_header(6, get_lang('Student')); |
|
|
|
|
$table->set_header(7, get_lang('Guest')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$table->set_header(8, get_lang('Language')); |
|
|
|
|
$table->set_header(9, get_lang('Modify'), false, 'width="50px"'); |
|
|
|
|
$form_actions = array(); |
|
|
|
|