} $row[] = $avg_student_progress . ' %'; $row[] = $avg_student_score . ' %'; $row[] = $total_assignments; $row[] = $total_messages; $row[] = Tracking::get_first_connection_date_on_the_course($student_id, $course_code); $row[] = Tracking::get_last_connection_date_on_the_course($student_id, $course_code); if ($export_csv) { $row[8] = strip_tags($row[8]); $csv_content[] = $row; } $row[] = '<center><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></center>'; $all_datas[] = $row; } usort($all_datas, 'sort_users'); $page = $table->get_pager()->getCurrentPageID(); $all_datas = array_slice($all_datas, ($page - 1) * $table->per_page, $table->per_page); if ($export_csv) { usort($csv_content, 'sort_users'); } foreach ($all_datas as $row) { $table->addRow($row, 'align="right"'); } $table->setColAttributes(0, array('align' => 'left')); $table->setColAttributes(1, array('align' => 'left')); $table->setColAttributes(2, array('align' => 'left')); $table->setColAttributes(7, array('align' => 'right')); $table->setColAttributes(8, array('align' => 'center')); $table->setColAttributes(9, array('align' => 'center')); $table->display(); } else {