newsList.php 913 B

1234567891011121314151617181920212223242526
  1. <?php
  2. // @todo Add dokeos header here
  3. /*
  4. * Created on 30 mai 2006 by Elixir Interactive http://www.elixir-interactive.com
  5. */
  6. // name of the language file that needs to be included
  7. $language_file = array ('courses', 'index');
  8. // including necessary files
  9. include_once 'main/inc/global.inc.php';
  10. include_once api_get_path(LIBRARY_PATH).'system_announcements.lib.php';
  11. $tool_name = get_lang("SystemAnnouncements");
  12. Display::display_header($tool_name);
  13. $start = isset($_GET['start']) ? (int)$_GET['start'] : $start = 0;
  14. if (isset($_user['user_id'])) {
  15. $visibility = api_is_allowed_to_create_course() ? VISIBLE_TEACHER : VISIBLE_STUDENT;
  16. SystemAnnouncementManager :: display_all_announcements($visibility, $announcement, $start, $_user['user_id']);
  17. } else {
  18. SystemAnnouncementManager :: display_all_announcements(VISIBLE_GUEST, $announcement, $start);
  19. }
  20. Display::display_footer();