admin_view.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. case 'accessoverview':
  46. $courseId = isset($_GET['course_id']) ? intval($_GET['course_id']) : 0;
  47. $sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0;
  48. $studentId = isset($_GET['student_id']) ? intval($_GET['student_id']) : 0;
  49. MySpace::displayTrackingAccessOverView($courseId, $sessionId, $studentId);
  50. break;
  51. }
  52. Display::display_footer();