courseLog.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  1. <?php
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004 Dokeos S.A.
  6. Copyright (c) 2003 Ghent University (UGent)
  7. Copyright (c) 2001 Universite catholique de Louvain (UCL)
  8. For a full list of contributors, see "credits.txt".
  9. The full license can be read in "license.txt".
  10. This program is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU General Public License
  12. as published by the Free Software Foundation; either version 2
  13. of the License, or (at your option) any later version.
  14. See the GNU General Public License for more details.
  15. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  16. Mail: info@dokeos.com
  17. ==============================================================================
  18. */
  19. /**
  20. ==============================================================================
  21. * @author Thomas Depraetere
  22. * @author Hugues Peeters
  23. * @author Christophe Gesche
  24. * @author Sebastien Piraux
  25. * @author Toon Keppens (Vi-Host.net)
  26. *
  27. * @package dokeos.tracking
  28. ==============================================================================
  29. */
  30. /*
  31. ==============================================================================
  32. INIT SECTION
  33. ==============================================================================
  34. */
  35. $pathopen = isset($_REQUEST['pathopen']) ? $_REQUEST['pathopen'] : null;
  36. // name of the language file that needs to be included
  37. $language_file[] = 'tracking';
  38. $language_file[] = 'scorm';
  39. include('../inc/global.inc.php');
  40. $is_allowedToTrack = $is_courseAdmin || $is_platformAdmin || $is_courseCoach;
  41. if(!$is_allowedToTrack)
  42. {
  43. Display :: display_header();
  44. api_not_allowed();
  45. Display :: display_footer();
  46. }
  47. //includes for SCORM and LP
  48. require_once('../newscorm/learnpath.class.php');
  49. require_once('../newscorm/learnpathItem.class.php');
  50. require_once('../newscorm/learnpathList.class.php');
  51. require_once('../newscorm/scorm.class.php');
  52. require_once('../newscorm/scormItem.class.php');
  53. require_once(api_get_path(LIBRARY_PATH).'tracking.lib.php');
  54. require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
  55. require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
  56. require_once (api_get_path(LIBRARY_PATH).'export.lib.inc.php');
  57. require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
  58. $export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
  59. if($export_csv)
  60. {
  61. ob_start();
  62. }
  63. $csv_content = array();
  64. // charset determination
  65. if ($_GET['scormcontopen'])
  66. {
  67. $tbl_lp = Database::get_course_table('lp');
  68. $contopen = (int) $_GET['scormcontopen'];
  69. $sql = "SELECT default_encoding FROM $tbl_lp WHERE id = ".$contopen;
  70. $res = api_sql_query($sql,__FILE__,__LINE__);
  71. $row = Database::fetch_array($res);
  72. $lp_charset = $row['default_encoding'];
  73. //header('Content-Type: text/html; charset='. $row['default_encoding']);
  74. }
  75. $htmlHeadXtra[] = "<style type='text/css'>
  76. /*<![CDATA[*/
  77. .secLine {background-color : #E6E6E6;}
  78. .content {padding-left : 15px;padding-right : 15px; }
  79. .specialLink{color : #0000FF;}
  80. /*]]>*/
  81. </style>
  82. <style media='print' type='text/css'>
  83. </style>";
  84. /*
  85. -----------------------------------------------------------
  86. Constants and variables
  87. -----------------------------------------------------------
  88. */
  89. // regroup table names for maintenance purpose
  90. $TABLETRACK_ACCESS = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_LASTACCESS);
  91. $TABLETRACK_LINKS = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_LINKS);
  92. $TABLETRACK_DOWNLOADS = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_DOWNLOADS);
  93. $TABLETRACK_ACCESS_2 = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ACCESS);
  94. $TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER);
  95. $TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE);
  96. $TABLECOURSE_LINKS = Database::get_course_table(TABLE_LINK);
  97. $table_user = Database::get_main_table(TABLE_MAIN_USER);
  98. //$table_scormdata = Database::get_scorm_table(TABLE_SCORM_SCO_DATA);
  99. //$table_scormmain = Database::get_scorm_table(TABLE_SCORM_MAIN);
  100. //$tbl_learnpath_main = Database::get_course_table(TABLE_LEARNPATH_MAIN);
  101. //$tbl_learnpath_item = Database::get_course_table(TABLE_LEARNPATH_ITEM);
  102. //$tbl_learnpath_chapter = Database::get_course_table(TABLE_LEARNPATH_CHAPTER);
  103. $tbl_learnpath_main = Database::get_course_table(TABLE_LP_MAIN);
  104. $tbl_learnpath_item = Database::get_course_table(TABLE_LP_ITEM);
  105. $tbl_learnpath_view = Database::get_course_table(TABLE_LP_VIEW);
  106. $tbl_learnpath_item_view = Database::get_course_table(TABLE_LP_ITEM_VIEW);
  107. $view = $_REQUEST['view'];
  108. $nameTools = get_lang('Tracking');
  109. Display::display_header($nameTools, "Tracking");
  110. include(api_get_path(LIBRARY_PATH)."statsUtils.lib.inc.php");
  111. include("../resourcelinker/resourcelinker.inc.php");
  112. $a_students = CourseManager :: get_student_list_from_course_code($_course['id'], true, $_SESSION['id_session']);
  113. $nbStudents = count($a_students);
  114. /**
  115. * count the number of students in this course (used for SortableTable)
  116. */
  117. function count_student_in_course()
  118. {
  119. global $nbStudents;
  120. return $nbStudents;
  121. }
  122. function sort_users($a,$b){
  123. $a = trim(strtolower($a[$_SESSION['tracking_column']]));
  124. $b = trim(strtolower($b[$_SESSION['tracking_column']]));
  125. if($_SESSION['tracking_direction'] == 'DESC')
  126. return strcmp($b, $a);
  127. else
  128. return strcmp($a, $b);
  129. }
  130. /*
  131. ==============================================================================
  132. MAIN CODE
  133. ==============================================================================
  134. */
  135. if($_GET['studentlist'] == 'false')
  136. {
  137. echo '<div style="float:left; clear:left">
  138. <a href="courseLog.php?'.api_get_cidreq().'&studentlist=true">'.get_lang('StudentsTracking').'</a>&nbsp;|
  139. '.get_lang('CourseTracking').'
  140. </div>';
  141. }
  142. else
  143. {
  144. echo '<div style="float:left; clear:left">
  145. '.get_lang('StudentsTracking').' |
  146. <a href="courseLog.php?'.api_get_cidreq().'&studentlist=false">'.get_lang('CourseTracking').'</a>&nbsp;
  147. </div>';
  148. }
  149. echo '<div style="float:right; clear:right">';
  150. echo '&nbsp;<a href="#" onclick="window.print()"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>';
  151. if($_GET['studentlist'] == 'false'){
  152. echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv&studentlist=false"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a></div>';
  153. }
  154. else{
  155. echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a></div>';
  156. }
  157. echo '<div class="clear"></div>';
  158. if($_GET['studentlist'] == 'false')
  159. {
  160. echo'<br /><br />';
  161. /***************************
  162. * LEARNING PATHS
  163. ***************************/
  164. echo "<div class='admin_section'>
  165. <h4>
  166. <img src='../img/scormbuilder.gif' align='absbottom'>&nbsp;".get_lang('AverageProgressInLearnpath')."
  167. </h4>
  168. <table class='data_table'>";
  169. $list = new LearnpathList($student);
  170. $flat_list = $list->get_flat_list();
  171. if($export_csv){
  172. $temp=array(get_lang('AverageProgressInLearnpath'),'');
  173. $csv_content[] = array('','');
  174. $csv_content[] = $temp;
  175. }
  176. if(count($flat_list)>0)
  177. {
  178. foreach($flat_list as $lp_id => $lp)
  179. {
  180. $lp_avg_progress = 0;
  181. foreach($a_students as $student_id => $student)
  182. {
  183. // get the progress in learning pathes
  184. $lp_avg_progress += learnpath::get_db_progress($lp_id,$student_id);
  185. }
  186. if($nbStudents > 0)
  187. {
  188. $lp_avg_progress = $lp_avg_progress / $nbStudents;
  189. }
  190. echo '<tr><td>'.$lp['lp_name'].'</td><td align="right">'.round($lp_avg_progress,1).' %</td></tr>';
  191. if($export_csv){
  192. $temp=array($lp['lp_name'],$lp_avg_progress);
  193. $csv_content[] = $temp;
  194. }
  195. }
  196. }
  197. else
  198. {
  199. echo '<tr><td>'.get_lang('NoLearningPath').'</td></tr>';
  200. if($export_csv){
  201. $temp=array(get_lang('NoLearningPath'),'');
  202. $csv_content[] = $temp;
  203. }
  204. }
  205. echo '</table></div>';
  206. echo '<div class="clear"></div>';
  207. /***************************
  208. * EXERCICES
  209. ***************************/
  210. echo "<div class='admin_section'>
  211. <h4>
  212. <img src='../img/quiz.gif' align='absbottom'>&nbsp;".get_lang('AverageResultsToTheExercices')." <a href='../exercice/exercice.php?".api_get_cidreq()."&show=result'>".get_lang('SeeDetail')."</a>
  213. </h4>
  214. <table class='data_table'>";
  215. $sql = "SELECT id, title
  216. FROM ".Database :: get_course_table(TABLE_QUIZ_TEST);
  217. $rs = api_sql_query($sql, __FILE__, __LINE__);
  218. if($export_csv){
  219. $temp=array(get_lang('AverageProgressInLearnpath'),'');
  220. $csv_content[] = array('','');
  221. $csv_content[] = $temp;
  222. }
  223. if(mysql_num_rows($rs)>0)
  224. {
  225. while($quiz = mysql_fetch_array($rs))
  226. {
  227. $quiz_avg_score = 0;
  228. // get the progress in learning pathes
  229. $sql = 'SELECT exe_result , exe_weighting
  230. FROM '.Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES).'
  231. WHERE exe_exo_id = '.$quiz['id'].'
  232. ORDER BY exe_date DESC
  233. LIMIT 0, 1';
  234. $rsAttempt = api_sql_query($sql, __FILE__, __LINE__);
  235. $nb_attempts = 0;
  236. while($attempt = mysql_fetch_array($rsAttempt))
  237. {
  238. $nb_attempts++;
  239. $quiz_avg_score += $attempt['exe_result']/$attempt['exe_weighting']*100;
  240. }
  241. if($nb_attempts>0)
  242. $quiz_avg_score = $quiz_avg_score / $nb_attempts;
  243. echo '<tr><td>'.$quiz['title'].'</td><td align="right">'.round($quiz_avg_score,1).' %</td></tr>';
  244. if($export_csv){
  245. $temp=array($quiz['title'],$quiz_avg_score);
  246. $csv_content[] = $temp;
  247. }
  248. }
  249. }
  250. else
  251. {
  252. echo '<tr><td>'.get_lang('NoExercises').'</td></tr>';
  253. if($export_csv){
  254. $temp=array(get_lang('NoExercises'),'');
  255. $csv_content[] = $temp;
  256. }
  257. }
  258. echo '</table></div>';
  259. echo '<div class="clear"></div>';
  260. /**********************
  261. * TOOLS
  262. **********************/
  263. echo "<div class='admin_section'>
  264. <h4>
  265. <img src='../img/acces_tool.gif' align='absbottom'>&nbsp;".get_lang('ToolsMostUsed')."
  266. </h4>
  267. <table class='data_table'>";
  268. $sql = "SELECT `access_tool`, COUNT(DISTINCT `access_user_id`),count( `access_tool` ) as count_access_tool
  269. FROM $TABLETRACK_ACCESS
  270. WHERE `access_tool` IS NOT NULL
  271. AND `access_cours_code` = '$_cid'
  272. GROUP BY `access_tool`
  273. ORDER BY count_access_tool DESC
  274. LIMIT 0, 3";
  275. $rs = api_sql_query($sql, __FILE__, __LINE__);
  276. if($export_csv){
  277. $temp=array(get_lang('ToolsMostUsed'),'');
  278. $csv_content[] = $temp;
  279. }
  280. while ($row = mysql_fetch_array($rs))
  281. {
  282. echo ' <tr>
  283. <td>'.get_lang(ucfirst($row['access_tool'])).'</td>
  284. <td align="right">'.$row['count_access_tool'].' '.get_lang('Clicks').'</td>
  285. </tr>';
  286. if($export_csv){
  287. $temp=array(get_lang(ucfirst($row['access_tool'])),$row['count_access_tool'].' '.get_lang('Clicks'));
  288. $csv_content[] = $temp;
  289. }
  290. }
  291. echo '</table></div>';
  292. echo '<div class="clear"></div>';
  293. /***************************
  294. * DOCUMENTS
  295. ***************************/
  296. echo "<div class='admin_section'>
  297. <h4>
  298. <img src='../img/documents.gif' align='absbottom'>&nbsp;".get_lang('DocumentsMostDownloaded')."
  299. </h4>
  300. <table class='data_table'>";
  301. $sql = "SELECT `down_doc_path`, COUNT(DISTINCT `down_user_id`), COUNT(`down_doc_path`) as count_down
  302. FROM $TABLETRACK_DOWNLOADS
  303. WHERE `down_cours_id` = '$_cid'
  304. GROUP BY `down_doc_path`
  305. ORDER BY count_down DESC
  306. LIMIT 0, 3";
  307. $rs = api_sql_query($sql, __FILE__, __LINE__);
  308. if($export_csv){
  309. $temp=array(get_lang('DocumentsMostDownloaded'),'');
  310. $csv_content[] = array('','');
  311. $csv_content[] = $temp;
  312. }
  313. if(mysql_num_rows($rs)>0)
  314. {
  315. while($row = mysql_fetch_array($rs))
  316. {
  317. echo ' <tr>
  318. <td>'.$row['down_doc_path'].'</td>
  319. <td align="right">'.$row['count_down'].' '.get_lang('Clicks').'</td>
  320. </tr>';
  321. if($export_csv){
  322. $temp=array($row['down_doc_path'],$row['count_down'].' '.get_lang('Clicks'));
  323. $csv_content[] = $temp;
  324. }
  325. }
  326. }
  327. else
  328. {
  329. echo '<tr><td>'.get_lang('NoDocumentDownloaded').'</td></tr>';
  330. if($export_csv){
  331. $temp=array(get_lang('NoDocumentDownloaded'),'');
  332. $csv_content[] = $temp;
  333. }
  334. }
  335. echo '</table></div>';
  336. echo '<div class="clear"></div>';
  337. /***************************
  338. * LINKS
  339. ***************************/
  340. echo "<div class='admin_section'>
  341. <h4>
  342. <img src='../img/link.gif' align='absbottom'>&nbsp;".get_lang('LinksMostClicked')."
  343. </h4>
  344. <table class='data_table'>";
  345. $sql = "SELECT `cl`.`title`, `cl`.`url`,count(DISTINCT `sl`.`links_user_id`), count(`cl`.`title`) as count_visits
  346. FROM $TABLETRACK_LINKS AS sl, $TABLECOURSE_LINKS AS cl
  347. WHERE `sl`.`links_link_id` = `cl`.`id`
  348. AND `sl`.`links_cours_id` = '$_cid'
  349. GROUP BY `cl`.`title`, `cl`.`url`
  350. ORDER BY count_visits DESC
  351. LIMIT 0, 3";
  352. $rs = api_sql_query($sql, __FILE__, __LINE__);
  353. if($export_csv){
  354. $temp=array(get_lang('LinksMostClicked'),'');
  355. $csv_content[] = array('','');
  356. $csv_content[] = $temp;
  357. }
  358. if(mysql_num_rows($rs)>0)
  359. {
  360. while($row = mysql_fetch_array($rs))
  361. {
  362. echo ' <tr>
  363. <td>'.$row['title'].'</td>
  364. <td align="right">'.$row['count_visits'].' '.get_lang('Clicks').'</td>
  365. </tr>';
  366. if($export_csv){
  367. $temp=array($row['title'],$row['count_visits'].' '.get_lang('Clicks'));
  368. $csv_content[] = $temp;
  369. }
  370. }
  371. }
  372. else
  373. {
  374. echo '<tr><td>'.get_lang('NoLinkVisited').'</td></tr>';
  375. if($export_csv){
  376. $temp=array(get_lang('NoLinkVisited'),'');
  377. $csv_content[] = $temp;
  378. }
  379. }
  380. echo '</table></div>';
  381. echo '<div class="clear"></div>';
  382. // send the csv file if asked
  383. if($export_csv)
  384. {
  385. ob_end_clean();
  386. Export :: export_table_csv($csv_content, 'reporting_course_tracking');
  387. }
  388. }
  389. // else display student list with all the informations
  390. else {
  391. // BEGIN : form to remind inactives susers
  392. $form = new FormValidator('reminder_form','get',api_get_path(REL_CODE_PATH).'announcements/announcements.php');
  393. $renderer = $form->defaultRenderer();
  394. $renderer->setElementTemplate('<span>{label} {element}</span>&nbsp;<input type="submit" value="'.get_lang('Ok').'"','since');
  395. $options = array(
  396. 2 => '2 '.get_lang('Days'),
  397. 3 => '3 '.get_lang('Days'),
  398. 4 => '4 '.get_lang('Days'),
  399. 5 => '5 '.get_lang('Days'),
  400. 6 => '6 '.get_lang('Days'),
  401. 7 => '7 '.get_lang('Days'),
  402. 15 => '15 '.get_lang('Days'),
  403. 30 => '30 '.get_lang('Days')
  404. );
  405. $el = $form -> addElement('select','since','<img width="22" align="middle" src="'.api_get_path(WEB_IMG_PATH).'messagebox_warning.gif" border="0" />'.get_lang('RemindInactivesLearnersSince'),$options);
  406. $el -> setSelected(7);
  407. $form -> addElement('hidden','action','add');
  408. $form -> addElement('hidden','remindallinactives','true');
  409. $form -> display();
  410. // END : form to remind inactives susers
  411. $tracking_column = isset($_GET['tracking_column']) ? $_GET['tracking_column'] : 0;
  412. $tracking_direction = isset($_GET['tracking_direction']) ? $_GET['tracking_direction'] : DESC;
  413. if(count($a_students)>0)
  414. {
  415. $table = new SortableTable('tracking', 'count_student_in_course');
  416. $table -> set_header(0, get_lang('OfficialCode'), false, 'align="center"');
  417. $table -> set_header(1, get_lang('LastName'), true, 'align="center"');
  418. $table -> set_header(2, get_lang('FirstName'), false, 'align="center"');
  419. $table -> set_header(3, get_lang('Time'),false);
  420. $table -> set_header(4, get_lang('Progress'),false);
  421. $table -> set_header(5, get_lang('Score'),false);
  422. $table -> set_header(6, get_lang('Student_publication'),false);
  423. $table -> set_header(7, get_lang('Messages'),false);
  424. $table -> set_header(8, get_lang('FirstLogin'), false, 'align="center"');
  425. $table -> set_header(9, get_lang('LatestLogin'), false, 'align="center"');
  426. $table -> set_header(10, get_lang('Details'),false);
  427. if($export_csv)
  428. {
  429. $csv_content[] = array (
  430. get_lang('OfficialCode'),
  431. get_lang('LastName'),
  432. get_lang('FirstName'),
  433. get_lang('Time'),
  434. get_lang('Progress'),
  435. get_lang('Score'),
  436. get_lang('Student_publication'),
  437. get_lang('Messages'),
  438. get_lang('FirstLogin'),
  439. get_lang('LatestLogin')
  440. );
  441. }
  442. $all_datas = array();
  443. $course_code = $_course['id'];
  444. foreach($a_students as $student_id => $student)
  445. {
  446. $student_datas = UserManager :: get_user_info_by_id($student_id);
  447. $avg_time_spent = $avg_student_score = $avg_student_progress = $total_assignments = $total_messages = 0 ;
  448. $nb_courses_student = 0;
  449. $avg_time_spent = Tracking :: get_time_spent_on_the_course($student_id, $course_code);
  450. $avg_student_score = Tracking :: get_avg_student_score($student_id, $course_code);
  451. $avg_student_progress = Tracking :: get_avg_student_progress($student_id, $course_code);
  452. $total_assignments = Tracking :: count_student_assignments($student_id, $course_code);
  453. $total_messages = Tracking :: count_student_messages($student_id, $course_code);
  454. $row = array();
  455. $row[] = $student_datas['official_code'];
  456. $row[] = $student_datas['lastname'];
  457. $row[] = $student_datas['firstname'];
  458. $row[] = api_time_to_hms($avg_time_spent);
  459. $row[] = $avg_student_progress.' %';
  460. $row[] = $avg_student_score.' %';
  461. $row[] = $total_assignments;
  462. $row[] = $total_messages;
  463. $row[] = Tracking :: get_first_connection_date_on_the_course($student_id, $course_code);
  464. $row[] = Tracking :: get_last_connection_date_on_the_course($student_id, $course_code);
  465. if($export_csv)
  466. {
  467. $row[8] = strip_tags($row[8]);
  468. $csv_content[] = $row;
  469. }
  470. $row[] = '<a href="../mySpace/myStudents.php?student='.$student_id.'&details=true&course='.$course_code.'&origin=tracking_course"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a>';
  471. $all_datas[] = $row;
  472. }
  473. usort($all_datas, 'sort_users');
  474. $page = $table->get_pager()->getCurrentPageID();
  475. $all_datas = array_slice($all_datas, ($page-1)*$table -> per_page, $table -> per_page);
  476. if($export_csv)
  477. {
  478. usort($csv_content, 'sort_users');
  479. }
  480. foreach($all_datas as $row)
  481. {
  482. $table -> addRow($row,'align="right"');
  483. }
  484. $table -> setColAttributes(0,array('align'=>'left'));
  485. $table -> setColAttributes(1,array('align'=>'left'));
  486. $table -> setColAttributes(2,array('align'=>'left'));
  487. $table -> setColAttributes(7,array('align'=>'right'));
  488. $table -> setColAttributes(8,array('align'=>'center'));
  489. $table -> setColAttributes(9,array('align'=>'center'));
  490. $table -> display();
  491. }
  492. else
  493. {
  494. echo get_lang('NoUsersInCourseTracking');
  495. }
  496. // send the csv file if asked
  497. if($export_csv)
  498. {
  499. ob_end_clean();
  500. Export :: export_table_csv($csv_content, 'reporting_student_list');
  501. }
  502. }
  503. ?>
  504. </table>
  505. <?php
  506. Display::display_footer();
  507. ?>