From b1006bf21e876a7a0e84441e6545d69fbc14816c Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Thu, 30 Mar 2017 08:45:13 +0200 Subject: [PATCH] Minor - format code, use === instead of == --- main/inc/lib/myspace.lib.php | 63 ++++++++++++++---------------------- main/mySpace/admin_view.php | 2 +- 2 files changed, 25 insertions(+), 40 deletions(-) diff --git a/main/inc/lib/myspace.lib.php b/main/inc/lib/myspace.lib.php index 2470bb15a5..a37adc5ad4 100644 --- a/main/inc/lib/myspace.lib.php +++ b/main/inc/lib/myspace.lib.php @@ -1178,32 +1178,32 @@ class MySpace } /** - * Display a sortable table that contains an overview of all the reporting progress of all sessions and all courses the user is subscribed to + * Display a sortable table that contains an overview of all the reporting + * progress of all sessions and all courses the user is subscribed to * @author Guillaume Viguier */ public static function display_tracking_session_overview() { - $t_head = ' '; - //$t_head .= ' '; - $t_head .= ''; - $t_head .= ' '; - $t_head .= ' '; - $t_head .= ' '; - $t_head .= ' '; - //$t_head .= ' '; - $t_head .= ' '; - $t_head .= ' '; - $t_head .= ' '; - //$t_head .= ' '; - $t_head .= ' '; - //$t_head .= ' '; - //$t_head .= ' '; - $t_head .= ' '; - $t_head .= '
'.get_lang('CourseInformation').'
'.get_lang('Course').''.cut(get_lang('AvgTimeSpentInTheCourse'), 6, true).''.cut(get_lang('AvgStudentsProgress'), 6, true).''.cut(get_lang('AvgCourseScore'), 6, true).'
'.get_lang('AvgExercisesScore').'
'.cut(get_lang('TotalNumberOfMessages'), 6, true).''.cut(get_lang('TotalNumberOfAssignments'), 6, true).''.get_lang('TotalExercisesScoreObtained').'
'.get_lang('TotalExercisesScorePossible').'
'.cut(get_lang('TotalExercisesAnswered'), 6, true).'
'.get_lang('TotalExercisesScorePercentage').'
'.get_lang('FirstLogin').'
'.get_lang('LatestLogin').'
'; + $t_head = ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= ''; + $t_head .= '
'.get_lang('Course').''.cut(get_lang('AvgTimeSpentInTheCourse'), 6, true).''.cut(get_lang('AvgStudentsProgress'), 6, true).''.cut(get_lang('AvgCourseScore'), 6, true).''.cut(get_lang('TotalNumberOfMessages'), 6, true).''.cut(get_lang('TotalNumberOfAssignments'), 6, true).''.get_lang('TotalExercisesScoreObtained').''.cut(get_lang('TotalExercisesAnswered'), 6, true).''.get_lang('LatestLogin').'
'; $addparams = array('view' => 'admin', 'display' => 'sessionoverview'); - - $table = new SortableTable('tracking_session_overview', array('MySpace','get_total_number_sessions'), array('MySpace','get_session_data_tracking_overview'), 1); + $table = new SortableTable( + 'tracking_session_overview', + array('MySpace', 'get_total_number_sessions'), + array('MySpace', 'get_session_data_tracking_overview'), + 1 + ); $table->additional_parameters = $addparams; $table->set_header(0, '', false, null, array('style' => 'display: none')); @@ -1231,10 +1231,10 @@ class MySpace /** * Get data for the sessions * - * @param int Inferior limit - * @param int Number of items to select - * @param string Column to order on - * @param string Order direction + * @param int $from Inferior limit + * @param int $number_of_items Number of items to select + * @param string $column Column to order on + * @param string $direction Order direction * @return array Results */ public static function get_session_data_tracking_overview($from, $number_of_items, $column, $direction) @@ -1265,21 +1265,6 @@ class MySpace $session_id = $row[0]; // the table header $return = ''; - /*$return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' '; - $return .= ' ';*/ // database table definition $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); diff --git a/main/mySpace/admin_view.php b/main/mySpace/admin_view.php index 458b222b35..1995b39ce0 100644 --- a/main/mySpace/admin_view.php +++ b/main/mySpace/admin_view.php @@ -5,7 +5,7 @@ $cidReset = true; require_once __DIR__.'/../inc/global.inc.php'; -$exportCSV = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false; +$exportCSV = isset($_GET['export']) && $_GET['export'] === 'csv' ? true : false; $display = isset($_GET['display']) ? Security::remove_XSS($_GET['display']) : null; $htmlHeadXtra[] = api_get_jqgrid_js();
'.get_lang('Course').''.get_lang('AvgTimeSpentInTheCourse').''.get_lang('AvgStudentsProgress').''.get_lang('AvgCourseScore').''.get_lang('AvgExercisesScore').''.get_lang('AvgMessages').''.get_lang('AvgAssignments').''.get_lang('TotalExercisesScoreObtained').''.get_lang('TotalExercisesScorePossible').''.get_lang('TotalExercisesAnswered').''.get_lang('TotalExercisesScorePercentage').''.get_lang('FirstLogin').''.get_lang('LatestLogin').'