courseLog.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  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 || $is_sessionAdmin;
  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(Database::num_rows($rs)>0)
  224. {
  225. while($quiz = Database::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 = Database::fetch_array($rsAttempt))
  237. {
  238. $nb_attempts++;
  239. $exe_weight=$attempt['exe_weighting'];
  240. if ($exe_weight>0)
  241. {
  242. $quiz_avg_score += $attempt['exe_result']/$exe_weight*100;
  243. }
  244. }
  245. if($nb_attempts>0)
  246. $quiz_avg_score = $quiz_avg_score / $nb_attempts;
  247. echo '<tr><td>'.$quiz['title'].'</td><td align="right">'.round($quiz_avg_score,1).' %</td></tr>';
  248. if($export_csv){
  249. $temp=array($quiz['title'],$quiz_avg_score);
  250. $csv_content[] = $temp;
  251. }
  252. }
  253. }
  254. else
  255. {
  256. echo '<tr><td>'.get_lang('NoExercises').'</td></tr>';
  257. if($export_csv){
  258. $temp=array(get_lang('NoExercises'),'');
  259. $csv_content[] = $temp;
  260. }
  261. }
  262. echo '</table></div>';
  263. echo '<div class="clear"></div>';
  264. /**********************
  265. * TOOLS
  266. **********************/
  267. echo "<div class='admin_section'>
  268. <h4>
  269. <img src='../img/acces_tool.gif' align='absbottom'>&nbsp;".get_lang('ToolsMostUsed')."
  270. </h4>
  271. <table class='data_table'>";
  272. $sql = "SELECT `access_tool`, COUNT(DISTINCT `access_user_id`),count( `access_tool` ) as count_access_tool
  273. FROM $TABLETRACK_ACCESS
  274. WHERE `access_tool` IS NOT NULL
  275. AND `access_cours_code` = '$_cid'
  276. GROUP BY `access_tool`
  277. ORDER BY count_access_tool DESC
  278. LIMIT 0, 3";
  279. $rs = api_sql_query($sql, __FILE__, __LINE__);
  280. if($export_csv){
  281. $temp=array(get_lang('ToolsMostUsed'),'');
  282. $csv_content[] = $temp;
  283. }
  284. while ($row = Database::fetch_array($rs))
  285. {
  286. echo ' <tr>
  287. <td>'.get_lang(ucfirst($row['access_tool'])).'</td>
  288. <td align="right">'.$row['count_access_tool'].' '.get_lang('Clicks').'</td>
  289. </tr>';
  290. if($export_csv){
  291. $temp=array(get_lang(ucfirst($row['access_tool'])),$row['count_access_tool'].' '.get_lang('Clicks'));
  292. $csv_content[] = $temp;
  293. }
  294. }
  295. echo '</table></div>';
  296. echo '<div class="clear"></div>';
  297. /***************************
  298. * DOCUMENTS
  299. ***************************/
  300. echo "<div class='admin_section'>
  301. <h4>
  302. <img src='../img/documents.gif' align='absbottom'>&nbsp;".get_lang('DocumentsMostDownloaded')."
  303. </h4>
  304. <table class='data_table'>";
  305. $sql = "SELECT `down_doc_path`, COUNT(DISTINCT `down_user_id`), COUNT(`down_doc_path`) as count_down
  306. FROM $TABLETRACK_DOWNLOADS
  307. WHERE `down_cours_id` = '$_cid'
  308. GROUP BY `down_doc_path`
  309. ORDER BY count_down DESC
  310. LIMIT 0, 3";
  311. $rs = api_sql_query($sql, __FILE__, __LINE__);
  312. if($export_csv){
  313. $temp=array(get_lang('DocumentsMostDownloaded'),'');
  314. $csv_content[] = array('','');
  315. $csv_content[] = $temp;
  316. }
  317. if(Database::num_rows($rs)>0)
  318. {
  319. while($row = Database::fetch_array($rs))
  320. {
  321. echo ' <tr>
  322. <td>'.$row['down_doc_path'].'</td>
  323. <td align="right">'.$row['count_down'].' '.get_lang('Clicks').'</td>
  324. </tr>';
  325. if($export_csv){
  326. $temp=array($row['down_doc_path'],$row['count_down'].' '.get_lang('Clicks'));
  327. $csv_content[] = $temp;
  328. }
  329. }
  330. }
  331. else
  332. {
  333. echo '<tr><td>'.get_lang('NoDocumentDownloaded').'</td></tr>';
  334. if($export_csv){
  335. $temp=array(get_lang('NoDocumentDownloaded'),'');
  336. $csv_content[] = $temp;
  337. }
  338. }
  339. echo '</table></div>';
  340. echo '<div class="clear"></div>';
  341. /***************************
  342. * LINKS
  343. ***************************/
  344. echo "<div class='admin_section'>
  345. <h4>
  346. <img src='../img/link.gif' align='absbottom'>&nbsp;".get_lang('LinksMostClicked')."
  347. </h4>
  348. <table class='data_table'>";
  349. $sql = "SELECT `cl`.`title`, `cl`.`url`,count(DISTINCT `sl`.`links_user_id`), count(`cl`.`title`) as count_visits
  350. FROM $TABLETRACK_LINKS AS sl, $TABLECOURSE_LINKS AS cl
  351. WHERE `sl`.`links_link_id` = `cl`.`id`
  352. AND `sl`.`links_cours_id` = '$_cid'
  353. GROUP BY `cl`.`title`, `cl`.`url`
  354. ORDER BY count_visits DESC
  355. LIMIT 0, 3";
  356. $rs = api_sql_query($sql, __FILE__, __LINE__);
  357. if($export_csv){
  358. $temp=array(get_lang('LinksMostClicked'),'');
  359. $csv_content[] = array('','');
  360. $csv_content[] = $temp;
  361. }
  362. if(Database::num_rows($rs)>0)
  363. {
  364. while($row = Database::fetch_array($rs))
  365. {
  366. echo ' <tr>
  367. <td>'.$row['title'].'</td>
  368. <td align="right">'.$row['count_visits'].' '.get_lang('Clicks').'</td>
  369. </tr>';
  370. if($export_csv){
  371. $temp=array($row['title'],$row['count_visits'].' '.get_lang('Clicks'));
  372. $csv_content[] = $temp;
  373. }
  374. }
  375. }
  376. else
  377. {
  378. echo '<tr><td>'.get_lang('NoLinkVisited').'</td></tr>';
  379. if($export_csv){
  380. $temp=array(get_lang('NoLinkVisited'),'');
  381. $csv_content[] = $temp;
  382. }
  383. }
  384. echo '</table></div>';
  385. echo '<div class="clear"></div>';
  386. // send the csv file if asked
  387. if($export_csv)
  388. {
  389. ob_end_clean();
  390. Export :: export_table_csv($csv_content, 'reporting_course_tracking');
  391. }
  392. }
  393. // else display student list with all the informations
  394. else {
  395. // BEGIN : form to remind inactives susers
  396. $form = new FormValidator('reminder_form','get',api_get_path(REL_CODE_PATH).'announcements/announcements.php');
  397. $renderer = $form->defaultRenderer();
  398. $renderer->setElementTemplate('<span>{label} {element}</span>&nbsp;<input type="submit" value="'.get_lang('Ok').'"','since');
  399. $options = array(
  400. 2 => '2 '.get_lang('Days'),
  401. 3 => '3 '.get_lang('Days'),
  402. 4 => '4 '.get_lang('Days'),
  403. 5 => '5 '.get_lang('Days'),
  404. 6 => '6 '.get_lang('Days'),
  405. 7 => '7 '.get_lang('Days'),
  406. 15 => '15 '.get_lang('Days'),
  407. 30 => '30 '.get_lang('Days')
  408. );
  409. $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);
  410. $el -> setSelected(7);
  411. $form -> addElement('hidden','action','add');
  412. $form -> addElement('hidden','remindallinactives','true');
  413. $form -> display();
  414. // END : form to remind inactives susers
  415. $tracking_column = isset($_GET['tracking_column']) ? $_GET['tracking_column'] : 0;
  416. $tracking_direction = isset($_GET['tracking_direction']) ? $_GET['tracking_direction'] : DESC;
  417. if(count($a_students)>0)
  418. {
  419. $table = new SortableTable('tracking', 'count_student_in_course');
  420. $table -> set_header(0, get_lang('OfficialCode'), false, 'align="center"');
  421. $table -> set_header(1, get_lang('LastName'), true, 'align="center"');
  422. $table -> set_header(2, get_lang('FirstName'), false, 'align="center"');
  423. $table -> set_header(3, get_lang('Time'),false);
  424. $table -> set_header(4, get_lang('Progress'),false);
  425. $table -> set_header(5, get_lang('Score'),false);
  426. $table -> set_header(6, get_lang('Student_publication'),false);
  427. $table -> set_header(7, get_lang('Messages'),false);
  428. $table -> set_header(8, get_lang('FirstLogin'), false, 'align="center"');
  429. $table -> set_header(9, get_lang('LatestLogin'), false, 'align="center"');
  430. $table -> set_header(10, get_lang('Details'),false);
  431. if($export_csv)
  432. {
  433. $csv_content[] = array (
  434. get_lang('OfficialCode'),
  435. get_lang('LastName'),
  436. get_lang('FirstName'),
  437. get_lang('Time'),
  438. get_lang('Progress'),
  439. get_lang('Score'),
  440. get_lang('Student_publication'),
  441. get_lang('Messages'),
  442. get_lang('FirstLogin'),
  443. get_lang('LatestLogin')
  444. );
  445. }
  446. $all_datas = array();
  447. $course_code = $_course['id'];
  448. foreach($a_students as $student_id => $student)
  449. {
  450. $student_datas = UserManager :: get_user_info_by_id($student_id);
  451. $avg_time_spent = $avg_student_score = $avg_student_progress = $total_assignments = $total_messages = 0 ;
  452. $nb_courses_student = 0;
  453. $avg_time_spent = Tracking :: get_time_spent_on_the_course($student_id, $course_code);
  454. $avg_student_score = Tracking :: get_avg_student_score($student_id, $course_code);
  455. $avg_student_progress = Tracking :: get_avg_student_progress($student_id, $course_code);
  456. $total_assignments = Tracking :: count_student_assignments($student_id, $course_code);
  457. $total_messages = Tracking :: count_student_messages($student_id, $course_code);
  458. $row = array();
  459. $row[] = $student_datas['official_code'];
  460. $row[] = $student_datas['lastname'];
  461. $row[] = $student_datas['firstname'];
  462. $row[] = api_time_to_hms($avg_time_spent);
  463. $row[] = $avg_student_progress.' %';
  464. $row[] = $avg_student_score.' %';
  465. $row[] = $total_assignments;
  466. $row[] = $total_messages;
  467. $row[] = Tracking :: get_first_connection_date_on_the_course($student_id, $course_code);
  468. $row[] = Tracking :: get_last_connection_date_on_the_course($student_id, $course_code);
  469. if($export_csv)
  470. {
  471. $row[8] = strip_tags($row[8]);
  472. $csv_content[] = $row;
  473. }
  474. $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>';
  475. $all_datas[] = $row;
  476. }
  477. usort($all_datas, 'sort_users');
  478. $page = $table->get_pager()->getCurrentPageID();
  479. $all_datas = array_slice($all_datas, ($page-1)*$table -> per_page, $table -> per_page);
  480. if($export_csv)
  481. {
  482. usort($csv_content, 'sort_users');
  483. }
  484. foreach($all_datas as $row)
  485. {
  486. $table -> addRow($row,'align="right"');
  487. }
  488. $table -> setColAttributes(0,array('align'=>'left'));
  489. $table -> setColAttributes(1,array('align'=>'left'));
  490. $table -> setColAttributes(2,array('align'=>'left'));
  491. $table -> setColAttributes(7,array('align'=>'right'));
  492. $table -> setColAttributes(8,array('align'=>'center'));
  493. $table -> setColAttributes(9,array('align'=>'center'));
  494. $table -> display();
  495. }
  496. else
  497. {
  498. echo get_lang('NoUsersInCourseTracking');
  499. }
  500. // send the csv file if asked
  501. if($export_csv)
  502. {
  503. ob_end_clean();
  504. Export :: export_table_csv($csv_content, 'reporting_student_list');
  505. }
  506. }
  507. ?>
  508. </table>
  509. <?php
  510. Display::display_footer();
  511. ?>