news_list.php 934 B

12345678910111213141516171819202122232425
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. // name of the language file that needs to be included
  4. $language_file = array ('admin','courses', 'index');
  5. // including necessary files
  6. require_once 'main/inc/global.inc.php';
  7. require_once api_get_path(LIBRARY_PATH).'system_announcements.lib.php';
  8. $tool_name = get_lang('SystemAnnouncements');
  9. $actions = '';
  10. if (api_is_platform_admin()) {
  11. $actions .= '<a href="'.api_get_path(WEB_PATH).'main/admin/system_announcements.php">'.Display::return_icon('edit.png', get_lang('EditSystemAnnouncement'), array(), 32).'</a>';
  12. }
  13. $visibility = api_is_allowed_to_create_course() ? VISIBLE_TEACHER : VISIBLE_STUDENT;
  14. $content = SystemAnnouncementManager ::display_announcements_slider($visibility, $_GET['id']);
  15. $tpl = new Template($tool_name);
  16. $tpl->assign('actions', $actions);
  17. //$tpl->assign('message', $message);
  18. $tpl->assign('content', $content);
  19. $tpl->display_one_col_template();