lp_tracking.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. /*
  3. * Created on 26 mars 07 by Eric Marguin
  4. *
  5. * Script to display the tracking of the students in the learning paths.
  6. */
  7. $language_file = array ('registration', 'index', 'tracking', 'exercice', 'scorm');
  8. $cidReset = true;
  9. include ('../inc/global.inc.php');
  10. include_once(api_get_path(LIBRARY_PATH).'tracking.lib.php');
  11. include_once(api_get_path(LIBRARY_PATH).'export.lib.inc.php');
  12. include_once(api_get_path(LIBRARY_PATH).'course.lib.php');
  13. include_once('../newscorm/learnpath.class.php');
  14. include_once('../newscorm/learnpathItem.class.php');
  15. if(!CourseManager :: is_course_teacher($_user['user_id'], $_GET['course']) && !Tracking :: is_allowed_to_coach_student($_user['user_id'],$_GET['student_id']))
  16. {
  17. Display::display_header('');
  18. api_not_allowed();
  19. Display::display_footer();
  20. }
  21. $_course = CourseManager :: get_course_information($_GET['course']);
  22. $_course['dbNameGlu'] = $_configuration['table_prefix'] . $_course['db_name'] . $_configuration['db_glue'];
  23. $cidReq = $_GET['course'];
  24. if(!empty($_GET['origin']) && $_GET['origin'] == 'user_course')
  25. {
  26. $interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$_course['directory'], 'name' => $_course['title']);
  27. $interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".$_GET['course'], "name" => get_lang("Users"));
  28. }
  29. else if(!empty($_GET['origin']) && $_GET['origin'] == 'tracking_course')
  30. {
  31. $interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$_course['directory'], 'name' => $_course['title']);
  32. $interbreadcrumb[] = array ("url" => "../tracking/courseLog.php?cidReq=".$_GET['course'].'&studentlist=true', "name" => get_lang("Tracking"));
  33. }
  34. else
  35. {
  36. $interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
  37. $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents"));
  38. $interbreadcrumb[] = array ("url" => "myStudents.php?student=".$_GET['student_id'], "name" => get_lang("StudentDetails"));
  39. $nameTools=get_lang("DetailsStudentInCourse");
  40. }
  41. $interbreadcrumb[] = array("url" => "myStudents.php?student=".$_GET['student_id']."&course=".$_GET['course']."&details=true" , "name" => get_lang("StudentDetails"));
  42. $nameTools = get_lang('LearningPathDetails');
  43. $htmlHeadXtra[] = '
  44. <style>
  45. div.title {
  46. font-weight : bold;
  47. text-align : left;
  48. }
  49. div.mystatusfirstrow {
  50. font-weight : bold;
  51. text-align : left;
  52. }
  53. div.description {
  54. font-family : Arial, Helvetica, sans-serif;
  55. font-size: 10px;
  56. color: Silver;
  57. }
  58. .data_table
  59. {
  60. border-collapse: collapse;
  61. }
  62. .data_table th{
  63. padding-right: 0px;
  64. border: 1px solid gray;
  65. background-color: #eef;
  66. }
  67. .data_table tr.row_odd
  68. {
  69. background-color: #fafafa;
  70. }
  71. .data_table tr.row_odd:hover, .data_table tr.row_even:hover
  72. {
  73. background-color: #f0f0f0;
  74. }
  75. .data_table tr.row_even
  76. {
  77. background-color: #fff;
  78. }
  79. .data_table td
  80. {
  81. padding: 5px;
  82. vertical-align: top;
  83. border-bottom: 1px solid #b1b1b1;
  84. border-right: 1px dotted #e1e1e1;
  85. border-left: 1px dotted #e1e1e1;
  86. }
  87. .margin_table
  88. {
  89. margin-left : 3px;
  90. width: 80%;
  91. }
  92. .margin_table td.title
  93. {
  94. background-color: #ffff99;
  95. }
  96. .margin_table td.content
  97. {
  98. background-color: #ddddff;
  99. }
  100. </style>';
  101. Display :: display_header($nameTools);
  102. $user_id = intval($_GET['student_id']);
  103. $lp_id = intval($_GET['lp_id']);
  104. $list = learnpath :: get_flat_ordered_items_list($lp_id);
  105. $origin = 'tracking';
  106. include_once('../newscorm/lp_stats.php');
  107. Display :: display_footer();
  108. ?>