From 40bfb8a5d3c3f678a051e626e803ed64c7925234 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 11 Sep 2014 15:12:13 +0200 Subject: [PATCH] Minor - format code. --- main/mySpace/myStudents.php | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index 508dfe0c37..66db9dc9ce 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -613,9 +613,7 @@ if (empty($_GET['details'])) { } // Courses - echo '

'.$title.'

'; - echo ''; echo ' @@ -647,8 +645,7 @@ if (empty($_GET['details'])) { $attendances_faults_avg = '0/0 (0%)'; } - // get evaluatios by student - + // Get evaluations by student $cats = Category::load(null, null, $course_code, null, null, $session_id); $scoretotal = array(); @@ -702,14 +699,13 @@ if (empty($_GET['details'])) { echo '
'.get_lang('Course').'
'; } } else { - $csv_content[] = array (); - $csv_content[] = array (str_replace(' ', '', $table_title)); - + $csv_content[] = array(); + $csv_content[] = array(str_replace(' ', '', $table_title)); $t_lp = Database :: get_course_table(TABLE_LP_MAIN); // csv export headers - $csv_content[] = array (); - $csv_content[] = array ( + $csv_content[] = array(); + $csv_content[] = array( get_lang('Learnpath'), get_lang('Time'), get_lang('AverageScore'), @@ -719,15 +715,17 @@ if (empty($_GET['details'])) { ); if (empty($session_id)) { - $sql_lp = " SELECT lp.name, lp.id FROM $t_lp lp WHERE session_id = 0 AND c_id = {$info_course['real_id']} ORDER BY lp.display_order"; + $sql_lp = " SELECT lp.name, lp.id FROM $t_lp lp + WHERE session_id = 0 AND c_id = {$info_course['real_id']} + ORDER BY lp.display_order"; } else { - $sql_lp = " SELECT lp.name, lp.id FROM $t_lp lp WHERE c_id = {$info_course['real_id']} ORDER BY lp.display_order"; + $sql_lp = " SELECT lp.name, lp.id FROM $t_lp lp + WHERE c_id = {$info_course['real_id']} + ORDER BY lp.display_order"; } $rs_lp = Database::query($sql_lp); - if (Database :: num_rows($rs_lp) > 0) { ?> - @@ -855,8 +853,7 @@ if (empty($_GET['details'])) { } ?>
- - + @@ -887,7 +884,6 @@ if (empty($_GET['details'])) { if (Database :: num_rows($result_exercices) > 0) { while ($exercices = Database :: fetch_array($result_exercices)) { $exercise_id = intval($exercices['id']); - $count_attempts = Tracking::count_student_exercise_attempts($student_id, $course_code, $exercise_id, 0, 0, $session_id, 2); $score_percentage = Tracking::get_avg_student_exercise_score($student_id, $course_code, $exercise_id, $session_id, 1, 0); @@ -953,7 +949,7 @@ if (empty($_GET['details'])) { $data_exercices[$i][] = $score_percentage . '%'; $data_exercices[$i][] = $count_attempts; - $csv_content[] = array ( + $csv_content[] = array( $exercices['title'], $lp_name, $score_percentage, @@ -968,7 +964,6 @@ if (empty($_GET['details'])) { } echo '
'; - //@when using sessions we do not show the survey list if (empty($session_id)) { $survey_list = survey_manager::get_surveys($course_code, $session_id); @@ -985,7 +980,6 @@ if (empty($_GET['details'])) { } if (!empty($survey_list)) { - $table = new HTML_Table(array('class' => 'data_table')); $header_names = array(get_lang('Survey'), get_lang('Answered')); $row = 0; @@ -999,7 +993,6 @@ if (empty($_GET['details'])) { foreach ($survey_data as $data) { $column = 0; $table->setCellContents($row, $column, $data); - //$table->setRowAttributes($row, 'style="text-align:center"'); $class = 'class="row_odd"'; if($row % 2) { $class = 'class="row_even"'; @@ -1093,5 +1086,5 @@ if ($export_csv) { Export :: export_table_csv($csv_content, 'reporting_student'); exit; } -/* FOOTER */ + Display :: display_footer();