Minor - format code

pull/2487/head
jmontoyaa 8 years ago
parent 2cbd401579
commit 4654570b23
  1. 12
      main/tracking/exams.php
  2. 3
      main/tracking/lp_results_by_user.php

@ -246,11 +246,9 @@ if (!empty($courseList) && is_array($courseList)) {
if (Database::num_rows($resultExercises) > 0) {
while ($exercise = Database::fetch_array($resultExercises, 'ASSOC')) {
$exerciseSessionId = $exercise['session_id'];
if (empty($exerciseSessionId)) {
if ($global) {
// If the exercise was created in the base course.
// Load all sessions.
@ -280,7 +278,6 @@ if (!empty($courseList) && is_array($courseList)) {
$html .= $result['html'];
$export_array_global = array_merge($export_array_global, $result['export_array_global']);
} else {
if (empty($sessionId)) {
// Load base course.
$result = processStudentList(
@ -298,7 +295,6 @@ if (!empty($courseList) && is_array($courseList)) {
$result['export_array_global']
);
} else {
$result = processStudentList(
$filter_score,
$global,
@ -317,7 +313,6 @@ if (!empty($courseList) && is_array($courseList)) {
}
} else {
// If the exercise only exists in this session.
$result = processStudentList(
$filter_score,
$global,
@ -370,7 +365,8 @@ if ($exportToXLS) {
* @param $b
* @return int
*/
function sort_user($a, $b) {
function sort_user($a, $b)
{
if (is_numeric($a['score']) && is_numeric($b['score'])) {
if ($a['score'] < $b['score']) {
return 1;
@ -484,8 +480,7 @@ function export_complete_report_xls($filename, $array)
*/
function processStudentList($filter_score, $global, $exercise, $courseInfo, $sessionId, $newSessionList)
{
if (
(isset($exercise['id']) && empty($exercise['id'])) ||
if ((isset($exercise['id']) && empty($exercise['id'])) ||
!isset($exercise['id'])
) {
return array(
@ -519,7 +514,6 @@ function processStudentList($filter_score, $global, $exercise, $courseInfo, $ses
}
$html = null;
$totalStudents = count($students);
if (!$global) {

@ -2,7 +2,6 @@
/* For licensing terms, see /license.txt */
/**
*
* Exercise results from Learning paths
*
* @todo implement pagination
@ -254,6 +253,6 @@ function export_complete_report_csv($filename, $array)
Export :: arrayToCsv($array, $filename);
}
exit;
}
Display :: display_footer();

Loading…
Cancel
Save