courseLog.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. use ChamiloSession as Session;
  4. /**
  5. * @package chamilo.tracking
  6. */
  7. $pathopen = isset($_REQUEST['pathopen']) ? $_REQUEST['pathopen'] : null;
  8. ////require_once '../inc/global.inc.php';
  9. $current_course_tool = TOOL_TRACKING;
  10. $courseInfo = api_get_course_info(api_get_course_id());
  11. $courseCode = $courseInfo['code'];
  12. $from_myspace = false;
  13. $from = isset($_GET['from']) ? $_GET['from'] : null;
  14. // Starting the output buffering when we are exporting the information.
  15. $export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
  16. $session_id = isset($_REQUEST['id_session']) ? intval($_REQUEST['id_session']) : 0;
  17. if ($from == 'myspace') {
  18. $from_myspace = true;
  19. $this_section = "session_my_space";
  20. } else {
  21. $this_section = SECTION_COURSES;
  22. }
  23. // Access restrictions.
  24. $is_allowedToTrack =
  25. api_is_platform_admin() ||
  26. api_is_allowed_to_create_course() ||
  27. api_is_session_admin() ||
  28. api_is_drh() ||
  29. api_is_course_tutor() ||
  30. api_is_course_admin();
  31. if (!$is_allowedToTrack) {
  32. api_not_allowed(true);
  33. exit;
  34. }
  35. // If the user is a HR director (drh)
  36. if (api_is_drh()) {
  37. // Blocking course for drh
  38. if (api_drh_can_access_all_session_content()) {
  39. // If the drh has been configured to be allowed to see all session content, give him access to the session courses
  40. $coursesFromSession = SessionManager::getAllCoursesFollowedByUser(api_get_user_id(), null);
  41. $coursesFromSessionCodeList = array();
  42. if (!empty($coursesFromSession)) {
  43. foreach ($coursesFromSession as $course) {
  44. $coursesFromSessionCodeList[$course['code']] = $course['code'];
  45. }
  46. }
  47. $coursesFollowedList = CourseManager::get_courses_followed_by_drh(api_get_user_id());
  48. if (!empty($coursesFollowedList)) {
  49. $coursesFollowedList = array_keys($coursesFollowedList);
  50. }
  51. if (!in_array($courseCode, $coursesFollowedList)) {
  52. if (!in_array($courseCode, $coursesFromSessionCodeList)) {
  53. api_not_allowed();
  54. }
  55. }
  56. } else {
  57. // If the drh has *not* been configured to be allowed to see all session content,
  58. // then check if he has also been given access to the corresponding courses
  59. $coursesFollowedList = CourseManager::get_courses_followed_by_drh(api_get_user_id());
  60. $coursesFollowedList = array_keys($coursesFollowedList);
  61. if (!in_array(api_get_course_id(), $coursesFollowedList)) {
  62. api_not_allowed(true);
  63. exit;
  64. }
  65. }
  66. }
  67. if ($export_csv) {
  68. if (!empty($session_id)) {
  69. Session::write('id_session', $session_id);
  70. }
  71. ob_start();
  72. }
  73. $columnsToHideFromSetting = api_get_configuration_value('course_log_hide_columns');
  74. $columnsToHide = empty($columnsToHideFromSetting) ? array(0, 8, 9, 10, 11) : $columnsToHideFromSetting;
  75. $columnsToHide = json_encode($columnsToHide);
  76. $csv_content = array();
  77. // Scripts for reporting array hide/show columns
  78. $js = "<script>
  79. // hide column and display the button to unhide it
  80. function foldup(in_id) {
  81. $('#reporting_table .data_table tr td:nth-child(' + (in_id + 1) + ')').toggleClass('hide');
  82. $('#reporting_table .data_table tr th:nth-child(' + (in_id + 1) + ')').toggleClass('hide');
  83. $('div#unhideButtons a:nth-child(' + (in_id + 1) + ')').toggleClass('hide');
  84. }
  85. // add the red cross on top of each column
  86. function init_hide() {
  87. $('#reporting_table .data_table tr th').each(
  88. function(index) {
  89. $(this).prepend(
  90. '<div style=\"cursor:pointer\" onclick=\"foldup(' + index + ')\">" . Display::return_icon(
  91. 'visible.png',
  92. get_lang('HideColumn'),
  93. array('align' => 'absmiddle', 'hspace' => '3px'),
  94. ICON_SIZE_SMALL
  95. ) . "</div>'
  96. );
  97. }
  98. );
  99. }
  100. // hide some column at startup
  101. // be sure that these columns always exists
  102. // see headers = array();
  103. // tab of header texts
  104. $(document).ready( function() {
  105. init_hide();
  106. var columnsToHide = ".$columnsToHide.";
  107. columnsToHide.forEach(function(id) {
  108. foldup(id);
  109. });
  110. })
  111. </script>";
  112. $htmlHeadXtra[] = "<style type='text/css'>
  113. .secLine {background-color : #E6E6E6;}
  114. .content {padding-left : 15px;padding-right : 15px; }
  115. .specialLink{color : #0000FF;}
  116. div#reporting_table table th {
  117. vertical-align:top;
  118. }
  119. </style>";
  120. $htmlHeadXtra[] .= $js;
  121. // Database table definitions.
  122. //@todo remove this calls
  123. $TABLETRACK_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LASTACCESS);
  124. $TABLETRACK_LINKS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LINKS);
  125. $TABLETRACK_DOWNLOADS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_DOWNLOADS);
  126. $TABLETRACK_ACCESS_2 = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS);
  127. $TABLETRACK_EXERCISES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
  128. $TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER);
  129. $TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE);
  130. $table_user = Database::get_main_table(TABLE_MAIN_USER);
  131. $TABLEQUIZ = Database::get_course_table(TABLE_QUIZ_TEST);
  132. $sessionId = api_get_session_id();
  133. // Breadcrumbs.
  134. if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') {
  135. $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin'));
  136. $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList'));
  137. $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.$sessionId, 'name' => get_lang('SessionOverview'));
  138. }
  139. $view = isset($_REQUEST['view']) ? $_REQUEST['view'] : '';
  140. $nameTools = get_lang('Tracking');
  141. // getting all the students of the course
  142. if (empty($session_id)) {
  143. // Registered students in a course outside session.
  144. $a_students = CourseManager::get_student_list_from_course_code(
  145. api_get_course_id()
  146. );
  147. } else {
  148. // Registered students in session.
  149. $a_students = CourseManager::get_student_list_from_course_code(
  150. api_get_course_id(),
  151. true,
  152. $sessionId
  153. );
  154. }
  155. $nbStudents = count($a_students);
  156. $extra_info = array();
  157. // Getting all the additional information of an additional profile field.
  158. if (isset($_GET['additional_profile_field']) &&
  159. is_numeric($_GET['additional_profile_field'])
  160. ) {
  161. $user_array = array();
  162. foreach ($a_students as $key => $item) {
  163. $user_array[] = $key;
  164. }
  165. // Fetching only the user that are loaded NOT ALL user in the portal.
  166. $additional_user_profile_info = TrackingCourseLog::get_addtional_profile_information_of_field_by_user(
  167. $_GET['additional_profile_field'],
  168. $user_array
  169. );
  170. $extra_info = UserManager::get_extra_field_information(
  171. $_GET['additional_profile_field']
  172. );
  173. }
  174. // Display the header.
  175. Display::display_header($nameTools, 'Tracking');
  176. /* MAIN CODE */
  177. $actionsLeft = Display::return_icon('user_na.png', get_lang('StudentsTracking'), array(), ICON_SIZE_MEDIUM);
  178. $actionsLeft .= Display::url(
  179. Display::return_icon('group.png', get_lang('GroupReporting'), array(), ICON_SIZE_MEDIUM),
  180. 'course_log_groups.php?'.api_get_cidreq()
  181. );
  182. $actionsLeft .= Display::url(
  183. Display::return_icon('course.png', get_lang('CourseTracking'), array(), ICON_SIZE_MEDIUM),
  184. 'course_log_tools.php?'.api_get_cidreq()
  185. );
  186. $actionsLeft .= Display::url(
  187. Display::return_icon('tools.png', get_lang('ResourcesTracking'), array(), ICON_SIZE_MEDIUM),
  188. 'course_log_resources.php?'.api_get_cidreq()
  189. );
  190. $actionsLeft .= Display::url(
  191. Display::return_icon('quiz.png', get_lang('ExamTracking'), array(), ICON_SIZE_MEDIUM),
  192. api_get_path(WEB_CODE_PATH).'tracking/exams.php?'.api_get_cidreq()
  193. );
  194. if (!empty($sessionId)) {
  195. $actionsLeft .= Display::url(
  196. Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM),
  197. api_get_path(WEB_CODE_PATH) . 'attendance/index.php?' . api_get_cidreq() . '&action=calendar_logins'
  198. );
  199. }
  200. $actionsRight = '<div class="pull-right">';
  201. $actionsRight .= '<a href="javascript: void(0);" onclick="javascript: window.print();">'.
  202. Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
  203. $addional_param = '';
  204. if (isset($_GET['additional_profile_field'])) {
  205. $addional_param ='additional_profile_field='.intval($_GET['additional_profile_field']);
  206. }
  207. $users_tracking_per_page = '';
  208. if (isset($_GET['users_tracking_per_page'])) {
  209. $users_tracking_per_page= '&users_tracking_per_page='.intval($_GET['users_tracking_per_page']);
  210. }
  211. $actionsRight .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv&'.$addional_param.$users_tracking_per_page.'">
  212. '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>';
  213. $actionsRight .= '</div>';
  214. // Create a search-box.
  215. $form_search = new FormValidator(
  216. 'search_simple',
  217. 'GET',
  218. api_get_path(WEB_CODE_PATH).'tracking/courseLog.php?'.api_get_cidreq(),
  219. '',
  220. array(),
  221. FormValidator::LAYOUT_INLINE
  222. );
  223. $form_search->addElement('hidden', 'from', Security::remove_XSS($from));
  224. $form_search->addElement('hidden', 'session_id', $sessionId);
  225. $form_search->addElement('hidden', 'id_session', $sessionId);
  226. $form_search->addElement('text', 'user_keyword');
  227. $form_search->addButtonSearch(get_lang('SearchUsers'));
  228. echo Display::toolbarAction('toolbar-courselog', array( 0 => $actionsLeft, 1 => $form_search->returnForm(), 2 => $actionsRight ), 3);
  229. $course_name = get_lang('Course').' '.$courseInfo['name'];
  230. if ($session_id) {
  231. $titleSession = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.api_get_session_name($session_id);
  232. $titleCourse = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name;
  233. } else {
  234. $titleSession = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$courseInfo['name'];
  235. }
  236. $teacherList = CourseManager::getTeacherListFromCourseToString(
  237. $courseInfo['real_id'],
  238. ',',
  239. false,
  240. true
  241. );
  242. $coaches = null;
  243. if (!empty($session_id)) {
  244. $coaches = CourseManager::get_coachs_from_course_to_string(
  245. $session_id,
  246. $courseInfo['real_id'],
  247. ',',
  248. false,
  249. true
  250. );
  251. }
  252. $html = '';
  253. if (!empty($teacherList)) {
  254. $html .= Display::page_subheader2(get_lang('Teachers'));
  255. $html .= $teacherList;
  256. }
  257. if (!empty($coaches)) {
  258. $html .= Display::page_subheader2(get_lang('Coaches'));
  259. $html .= $coaches;
  260. }
  261. $sessionList = SessionManager::get_session_by_course($courseInfo['real_id']);
  262. if (!empty($sessionList)) {
  263. $html .= Display::page_subheader2(get_lang('SessionList'));
  264. $iconCourse = Display::return_icon('course.png', null, null, ICON_SIZE_TINY);
  265. $html .= '<ul class="session-list">';
  266. foreach ($sessionList as $session) {
  267. $url = api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id'].'&cidReq='.$courseInfo['code'];
  268. $html .= Display::tag('li', $iconCourse . ' ' . Display::url($session['name'], $url));
  269. }
  270. $html .= '</ul>';
  271. }
  272. $html .= Display::page_subheader2(get_lang('StudentList'));
  273. // PERSON_NAME_DATA_EXPORT is buggy
  274. $is_western_name_order = api_is_western_name_order();
  275. if (count($a_students) > 0) {
  276. $getLangXDays = get_lang('XDays');
  277. $form = new FormValidator(
  278. 'reminder_form',
  279. 'get',
  280. api_get_path(WEB_CODE_PATH).'announcements/announcements.php?' . api_get_cidreq(),
  281. null,
  282. ['style' => 'margin-bottom: 10px'],
  283. FormValidator::LAYOUT_INLINE
  284. );
  285. $options = array (
  286. 2 => sprintf($getLangXDays, 2),
  287. 3 => sprintf($getLangXDays, 3),
  288. 4 => sprintf($getLangXDays, 4),
  289. 5 => sprintf($getLangXDays, 5),
  290. 6 => sprintf($getLangXDays, 6),
  291. 7 => sprintf($getLangXDays, 7),
  292. 15 => sprintf($getLangXDays, 15),
  293. 30 => sprintf($getLangXDays, 30),
  294. 'never' => get_lang('Never')
  295. );
  296. $el = $form->addSelect(
  297. 'since',
  298. Display::returnFontAwesomeIcon('warning') . get_lang('RemindInactivesLearnersSince'),
  299. $options,
  300. ['class' => 'col-sm-3']
  301. );
  302. $el->setSelected(7);
  303. $form->addElement('hidden', 'action', 'add');
  304. $form->addElement('hidden', 'remindallinactives', 'true');
  305. $form->addElement('hidden', 'cidReq', $courseInfo['code']);
  306. $form->addElement('hidden', 'id_session', api_get_session_id());
  307. $form->addButtonSend(get_lang('SendNotification'));
  308. $extra_field_select = TrackingCourseLog::display_additional_profile_fields();
  309. if (!empty($extra_field_select)) {
  310. $html .= $extra_field_select;
  311. }
  312. $html .= $form->return_form();
  313. if ($export_csv) {
  314. $csv_content = array();
  315. //override the SortableTable "per page" limit if CSV
  316. $_GET['users_tracking_per_page'] = 1000000;
  317. }
  318. $all_datas = array();
  319. $course_code = $_course['id'];
  320. $user_ids = array_keys($a_students);
  321. $table = new SortableTable(
  322. 'users_tracking',
  323. array('TrackingCourseLog', 'get_number_of_users'),
  324. array('TrackingCourseLog', 'get_user_data'),
  325. (api_is_western_name_order() xor api_sort_by_first_name()) ? 3 : 2);
  326. $parameters['cidReq'] = Security::remove_XSS($_GET['cidReq']);
  327. $parameters['id_session'] = $session_id;
  328. $parameters['from'] = isset($_GET['myspace']) ? Security::remove_XSS($_GET['myspace']) : null;
  329. $table->set_additional_parameters($parameters);
  330. $headers = array();
  331. // tab of header texts
  332. $table->set_header(0, get_lang('OfficialCode'), true);
  333. $headers['official_code'] = get_lang('OfficialCode');
  334. if ($is_western_name_order) {
  335. $table->set_header(1, get_lang('FirstName'), true);
  336. $headers['firstname'] = get_lang('FirstName');
  337. $table->set_header(2, get_lang('LastName'), true);
  338. $headers['lastname'] = get_lang('LastName');
  339. } else {
  340. $table->set_header(1, get_lang('LastName'), true);
  341. $headers['lastname'] = get_lang('LastName');
  342. $table->set_header(2, get_lang('FirstName'), true);
  343. $headers['firstname'] = get_lang('FirstName');
  344. }
  345. $table->set_header(3, get_lang('Login'), false);
  346. $headers['login'] = get_lang('Login');
  347. $table->set_header(4, get_lang('TrainingTime').'&nbsp;'.
  348. Display::return_icon('info3.gif', get_lang('CourseTimeInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
  349. $headers['training_time'] = get_lang('TrainingTime');
  350. $table->set_header(5, get_lang('CourseProgress').'&nbsp;'.
  351. Display::return_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
  352. $headers['course_progress'] = get_lang('CourseProgress');
  353. $table->set_header(6, get_lang('ExerciseProgress').'&nbsp;'.
  354. Display::return_icon('info3.gif', get_lang('ExerciseProgressInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
  355. $headers['exercise_progress'] = get_lang('ExerciseProgress');
  356. $table->set_header(7, get_lang('ExerciseAverage').'&nbsp;'.
  357. Display::return_icon('info3.gif', get_lang('ExerciseAverageInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
  358. $headers['exercise_average'] = get_lang('ExerciseAverage');
  359. $table->set_header(8, get_lang('Score').'&nbsp;'.
  360. Display::return_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
  361. $headers['score'] = get_lang('Score');
  362. $table->set_header(9, get_lang('Student_publication'), false);
  363. $headers['student_publication'] = get_lang('Student_publication');
  364. $table->set_header(10, get_lang('Messages'), false);
  365. $headers['messages'] = get_lang('Messages');
  366. $table->set_header(11, get_lang('Classes'));
  367. $headers['clasess'] = get_lang('Classes');
  368. if (empty($session_id)) {
  369. $table->set_header(12, get_lang('Survey'), false);
  370. $headers['survey'] = get_lang('Survey');
  371. $table->set_header(13, get_lang('FirstLoginInCourse'), false);
  372. $headers['first_login'] = get_lang('FirstLoginInCourse');
  373. $table->set_header(14, get_lang('LatestLoginInCourse'), false);
  374. $headers['latest_login'] = get_lang('LatestLoginInCourse');
  375. if (isset($_GET['additional_profile_field']) and is_numeric($_GET['additional_profile_field'])) {
  376. $table->set_header(15, $extra_info['display_text'], false);
  377. $headers['display_text'] = $extra_info['display_text'];
  378. $table->set_header(16, get_lang('Details'), false);
  379. $headers['details'] = get_lang('Details');
  380. } else {
  381. $table->set_header(15, get_lang('Details'), false);
  382. $headers['details'] = get_lang('Details');
  383. }
  384. } else {
  385. $table->set_header(12, get_lang('FirstLoginInCourse'), false);
  386. $headers['first_login'] = get_lang('FirstLoginInCourse');
  387. $table->set_header(13, get_lang('LatestLoginInCourse'), false);
  388. $headers['latest_login'] = get_lang('LatestLoginInCourse');
  389. if (isset($_GET['additional_profile_field']) and is_numeric($_GET['additional_profile_field'])) {
  390. $table->set_header(14, $extra_info['display_text'], false);
  391. $headers['display_text'] = $extra_info['display_text'];
  392. $table->set_header(15, get_lang('Details'), false);
  393. $headers['Details'] = get_lang('Details');
  394. } else {
  395. $table->set_header(14, get_lang('Details'), false);
  396. $headers['Details'] = get_lang('Details');
  397. }
  398. }
  399. // display buttons to un hide hidden columns
  400. $html .= '<div id="unhideButtons" class="btn-toolbar">';
  401. $index = 0;
  402. $getLangDisplayColumn = get_lang('DisplayColumn');
  403. foreach ($headers as $header) {
  404. $html .= Display::toolbarButton(
  405. $header,
  406. '#',
  407. 'arrow-right',
  408. 'default',
  409. [
  410. 'title' => htmlentities("$getLangDisplayColumn \"$header\"", ENT_QUOTES),
  411. 'class' => 'hide',
  412. 'onclick' => "foldup($index); return false;"
  413. ]
  414. );
  415. $index++;
  416. }
  417. $html .= "</div>";
  418. // Display the table
  419. $html .= "<div id='reporting_table'>";
  420. $html .= $table->return_table();
  421. $html .= "</div>";
  422. } else {
  423. $html .= Display::display_warning_message(get_lang('NoUsersInCourse'), true, true);
  424. }
  425. echo Display::panel($html, $titleSession);
  426. // Send the csv file if asked.
  427. if ($export_csv) {
  428. $csv_headers = array();
  429. $csv_headers[] = get_lang('OfficialCode', '');
  430. if ($is_western_name_order) {
  431. $csv_headers[] = get_lang('FirstName', '');
  432. $csv_headers[] = get_lang('LastName', '');
  433. } else {
  434. $csv_headers[] = get_lang('LastName', '');
  435. $csv_headers[] = get_lang('FirstName', '');
  436. }
  437. $csv_headers[] = get_lang('Login', ''); //
  438. $csv_headers[] = get_lang('TrainingTime', '');
  439. $csv_headers[] = get_lang('CourseProgress', '');
  440. $csv_headers[] = get_lang('ExerciseProgress', '');
  441. $csv_headers[] = get_lang('ExerciseAverage', '');
  442. $csv_headers[] = get_lang('Score', '');
  443. $csv_headers[] = get_lang('Student_publication', '');
  444. $csv_headers[] = get_lang('Messages', '');
  445. if (empty($session_id)) {
  446. $csv_headers[] = get_lang('Survey');
  447. }
  448. $csv_headers[] = get_lang('FirstLoginInCourse', '');
  449. $csv_headers[] = get_lang('LatestLoginInCourse', '');
  450. if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) {
  451. $csv_headers[] = $extra_info['display_text'];
  452. }
  453. ob_end_clean();
  454. array_unshift($csv_content, $csv_headers); // Adding headers before the content.
  455. Export::arrayToCsv($csv_content, 'reporting_student_list');
  456. exit;
  457. }
  458. Display::display_footer();