admin_view.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. $cidReset = true;
  4. require_once '../inc/global.inc.php';
  5. $exportCSV = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
  6. $display = isset($_GET['display']) ? Security::remove_XSS($_GET['display']) : null;
  7. $htmlHeadXtra[] = api_get_jqgrid_js();
  8. // the section (for the tabs)
  9. $this_section = SECTION_TRACKING;
  10. $csv_content = array();
  11. $nameTools = get_lang('MySpace');
  12. $is_platform_admin = api_is_platform_admin();
  13. $is_drh = api_is_drh();
  14. $is_session_admin = api_is_session_admin();
  15. if ($exportCSV) {
  16. if ($display == 'user') {
  17. MySpace::export_tracking_user_overview();
  18. exit;
  19. } elseif ($display == 'session') {
  20. MySpace::export_tracking_session_overview();
  21. exit;
  22. } elseif ($display == 'course') {
  23. MySpace::export_tracking_course_overview();
  24. exit;
  25. }
  26. }
  27. Display :: display_header($nameTools);
  28. echo '<div class="actions">';
  29. echo MySpace::getTopMenu();
  30. echo '</div>';
  31. echo MySpace::getAdminActions();
  32. switch ($display) {
  33. case 'coaches':
  34. MySpace::display_tracking_coach_overview($exportCSV);
  35. break;
  36. case 'user':
  37. MySpace::display_tracking_user_overview();
  38. break;
  39. case 'session':
  40. MySpace::display_tracking_session_overview();
  41. break;
  42. case 'course':
  43. MySpace::display_tracking_course_overview();
  44. break;
  45. }
  46. Display::display_footer();