newsList.php 949 B

12345678910111213141516171819202122232425262728293031323334353637
  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. if(isset($_GET['start']))
  14. {
  15. $start = (int)$_GET['start'];
  16. }
  17. else
  18. {
  19. $start = 0;
  20. }
  21. if (isset($_user['user_id']))
  22. {
  23. $visibility = api_is_allowed_to_create_course() ? VISIBLE_TEACHER : VISIBLE_STUDENT;
  24. SystemAnnouncementManager :: display_all_announcements($visibility, $announcement, $start, $_user['user_id']);
  25. }
  26. else
  27. {
  28. SystemAnnouncementManager :: display_all_announcements(VISIBLE_GUEST, $announcement, $start);
  29. }
  30. Display::display_footer();
  31. ?>