@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | api_block_anonymous_users(); |
18 | 18 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
19 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
19 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
20 | 20 | Display::display_header(get_lang('Sessions')); |
21 | 21 | |
22 | 22 | $export_csv = false; |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | // Column config |
119 | 119 | $columnModel = array( |
120 | 120 | array('name'=>'name', 'index'=>'name', 'width'=>'255', 'align'=>'left'), |
121 | - array('name'=>'date', 'index'=>'date', 'width'=>'150', 'align'=>'left','sortable'=>'false'), |
|
122 | - array('name'=>'course_per_session', 'index'=>'course_per_session', 'width'=>'150','sortable'=>'false'), |
|
123 | - array('name'=>'student_per_session', 'index'=>'student_per_session', 'width'=>'100','sortable'=>'false'), |
|
124 | - array('name'=>'details', 'index'=>'details', 'width'=>'100','sortable'=>'false') |
|
121 | + array('name'=>'date', 'index'=>'date', 'width'=>'150', 'align'=>'left', 'sortable'=>'false'), |
|
122 | + array('name'=>'course_per_session', 'index'=>'course_per_session', 'width'=>'150', 'sortable'=>'false'), |
|
123 | + array('name'=>'student_per_session', 'index'=>'student_per_session', 'width'=>'100', 'sortable'=>'false'), |
|
124 | + array('name'=>'details', 'index'=>'details', 'width'=>'100', 'sortable'=>'false') |
|
125 | 125 | ); |
126 | 126 | |
127 | 127 | $extraParams = array( |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | if ($is_drh) { |
105 | - $view = 'drh'; |
|
105 | + $view = 'drh'; |
|
106 | 106 | $menu_items[] = Display::url(Display::return_icon('user_na.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), '#'); |
107 | 107 | $menu_items[] = Display::url(Display::return_icon('teacher.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'); |
108 | 108 | $menu_items[] = Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | echo "</div><br />"; |
144 | 144 | } |
145 | 145 | } else { |
146 | - echo Display::url( |
|
146 | + echo Display::url( |
|
147 | 147 | Display::return_icon('stats.png', get_lang('MyStats'),'',ICON_SIZE_MEDIUM), |
148 | 148 | api_get_path(WEB_CODE_PATH)."auth/my_progress.php" |
149 | 149 | ); |
@@ -397,11 +397,11 @@ discard block |
||
397 | 397 | |
398 | 398 | // Send the csv file if asked |
399 | 399 | if ($export_csv) { |
400 | - ob_end_clean(); |
|
401 | - Export :: arrayToCsv($csv_content, 'reporting_index'); |
|
402 | - exit; |
|
400 | + ob_end_clean(); |
|
401 | + Export :: arrayToCsv($csv_content, 'reporting_index'); |
|
402 | + exit; |
|
403 | 403 | } |
404 | 404 | |
405 | 405 | if (!$export_csv) { |
406 | - Display::display_footer(); |
|
406 | + Display::display_footer(); |
|
407 | 407 | } |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | $session_id = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0; |
28 | 28 | |
29 | 29 | $is_coach = api_is_coach($session_id); |
30 | -$is_platform_admin = api_is_platform_admin(); |
|
31 | -$is_drh = api_is_drh(); |
|
32 | -$is_session_admin = api_is_session_admin(); |
|
30 | +$is_platform_admin = api_is_platform_admin(); |
|
31 | +$is_drh = api_is_drh(); |
|
32 | +$is_session_admin = api_is_session_admin(); |
|
33 | 33 | |
34 | -$count_sessions = 0; |
|
35 | -$count_courses = 0; |
|
36 | -$title = null; |
|
34 | +$count_sessions = 0; |
|
35 | +$count_courses = 0; |
|
36 | +$title = null; |
|
37 | 37 | |
38 | 38 | // Access control |
39 | 39 | api_block_anonymous_users(); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | echo '</span>'; |
125 | 125 | |
126 | 126 | if (!empty($session_id) && |
127 | - !in_array($display, array('accessoverview','lpprogressoverview','progressoverview','exerciseprogress', 'surveyoverview')) |
|
127 | + !in_array($display, array('accessoverview', 'lpprogressoverview', 'progressoverview', 'exerciseprogress', 'surveyoverview')) |
|
128 | 128 | ) { |
129 | 129 | echo '<a href="index.php">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
130 | 130 | if (!api_is_platform_admin()) { |
@@ -144,19 +144,19 @@ discard block |
||
144 | 144 | } |
145 | 145 | } else { |
146 | 146 | echo Display::url( |
147 | - Display::return_icon('stats.png', get_lang('MyStats'),'',ICON_SIZE_MEDIUM), |
|
147 | + Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), |
|
148 | 148 | api_get_path(WEB_CODE_PATH)."auth/my_progress.php" |
149 | 149 | ); |
150 | 150 | echo Display::url( |
151 | 151 | Display::return_icon("certificate_list.png", get_lang("GradebookSeeListOfStudentsCertificates"), array(), ICON_SIZE_MEDIUM), |
152 | - api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php" |
|
152 | + api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php" |
|
153 | 153 | ); |
154 | 154 | } |
155 | 155 | |
156 | 156 | // Actions menu |
157 | 157 | $nb_menu_items = count($menu_items); |
158 | 158 | if (empty($session_id) || |
159 | - in_array($display, array('accessoverview','lpprogressoverview', 'progressoverview', 'exerciseprogress', 'surveyoverview')) |
|
159 | + in_array($display, array('accessoverview', 'lpprogressoverview', 'progressoverview', 'exerciseprogress', 'surveyoverview')) |
|
160 | 160 | ) { |
161 | 161 | if ($nb_menu_items > 1) { |
162 | 162 | foreach ($menu_items as $key => $item) { |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | echo '</div>'; |
169 | 169 | |
170 | -$userId = api_get_user_id(); |
|
170 | +$userId = api_get_user_id(); |
|
171 | 171 | $stats = Tracking::getStats($userId); |
172 | 172 | |
173 | 173 | $students = $stats['students']; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | if (!empty($students)) { |
208 | 208 | // Students |
209 | 209 | $nb_students = count($students); |
210 | - $progress = Tracking::get_avg_student_progress($studentIds); |
|
210 | + $progress = Tracking::get_avg_student_progress($studentIds); |
|
211 | 211 | $countAssignments = Tracking::count_student_assignments($studentIds); |
212 | 212 | $studentIds = array_values($students); |
213 | 213 | $countHumanResourcesUsers = count($humanResourcesUsers); |
@@ -16,14 +16,14 @@ |
||
16 | 16 | $this_section = SECTION_TRACKING; |
17 | 17 | |
18 | 18 | api_block_anonymous_users(); |
19 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
19 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
20 | 20 | Display :: display_header($nameTools); |
21 | 21 | |
22 | 22 | // Database Table Definitions |
23 | -$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
24 | -$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
23 | +$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
24 | +$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
25 | 25 | $tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); |
26 | -$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
26 | +$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
27 | 27 | $tbl_track_exercice = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
28 | 28 | |
29 | 29 | /* |
@@ -33,36 +33,36 @@ |
||
33 | 33 | $result_course = Database::query($sql_course); |
34 | 34 | |
35 | 35 | if (Database::num_rows($result_course) > 0) { |
36 | - if (isset($_POST['export'])) { |
|
37 | - $export_result = export_csv($header, $data, 'test.csv'); // TODO: There is no data for exporting yet. |
|
38 | - Display :: display_error_message($export_result); |
|
39 | - } |
|
40 | - echo '<table class="data_table"><tr><th>'.get_lang('Course').'</th><th>'.get_lang('TempsFrequentation').'</th><th>'.get_lang('Progression').'</th><th>'.get_lang('MoyenneTest').'</th></tr>'; |
|
41 | - $header = array(get_lang('Course', ''), get_lang('TempsFrequentation', ''), get_lang('Progression', ''), get_lang('MoyenneTest', '')); |
|
42 | - while ($a_course = Database::fetch_array($result_course)) { |
|
43 | - // TODO: This query is to be checked, there are no HotPotatoes tests results. |
|
44 | - $sql_moy_test = "SELECT exe_result,exe_weighting |
|
36 | + if (isset($_POST['export'])) { |
|
37 | + $export_result = export_csv($header, $data, 'test.csv'); // TODO: There is no data for exporting yet. |
|
38 | + Display :: display_error_message($export_result); |
|
39 | + } |
|
40 | + echo '<table class="data_table"><tr><th>'.get_lang('Course').'</th><th>'.get_lang('TempsFrequentation').'</th><th>'.get_lang('Progression').'</th><th>'.get_lang('MoyenneTest').'</th></tr>'; |
|
41 | + $header = array(get_lang('Course', ''), get_lang('TempsFrequentation', ''), get_lang('Progression', ''), get_lang('MoyenneTest', '')); |
|
42 | + while ($a_course = Database::fetch_array($result_course)) { |
|
43 | + // TODO: This query is to be checked, there are no HotPotatoes tests results. |
|
44 | + $sql_moy_test = "SELECT exe_result,exe_weighting |
|
45 | 45 | FROM $tbl_track_exercice |
46 | 46 | WHERE c_id = ".$a_course['id']; |
47 | - $result_moy_test = Database::query($sql_moy_test); |
|
48 | - $result = 0; |
|
49 | - $weighting = 0; |
|
50 | - while ($moy_test = Database::fetch_array($result_moy_test)) { |
|
51 | - $result = $result + $moy_test['exe_result']; |
|
52 | - $weighting = $weighting + $moy_test['exe_weighting']; |
|
53 | - } |
|
54 | - if ($weighting != 0) { |
|
55 | - $moyenne_test = round(($result * 100) / $weighting); |
|
56 | - } else { |
|
57 | - $moyenne_test = null; |
|
58 | - } |
|
59 | - echo '<tr><td>'.$a_course['title'].'</td><td> </td><td> </td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td> </tr>'; |
|
60 | - } |
|
61 | - echo '</table>'; |
|
62 | - echo "<br /><br />"; |
|
63 | - echo "<form method='post'><input type='submit' name='export' value='".get_lang('ExportExcel')."'/><form>"; |
|
47 | + $result_moy_test = Database::query($sql_moy_test); |
|
48 | + $result = 0; |
|
49 | + $weighting = 0; |
|
50 | + while ($moy_test = Database::fetch_array($result_moy_test)) { |
|
51 | + $result = $result + $moy_test['exe_result']; |
|
52 | + $weighting = $weighting + $moy_test['exe_weighting']; |
|
53 | + } |
|
54 | + if ($weighting != 0) { |
|
55 | + $moyenne_test = round(($result * 100) / $weighting); |
|
56 | + } else { |
|
57 | + $moyenne_test = null; |
|
58 | + } |
|
59 | + echo '<tr><td>'.$a_course['title'].'</td><td> </td><td> </td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td> </tr>'; |
|
60 | + } |
|
61 | + echo '</table>'; |
|
62 | + echo "<br /><br />"; |
|
63 | + echo "<form method='post'><input type='submit' name='export' value='".get_lang('ExportExcel')."'/><form>"; |
|
64 | 64 | } else { |
65 | - echo get_lang('NoCourse'); |
|
65 | + echo get_lang('NoCourse'); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | Display :: display_footer(); |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | |
21 | 21 | $this_section = SECTION_TRACKING; |
22 | 22 | |
23 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
23 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
24 | 24 | |
25 | 25 | if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) { |
26 | - $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers')); |
|
26 | + $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers')); |
|
27 | 27 | } |
28 | 28 | |
29 | -if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") { |
|
30 | - $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors')); |
|
29 | +if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") { |
|
30 | + $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors')); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | function get_count_users() |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | $courseId = $courseInfo['real_id']; |
124 | 124 | |
125 | 125 | if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) { |
126 | - $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
127 | - $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
126 | + $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
127 | + $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
128 | 128 | if (is_numeric($my_average)) { |
129 | 129 | $avg_student_score += $my_average; |
130 | 130 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'"> |
164 | 164 | '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>'; |
165 | 165 | } else { |
166 | - $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
166 | + $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
167 | 167 | '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>'; |
168 | 168 | } |
169 | 169 | $row[] = $detailsLink; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | if (api_is_drh()) { |
185 | 185 | $menu_items = array( |
186 | - Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ), |
|
186 | + Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"), |
|
187 | 187 | Display::url(Display::return_icon('user_na.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), '#'), |
188 | 188 | Display::url(Display::return_icon('teacher.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'), |
189 | 189 | Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'), |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | $actionsRight = Display::url(Display::return_icon('printer.png', get_lang('Print'), array(), ICON_SIZE_MEDIUM), 'javascript: void(0);', array('onclick'=>'javascript: window.print();')); |
202 | 202 | $actionsRight .= Display::url(Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), ICON_SIZE_MEDIUM), api_get_self().'?export=csv&keyword='.$keyword); |
203 | -$toolbar = Display::toolbarAction('toolbar-user', $content = array( 0 => $actionsLeft, 1 => $actionsRight )); |
|
203 | +$toolbar = Display::toolbarAction('toolbar-user', $content = array(0 => $actionsLeft, 1 => $actionsRight)); |
|
204 | 204 | |
205 | 205 | $table = new SortableTable( |
206 | 206 | 'tracking_student', |
@@ -232,14 +232,14 @@ discard block |
||
232 | 232 | |
233 | 233 | if ($export_csv) { |
234 | 234 | if ($is_western_name_order) { |
235 | - $csv_header[] = array ( |
|
235 | + $csv_header[] = array( |
|
236 | 236 | get_lang('FirstName'), |
237 | 237 | get_lang('LastName'), |
238 | 238 | get_lang('FirstLogin'), |
239 | 239 | get_lang('LastConnexion') |
240 | 240 | ); |
241 | 241 | } else { |
242 | - $csv_header[] = array ( |
|
242 | + $csv_header[] = array( |
|
243 | 243 | get_lang('LastName'), |
244 | 244 | get_lang('FirstName'), |
245 | 245 | get_lang('FirstLogin'), |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | |
6 | 6 | require_once '../inc/global.inc.php'; |
7 | 7 | |
8 | -$exportCSV = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false; |
|
9 | -$display = isset($_GET['display']) ? Security::remove_XSS($_GET['display']) : null; |
|
8 | +$exportCSV = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false; |
|
9 | +$display = isset($_GET['display']) ? Security::remove_XSS($_GET['display']) : null; |
|
10 | 10 | |
11 | 11 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
12 | 12 | // the section (for the tabs) |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | $csv_content = array(); |
16 | 16 | $nameTools = get_lang('MySpace'); |
17 | 17 | |
18 | -$is_platform_admin = api_is_platform_admin(); |
|
18 | +$is_platform_admin = api_is_platform_admin(); |
|
19 | 19 | $is_drh = api_is_drh(); |
20 | -$is_session_admin = api_is_session_admin(); |
|
20 | +$is_session_admin = api_is_session_admin(); |
|
21 | 21 | |
22 | 22 | if ($exportCSV) { |
23 | 23 | if ($display == 'user') { |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | api_not_allowed(true); |
17 | 17 | } |
18 | 18 | |
19 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('MySpace')); |
|
19 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('MySpace')); |
|
20 | 20 | $tool_name = get_lang('Report'); |
21 | 21 | |
22 | 22 | $this_section = SECTION_TRACKING; |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | |
43 | 43 | //Column config |
44 | 44 | $column_model = array( |
45 | - array('name'=>'course', 'index'=>'title', 'width'=>'180', 'align'=>'left', 'wrap_cell' => 'true'), |
|
46 | - array('name'=>'user', 'index'=>'user', 'width'=>'100', 'align'=>'left','sortable'=>'false', 'wrap_cell' => 'true'), |
|
47 | - array('name'=>'email', 'index'=>'email', 'width'=>'100', 'align'=>'left','sortable'=>'false', 'wrap_cell' => 'true'), |
|
48 | - array('name'=>'time', 'index'=>'time', 'width'=>'50', 'align'=>'left','sortable'=>'false'), |
|
49 | - array('name'=>'certificate', 'index'=>'certificate', 'width'=>'50', 'align'=>'left','sortable'=>'false'), |
|
50 | - array('name'=>'progress_100', 'index'=>'progress_100', 'width'=>'50', 'align'=>'left','sortable'=>'false'), |
|
51 | - array('name'=>'progress', 'index'=>'progress', 'width'=>'50', 'align'=>'left','sortable'=>'false') |
|
45 | + array('name'=>'course', 'index'=>'title', 'width'=>'180', 'align'=>'left', 'wrap_cell' => 'true'), |
|
46 | + array('name'=>'user', 'index'=>'user', 'width'=>'100', 'align'=>'left', 'sortable'=>'false', 'wrap_cell' => 'true'), |
|
47 | + array('name'=>'email', 'index'=>'email', 'width'=>'100', 'align'=>'left', 'sortable'=>'false', 'wrap_cell' => 'true'), |
|
48 | + array('name'=>'time', 'index'=>'time', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'), |
|
49 | + array('name'=>'certificate', 'index'=>'certificate', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'), |
|
50 | + array('name'=>'progress_100', 'index'=>'progress_100', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'), |
|
51 | + array('name'=>'progress', 'index'=>'progress', 'width'=>'50', 'align'=>'left', 'sortable'=>'false') |
|
52 | 52 | ); |
53 | 53 | |
54 | 54 | if (!empty($extra_fields)) { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | if (api_is_student_boss()) { |
70 | - $column_model[] = array('name'=>'group', 'index'=>'group', 'width'=>'50', 'align'=>'left','sortable'=>'false'); |
|
70 | + $column_model[] = array('name'=>'group', 'index'=>'group', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'); |
|
71 | 71 | $columns[] = get_lang('Group'); |
72 | 72 | } |
73 | 73 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | $htmlHeadXtra[] = '<script> |
80 | 80 | $(function() { |
81 | - '.Display::grid_js('user_course_report', $url, $columns, $column_model, $extra_params, array(), null, true).' |
|
81 | + '.Display::grid_js('user_course_report', $url, $columns, $column_model, $extra_params, array(), null, true).' |
|
82 | 82 | jQuery("#user_course_report").jqGrid("navGrid","#user_course_report_pager",{ |
83 | 83 | view:false, |
84 | 84 | edit:false, |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | if (api_is_student_boss()) { |
103 | 103 | $actions .= Display::url( |
104 | 104 | Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), |
105 | - api_get_path(WEB_CODE_PATH) . "auth/my_progress.php" |
|
105 | + api_get_path(WEB_CODE_PATH)."auth/my_progress.php" |
|
106 | 106 | ); |
107 | 107 | $actions .= Display::url( |
108 | 108 | Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), |
109 | - api_get_path(WEB_CODE_PATH) . "mySpace/student.php" |
|
109 | + api_get_path(WEB_CODE_PATH)."mySpace/student.php" |
|
110 | 110 | ); |
111 | 111 | $actions .= Display::url( |
112 | 112 | Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM), |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | [], |
120 | 120 | ICON_SIZE_MEDIUM |
121 | 121 | ), |
122 | - api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php" |
|
122 | + api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php" |
|
123 | 123 | ); |
124 | 124 | } |
125 | 125 | |
@@ -130,13 +130,13 @@ discard block |
||
130 | 130 | } |
131 | 131 | $content .= Display::url( |
132 | 132 | get_lang("CompanyReportResumed"), |
133 | - api_get_path(WEB_CODE_PATH) . "mySpace/company_reports_resumed.php", |
|
133 | + api_get_path(WEB_CODE_PATH)."mySpace/company_reports_resumed.php", |
|
134 | 134 | array( |
135 | 135 | 'class' => 'btn btn-success' |
136 | 136 | ) |
137 | 137 | ); |
138 | 138 | $content .= '</div>'; |
139 | -$content .= '<h1 class="page-header">' . get_lang('CompanyReport') . '</h1>'; |
|
139 | +$content .= '<h1 class="page-header">'.get_lang('CompanyReport').'</h1>'; |
|
140 | 140 | $content .= Display::grid_html('user_course_report'); |
141 | 141 | |
142 | 142 | $tpl = new Template($tool_name); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
20 | 20 | |
21 | 21 | if (isset($_GET["id_student"])) { |
22 | - $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang('Students')); |
|
22 | + $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang('Students')); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | Display :: display_header($nameTools); |
@@ -41,26 +41,26 @@ discard block |
||
41 | 41 | */ |
42 | 42 | |
43 | 43 | if (isset($_POST['export'])) { |
44 | - $order_clause = api_is_western_name_order(PERSON_NAME_DATA_EXPORT) ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; |
|
44 | + $order_clause = api_is_western_name_order(PERSON_NAME_DATA_EXPORT) ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; |
|
45 | 45 | } else { |
46 | - $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; |
|
46 | + $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | if (isset($_GET["id_student"])) { |
50 | - $id_student = intval($_GET["id_student"]); |
|
51 | - $sql_coachs = "SELECT DISTINCT srcru.user_id as id_coach |
|
50 | + $id_student = intval($_GET["id_student"]); |
|
51 | + $sql_coachs = "SELECT DISTINCT srcru.user_id as id_coach |
|
52 | 52 | FROM $tbl_session_rel_course_rel_user as srcru |
53 | 53 | WHERE srcru.user_id='$id_student' AND srcru.status=2"; |
54 | 54 | } else { |
55 | - if (api_is_platform_admin()) { |
|
56 | - $sql_coachs = "SELECT DISTINCT |
|
55 | + if (api_is_platform_admin()) { |
|
56 | + $sql_coachs = "SELECT DISTINCT |
|
57 | 57 | srcru.user_id as id_coach, user_id, lastname, firstname |
58 | 58 | FROM $tbl_user, $tbl_session_rel_course_rel_user srcru |
59 | 59 | WHERE |
60 | 60 | srcru.user_id=user_id AND |
61 | 61 | srcru.status=2 ".$order_clause; |
62 | - } else { |
|
63 | - $sql_coachs = "SELECT DISTINCT user_id as id_coach, user.user_id, lastname, firstname |
|
62 | + } else { |
|
63 | + $sql_coachs = "SELECT DISTINCT user_id as id_coach, user.user_id, lastname, firstname |
|
64 | 64 | FROM |
65 | 65 | $tbl_user as user, |
66 | 66 | $tbl_session_rel_course_user as srcu, |
@@ -74,13 +74,13 @@ discard block |
||
74 | 74 | srcu.user_id = user.user_id AND |
75 | 75 | srcu.status = 2 |
76 | 76 | ".$order_clause; |
77 | - } |
|
77 | + } |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | $result_coachs = Database::query($sql_coachs); |
81 | 81 | |
82 | 82 | if (api_is_western_name_order()) { |
83 | - echo '<table class="data_table"> |
|
83 | + echo '<table class="data_table"> |
|
84 | 84 | <tr> |
85 | 85 | <th>'.get_lang('FirstName').'</th> |
86 | 86 | <th>'.get_lang('LastName').'</th> |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | <th>'.get_lang('Students').'</th> |
90 | 90 | </tr>'; |
91 | 91 | } else { |
92 | - echo '<table class="data_table"> |
|
92 | + echo '<table class="data_table"> |
|
93 | 93 | <tr> |
94 | 94 | <th>'.get_lang('LastName').'</th> |
95 | 95 | <th>'.get_lang('FirstName').'</th> |
@@ -100,79 +100,79 @@ discard block |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
103 | - $header[] = get_lang('FirstName', ''); |
|
104 | - $header[] = get_lang('LastName', ''); |
|
103 | + $header[] = get_lang('FirstName', ''); |
|
104 | + $header[] = get_lang('LastName', ''); |
|
105 | 105 | } else { |
106 | - $header[] = get_lang('LastName', ''); |
|
107 | - $header[] = get_lang('FirstName', ''); |
|
106 | + $header[] = get_lang('LastName', ''); |
|
107 | + $header[] = get_lang('FirstName', ''); |
|
108 | 108 | } |
109 | 109 | $header[] = get_lang('ConnectionTime', ''); |
110 | 110 | |
111 | 111 | if (Database::num_rows($result_coachs) > 0) { |
112 | - while ($coachs = Database::fetch_array($result_coachs)) { |
|
113 | - $id_coach = $coachs["id_coach"]; |
|
112 | + while ($coachs = Database::fetch_array($result_coachs)) { |
|
113 | + $id_coach = $coachs["id_coach"]; |
|
114 | 114 | |
115 | - if (isset($_GET["id_student"])) { |
|
116 | - $sql_infos_coach = "SELECT lastname, firstname |
|
115 | + if (isset($_GET["id_student"])) { |
|
116 | + $sql_infos_coach = "SELECT lastname, firstname |
|
117 | 117 | FROM $tbl_user |
118 | 118 | WHERE user_id='$id_coach'"; |
119 | - $result_coachs_infos = Database::query($sql_infos_coach); |
|
120 | - $lastname = Database::result($result_coachs_infos, 0, "lastname"); |
|
121 | - $firstname = Database::result($result_coachs_infos, 0, "firstname"); |
|
122 | - } else { |
|
123 | - $lastname = $coachs["lastname"]; |
|
124 | - $firstname = $coachs["firstname"]; |
|
125 | - } |
|
126 | - |
|
127 | - $sql_connection_time = "SELECT login_date, logout_date |
|
119 | + $result_coachs_infos = Database::query($sql_infos_coach); |
|
120 | + $lastname = Database::result($result_coachs_infos, 0, "lastname"); |
|
121 | + $firstname = Database::result($result_coachs_infos, 0, "firstname"); |
|
122 | + } else { |
|
123 | + $lastname = $coachs["lastname"]; |
|
124 | + $firstname = $coachs["firstname"]; |
|
125 | + } |
|
126 | + |
|
127 | + $sql_connection_time = "SELECT login_date, logout_date |
|
128 | 128 | FROM $tbl_track_login |
129 | 129 | WHERE login_user_id ='$id_coach' AND logout_date <> 'null'"; |
130 | - $result_connection_time = Database::query($sql_connection_time); |
|
131 | - |
|
132 | - $nb_seconds = 0; |
|
133 | - while ($connections = Database::fetch_array($result_connection_time)) { |
|
134 | - $login_date = $connections["login_date"]; |
|
135 | - $logout_date = $connections["logout_date"]; |
|
136 | - $timestamp_login_date = strtotime($login_date); |
|
137 | - $timestamp_logout_date = strtotime($logout_date); |
|
138 | - $nb_seconds += ($timestamp_logout_date - $timestamp_login_date); |
|
139 | - } |
|
140 | - |
|
141 | - if ($nb_seconds == 0) { |
|
142 | - $s_connection_time = ''; |
|
143 | - } else { |
|
144 | - $s_connection_time = api_time_to_hms($nb_seconds); |
|
145 | - } |
|
146 | - |
|
147 | - if ($i % 2 == 0) { |
|
148 | - $css_class = "row_odd"; |
|
149 | - if ($i % 20 == 0 && $i != 0) { |
|
150 | - if (api_is_western_name_order()) { |
|
151 | - echo '<tr> |
|
130 | + $result_connection_time = Database::query($sql_connection_time); |
|
131 | + |
|
132 | + $nb_seconds = 0; |
|
133 | + while ($connections = Database::fetch_array($result_connection_time)) { |
|
134 | + $login_date = $connections["login_date"]; |
|
135 | + $logout_date = $connections["logout_date"]; |
|
136 | + $timestamp_login_date = strtotime($login_date); |
|
137 | + $timestamp_logout_date = strtotime($logout_date); |
|
138 | + $nb_seconds += ($timestamp_logout_date - $timestamp_login_date); |
|
139 | + } |
|
140 | + |
|
141 | + if ($nb_seconds == 0) { |
|
142 | + $s_connection_time = ''; |
|
143 | + } else { |
|
144 | + $s_connection_time = api_time_to_hms($nb_seconds); |
|
145 | + } |
|
146 | + |
|
147 | + if ($i % 2 == 0) { |
|
148 | + $css_class = "row_odd"; |
|
149 | + if ($i % 20 == 0 && $i != 0) { |
|
150 | + if (api_is_western_name_order()) { |
|
151 | + echo '<tr> |
|
152 | 152 | <th>'.get_lang('FirstName').'</th> |
153 | 153 | <th>'.get_lang('LastName').'</th> |
154 | 154 | <th>'.get_lang('ConnectionTime').'</th> |
155 | 155 | <th>'.get_lang('AdminCourses').'</th> |
156 | 156 | <th>'.get_lang('Students').'</th> |
157 | 157 | </tr>'; |
158 | - } else { |
|
159 | - echo '<tr> |
|
158 | + } else { |
|
159 | + echo '<tr> |
|
160 | 160 | <th>'.get_lang('LastName').'</th> |
161 | 161 | <th>'.get_lang('FirstName').'</th> |
162 | 162 | <th>'.get_lang('ConnectionTime').'</th> |
163 | 163 | <th>'.get_lang('AdminCourses').'</th> |
164 | 164 | <th>'.get_lang('Students').'</th> |
165 | 165 | </tr>'; |
166 | - } |
|
167 | - } |
|
168 | - } else { |
|
169 | - $css_class = "row_even"; |
|
170 | - } |
|
166 | + } |
|
167 | + } |
|
168 | + } else { |
|
169 | + $css_class = "row_even"; |
|
170 | + } |
|
171 | 171 | |
172 | - $i++; |
|
172 | + $i++; |
|
173 | 173 | |
174 | - if (api_is_western_name_order()) { |
|
175 | - echo '<tr class="'.$css_class.'"> |
|
174 | + if (api_is_western_name_order()) { |
|
175 | + echo '<tr class="'.$css_class.'"> |
|
176 | 176 | <td>'.$firstname.'</td><td>'.$lastname.'</td><td>'.$s_connection_time.'</td> |
177 | 177 | <td> |
178 | 178 | <a href="course.php?type=coach&user_id='.$id_coach.'"> |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | </a> |
186 | 186 | </td> |
187 | 187 | </tr>'; |
188 | - } else { |
|
189 | - echo '<tr class="'.$css_class.'"> |
|
188 | + } else { |
|
189 | + echo '<tr class="'.$css_class.'"> |
|
190 | 190 | <td>'.$lastname.'</td><td>'.$firstname.'</td> |
191 | 191 | <td>'.$s_connection_time.'</td> |
192 | 192 | <td> |
@@ -197,25 +197,25 @@ discard block |
||
197 | 197 | '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a> |
198 | 198 | </td> |
199 | 199 | </tr>'; |
200 | - } |
|
201 | - |
|
202 | - if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
|
203 | - $data[$id_coach]["firstname"] = $firstname; |
|
204 | - $data[$id_coach]["lastname"] = $lastname; |
|
205 | - } else { |
|
206 | - $data[$id_coach]["lastname"] = $lastname; |
|
207 | - $data[$id_coach]["firstname"] = $firstname; |
|
208 | - } |
|
209 | - $data[$id_coach]["connection_time"] = $s_connection_time; |
|
210 | - } |
|
200 | + } |
|
201 | + |
|
202 | + if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
|
203 | + $data[$id_coach]["firstname"] = $firstname; |
|
204 | + $data[$id_coach]["lastname"] = $lastname; |
|
205 | + } else { |
|
206 | + $data[$id_coach]["lastname"] = $lastname; |
|
207 | + $data[$id_coach]["firstname"] = $firstname; |
|
208 | + } |
|
209 | + $data[$id_coach]["connection_time"] = $s_connection_time; |
|
210 | + } |
|
211 | 211 | } else { |
212 | - // No results |
|
213 | - echo '<tr><td colspan="5">'.get_lang("NoResult").'</td></tr>'; |
|
212 | + // No results |
|
213 | + echo '<tr><td colspan="5">'.get_lang("NoResult").'</td></tr>'; |
|
214 | 214 | } |
215 | 215 | echo '</table>'; |
216 | 216 | |
217 | 217 | if (isset($_POST['export'])){ |
218 | - export_csv($header, $data, 'coaches.csv'); |
|
218 | + export_csv($header, $data, 'coaches.csv'); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | echo "<br /><br />"; |
@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | $nameTools = get_lang('Tutors'); |
17 | 17 | |
18 | 18 | api_block_anonymous_users(); |
19 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
19 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
20 | 20 | |
21 | 21 | if (isset($_GET["id_student"])) { |
22 | - $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang('Students')); |
|
22 | + $interbreadcrumb[] = array("url" => "student.php", "name" => get_lang('Students')); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | Display :: display_header($nameTools); |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | api_display_tool_title($nameTools); |
28 | 28 | |
29 | 29 | // Database Table Definitions |
30 | -$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
31 | -$tbl_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); |
|
32 | -$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
33 | -$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
34 | -$tbl_session_rel_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
35 | -$tbl_session_rel_course_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
36 | -$tbl_session_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER); |
|
37 | -$tbl_track_login = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); |
|
30 | +$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
31 | +$tbl_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); |
|
32 | +$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
33 | +$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
34 | +$tbl_session_rel_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
35 | +$tbl_session_rel_course_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
36 | +$tbl_session_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER); |
|
37 | +$tbl_track_login = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * MAIN PART |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | } |
215 | 215 | echo '</table>'; |
216 | 216 | |
217 | -if (isset($_POST['export'])){ |
|
217 | +if (isset($_POST['export'])) { |
|
218 | 218 | export_csv($header, $data, 'coaches.csv'); |
219 | 219 | } |
220 | 220 | |
@@ -222,8 +222,8 @@ discard block |
||
222 | 222 | echo " |
223 | 223 | <br /><br /> |
224 | 224 | <form method='post' action='coaches.php'> |
225 | - <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'> |
|
226 | - " . get_lang('ExportExcel') . " |
|
225 | + <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel')."'> |
|
226 | + " . get_lang('ExportExcel')." |
|
227 | 227 | </button> |
228 | 228 | <form> |
229 | 229 | "; |
@@ -63,53 +63,53 @@ discard block |
||
63 | 63 | if ($origin == 'user_course') { |
64 | 64 | $course_info = CourseManager :: get_course_information($get_course_code); |
65 | 65 | if (empty ($cidReq)) { |
66 | - $interbreadcrumb[] = array ( |
|
67 | - "url" => api_get_path(WEB_COURSE_PATH) . $course_info['directory'], |
|
66 | + $interbreadcrumb[] = array( |
|
67 | + "url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], |
|
68 | 68 | 'name' => $course_info['title'] |
69 | 69 | ); |
70 | 70 | } |
71 | - $interbreadcrumb[] = array ( |
|
72 | - "url" => "../user/user.php?cidReq=" . $get_course_code, |
|
71 | + $interbreadcrumb[] = array( |
|
72 | + "url" => "../user/user.php?cidReq=".$get_course_code, |
|
73 | 73 | "name" => get_lang("Users") |
74 | 74 | ); |
75 | 75 | } else |
76 | 76 | if ($origin == 'tracking_course') { |
77 | 77 | $course_info = CourseManager :: get_course_information($get_course_code); |
78 | - $interbreadcrumb[] = array ( |
|
79 | - "url" => "../tracking/courseLog.php?cidReq=".$get_course_code.'&id_session=' . api_get_session_id(), |
|
78 | + $interbreadcrumb[] = array( |
|
79 | + "url" => "../tracking/courseLog.php?cidReq=".$get_course_code.'&id_session='.api_get_session_id(), |
|
80 | 80 | "name" => get_lang("Tracking") |
81 | 81 | ); |
82 | 82 | } else |
83 | 83 | if ($origin == 'resume_session') { |
84 | - $interbreadcrumb[] = array ( |
|
84 | + $interbreadcrumb[] = array( |
|
85 | 85 | 'url' => "../session/session_list.php", |
86 | 86 | "name" => get_lang('SessionList') |
87 | 87 | ); |
88 | - $interbreadcrumb[] = array ( |
|
89 | - 'url' => "../session/resume_session.php?id_session=" . $sessionId, |
|
88 | + $interbreadcrumb[] = array( |
|
89 | + 'url' => "../session/resume_session.php?id_session=".$sessionId, |
|
90 | 90 | "name" => get_lang('SessionOverview') |
91 | 91 | ); |
92 | 92 | } else { |
93 | - $interbreadcrumb[] = array ( |
|
93 | + $interbreadcrumb[] = array( |
|
94 | 94 | "url" => "index.php", |
95 | 95 | "name" => get_lang('MySpace') |
96 | 96 | ); |
97 | 97 | if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) { |
98 | - $interbreadcrumb[] = array ( |
|
99 | - "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']), |
|
98 | + $interbreadcrumb[] = array( |
|
99 | + "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach']), |
|
100 | 100 | "name" => get_lang("CoachStudents") |
101 | 101 | ); |
102 | - $interbreadcrumb[] = array ( |
|
103 | - "url" => "myStudents.php?student=" . Security :: remove_XSS($_GET['student']) . '&id_coach=' . Security :: remove_XSS($_GET['id_coach']), |
|
102 | + $interbreadcrumb[] = array( |
|
103 | + "url" => "myStudents.php?student=".Security :: remove_XSS($_GET['student']).'&id_coach='.Security :: remove_XSS($_GET['id_coach']), |
|
104 | 104 | "name" => get_lang("StudentDetails") |
105 | 105 | ); |
106 | 106 | } else { |
107 | - $interbreadcrumb[] = array ( |
|
107 | + $interbreadcrumb[] = array( |
|
108 | 108 | "url" => "student.php", |
109 | 109 | "name" => get_lang("MyStudents") |
110 | 110 | ); |
111 | - $interbreadcrumb[] = array ( |
|
112 | - "url" => "myStudents.php?student=" . Security :: remove_XSS($_GET['student']), |
|
111 | + $interbreadcrumb[] = array( |
|
112 | + "url" => "myStudents.php?student=".Security :: remove_XSS($_GET['student']), |
|
113 | 113 | "name" => get_lang("StudentDetails") |
114 | 114 | ); |
115 | 115 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $nameTools = get_lang("DetailsStudentInCourse"); |
118 | 118 | } else { |
119 | 119 | if ($origin == 'resume_session') { |
120 | - $interbreadcrumb[] = array ( |
|
120 | + $interbreadcrumb[] = array( |
|
121 | 121 | 'url' => "../session/session_list.php", |
122 | 122 | "name" => get_lang('SessionList') |
123 | 123 | ); |
@@ -128,24 +128,24 @@ discard block |
||
128 | 128 | ); |
129 | 129 | } |
130 | 130 | } else { |
131 | - $interbreadcrumb[] = array ( |
|
131 | + $interbreadcrumb[] = array( |
|
132 | 132 | "url" => "index.php", |
133 | 133 | "name" => get_lang('MySpace') |
134 | 134 | ); |
135 | 135 | if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) { |
136 | 136 | if ($sessionId) { |
137 | - $interbreadcrumb[] = array ( |
|
138 | - "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']) . "&id_session=" . $sessionId, |
|
137 | + $interbreadcrumb[] = array( |
|
138 | + "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach'])."&id_session=".$sessionId, |
|
139 | 139 | "name" => get_lang("CoachStudents") |
140 | 140 | ); |
141 | 141 | } else { |
142 | - $interbreadcrumb[] = array ( |
|
143 | - "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']), |
|
142 | + $interbreadcrumb[] = array( |
|
143 | + "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach']), |
|
144 | 144 | "name" => get_lang("CoachStudents") |
145 | 145 | ); |
146 | 146 | } |
147 | 147 | } else { |
148 | - $interbreadcrumb[] = array ( |
|
148 | + $interbreadcrumb[] = array( |
|
149 | 149 | "url" => "student.php", |
150 | 150 | "name" => get_lang("MyStudents") |
151 | 151 | ); |
@@ -316,28 +316,28 @@ discard block |
||
316 | 316 | // Actions bar |
317 | 317 | echo '<div class="actions">'; |
318 | 318 | echo '<a href="javascript: window.history.go(-1);">'. |
319 | - Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
319 | + Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
320 | 320 | |
321 | 321 | echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
322 | - Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
322 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
323 | 323 | |
324 | - echo '<a href="' . api_get_self() . '?' . Security :: remove_XSS($_SERVER['QUERY_STRING']) . '&export=csv">'. |
|
325 | - Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a> '; |
|
324 | + echo '<a href="'.api_get_self().'?'.Security :: remove_XSS($_SERVER['QUERY_STRING']).'&export=csv">'. |
|
325 | + Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a> '; |
|
326 | 326 | |
327 | - echo '<a href="' . api_get_self() . '?' . Security :: remove_XSS($_SERVER['QUERY_STRING']) . '&export=xls">'. |
|
328 | - Display::return_icon('export_excel.png', get_lang('ExportAsXLS'),'',ICON_SIZE_MEDIUM).'</a> '; |
|
327 | + echo '<a href="'.api_get_self().'?'.Security :: remove_XSS($_SERVER['QUERY_STRING']).'&export=xls">'. |
|
328 | + Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a> '; |
|
329 | 329 | |
330 | 330 | if (!empty ($user_info['email'])) { |
331 | 331 | $send_mail = '<a href="mailto:'.$user_info['email'].'">'. |
332 | - Display :: return_icon('mail_send.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
332 | + Display :: return_icon('mail_send.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
333 | 333 | } else { |
334 | - $send_mail = Display :: return_icon('mail_send_na.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM); |
|
334 | + $send_mail = Display :: return_icon('mail_send_na.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM); |
|
335 | 335 | } |
336 | 336 | echo $send_mail; |
337 | 337 | if (!empty($student_id) && !empty($_GET['course'])) { |
338 | 338 | // Only show link to connection details if course and student were defined in the URL |
339 | - echo '<a href="access_details.php?student=' . $student_id . '&course=' . Security :: remove_XSS($_GET['course']) . '&origin=' . $origin. '&cidReq='.Security::remove_XSS($_GET['course']).'&id_session='.$sessionId.'">'. |
|
340 | - Display :: return_icon('statistics.png', get_lang('AccessDetails'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
339 | + echo '<a href="access_details.php?student='.$student_id.'&course='.Security :: remove_XSS($_GET['course']).'&origin='.$origin.'&cidReq='.Security::remove_XSS($_GET['course']).'&id_session='.$sessionId.'">'. |
|
340 | + Display :: return_icon('statistics.png', get_lang('AccessDetails'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
341 | 341 | } |
342 | 342 | if (api_can_login_as($student_id)) { |
343 | 343 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_list.php?action=login_as&user_id='.$student_id.'&sec_token='.$token.'">'. |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | $csv_content[] = array( |
407 | 407 | get_lang('Information', '') |
408 | 408 | ); |
409 | - $csv_content[] = array ( |
|
409 | + $csv_content[] = array( |
|
410 | 410 | get_lang('Name', ''), |
411 | 411 | get_lang('Email', ''), |
412 | 412 | get_lang('Tel', '') |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | strip_tags($first_connection_date), |
435 | 435 | strip_tags($last_connection_date), |
436 | 436 | $time_spent_on_the_course, |
437 | - $avg_student_progress . '%', |
|
437 | + $avg_student_progress.'%', |
|
438 | 438 | $avg_student_score |
439 | 439 | ); |
440 | 440 | |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | foreach ($course_coachs as $course_coach) { |
455 | 455 | $info_tutor_name[] = api_get_person_name($course_coach['firstname'], $course_coach['lastname']); |
456 | 456 | } |
457 | - $info_course['tutor_name'] = implode(",",$info_tutor_name); |
|
457 | + $info_course['tutor_name'] = implode(",", $info_tutor_name); |
|
458 | 458 | } elseif ($session_coach_id != 0) { |
459 | 459 | $session_coach_id = intval($session_info['id_coach']); |
460 | 460 | $coach_info = api_get_user_info($session_coach_id); |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | $session_name = $session_info['name']; |
465 | 465 | } // end |
466 | 466 | |
467 | - $info_course = CourseManager :: get_course_information($get_course_code); |
|
467 | + $info_course = CourseManager :: get_course_information($get_course_code); |
|
468 | 468 | $table_title = Display::return_icon('user.png', get_lang('User'), array(), ICON_SIZE_SMALL).$user_info['complete_name']; |
469 | 469 | |
470 | 470 | echo Display::page_subheader($table_title); |
@@ -482,19 +482,19 @@ discard block |
||
482 | 482 | </thead> |
483 | 483 | <tbody> |
484 | 484 | <tr> |
485 | - <td><?php echo get_lang('Name') . ' : '.$user_info['complete_name']; ?></td> |
|
485 | + <td><?php echo get_lang('Name').' : '.$user_info['complete_name']; ?></td> |
|
486 | 486 | </tr> |
487 | 487 | <tr> |
488 | - <td><?php echo get_lang('Email') . ' : '; |
|
488 | + <td><?php echo get_lang('Email').' : '; |
|
489 | 489 | if (!empty ($user_info['email'])) { |
490 | - echo '<a href="mailto:' . $user_info['email'] . '">' . $user_info['email'] . '</a>'; |
|
490 | + echo '<a href="mailto:'.$user_info['email'].'">'.$user_info['email'].'</a>'; |
|
491 | 491 | } else { |
492 | 492 | echo get_lang('NoEmail'); |
493 | 493 | } ?> |
494 | 494 | </td> |
495 | 495 | </tr> |
496 | 496 | <tr> |
497 | - <td> <?php echo get_lang('Tel') . ' : '; |
|
497 | + <td> <?php echo get_lang('Tel').' : '; |
|
498 | 498 | if (!empty ($user_info['phone'])) { |
499 | 499 | echo $user_info['phone']; |
500 | 500 | } else { |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | </td> |
505 | 505 | </tr> |
506 | 506 | <tr> |
507 | - <td> <?php echo get_lang('OfficialCode') . ' : '; |
|
507 | + <td> <?php echo get_lang('OfficialCode').' : '; |
|
508 | 508 | if (!empty ($user_info['official_code'])) { |
509 | 509 | echo $user_info['official_code']; |
510 | 510 | } else { |
@@ -514,13 +514,13 @@ discard block |
||
514 | 514 | </td> |
515 | 515 | </tr> |
516 | 516 | <tr> |
517 | - <td><?php echo get_lang('OnLine') . ' : '.$online; ?> </td> |
|
517 | + <td><?php echo get_lang('OnLine').' : '.$online; ?> </td> |
|
518 | 518 | </tr> |
519 | 519 | <?php |
520 | 520 | |
521 | 521 | // Display timezone if the user selected one and if the admin allows the use of user's timezone |
522 | 522 | $timezone = null; |
523 | - $timezone_user = UserManager::get_extra_user_data_by_field($user_info['user_id'],'timezone'); |
|
523 | + $timezone_user = UserManager::get_extra_user_data_by_field($user_info['user_id'], 'timezone'); |
|
524 | 524 | $use_users_timezone = api_get_setting('use_users_timezone', 'timezones'); |
525 | 525 | if ($timezone_user['timezone'] != null && $use_users_timezone == 'true') { |
526 | 526 | $timezone = $timezone_user['timezone']; |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | if ($timezone !== null) { |
529 | 529 | ?> |
530 | 530 | <tr> |
531 | - <td> <?php echo get_lang('Timezone') . ' : '.$timezone; ?> </td> |
|
531 | + <td> <?php echo get_lang('Timezone').' : '.$timezone; ?> </td> |
|
532 | 532 | </tr> |
533 | 533 | <?php |
534 | 534 | } |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | <td align="right"> |
561 | 561 | <?php |
562 | 562 | echo get_lang('Progress').' '; |
563 | - Display :: display_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array ('align' => 'absmiddle', 'hspace' => '3px'));?> |
|
563 | + Display :: display_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')); ?> |
|
564 | 564 | </td> |
565 | 565 | <td align="left"><?php echo $avg_student_progress.'%' ?></td> |
566 | 566 | </tr> |
@@ -568,9 +568,9 @@ discard block |
||
568 | 568 | <td align="right"> |
569 | 569 | <?php |
570 | 570 | echo get_lang('Score').' '; |
571 | - Display :: display_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array ('align' => 'absmiddle', 'hspace' => '3px')); ?> |
|
571 | + Display :: display_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')); ?> |
|
572 | 572 | </td> |
573 | - <td align="left"><?php if (is_numeric($avg_student_score)) { echo $avg_student_score.'%';} else { echo $avg_student_score ;} ?></td> |
|
573 | + <td align="left"><?php if (is_numeric($avg_student_score)) { echo $avg_student_score.'%'; } else { echo $avg_student_score; } ?></td> |
|
574 | 574 | </tr> |
575 | 575 | <?php |
576 | 576 | if (!empty($nb_login)) { |
@@ -588,10 +588,10 @@ discard block |
||
588 | 588 | $table_title = ''; |
589 | 589 | if (!empty($sessionId)) { |
590 | 590 | $session_name = api_get_session_name($sessionId); |
591 | - $table_title = $session_name ? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ':''; |
|
591 | + $table_title = $session_name ? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ' : ''; |
|
592 | 592 | } |
593 | 593 | if (!empty($info_course['title'])) { |
594 | - $table_title .= $info_course ? Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$info_course['title'].' ':''; |
|
594 | + $table_title .= $info_course ? Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$info_course['title'].' ' : ''; |
|
595 | 595 | } |
596 | 596 | |
597 | 597 | echo Display::page_subheader($table_title); |
@@ -629,13 +629,13 @@ discard block |
||
629 | 629 | } |
630 | 630 | $date_session = ''; |
631 | 631 | if (!empty($access_start_date) && !empty($access_end_date)) { |
632 | - $date_session = get_lang('From') . ' ' . $access_start_date . ' ' . get_lang('Until') . ' ' . $access_end_date; |
|
632 | + $date_session = get_lang('From').' '.$access_start_date.' '.get_lang('Until').' '.$access_end_date; |
|
633 | 633 | } |
634 | 634 | $title = ''; |
635 | 635 | if (empty($sessionId)) { |
636 | 636 | $title = Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_SMALL).' '.get_lang('Courses'); |
637 | 637 | } else { |
638 | - $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session?' ('.$date_session.')':''); |
|
638 | + $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session ? ' ('.$date_session.')' : ''); |
|
639 | 639 | } |
640 | 640 | |
641 | 641 | // Courses |
@@ -686,15 +686,15 @@ discard block |
||
686 | 686 | $scoretotal = array(); |
687 | 687 | if (isset($cats) && isset($cats[0])) { |
688 | 688 | if (!empty($sessionId)) { |
689 | - $scoretotal= $cats[0]->calc_score($student_id, null, $course_code, $sessionId); |
|
689 | + $scoretotal = $cats[0]->calc_score($student_id, null, $course_code, $sessionId); |
|
690 | 690 | } else { |
691 | - $scoretotal= $cats[0]->calc_score($student_id, null, $course_code); |
|
691 | + $scoretotal = $cats[0]->calc_score($student_id, null, $course_code); |
|
692 | 692 | } |
693 | 693 | } |
694 | 694 | |
695 | 695 | $scoretotal_display = '0/0 (0%)'; |
696 | 696 | if (!empty($scoretotal)) { |
697 | - $scoretotal_display = round($scoretotal[0],1).'/'.round($scoretotal[1],1).' ('.round(($scoretotal[0] / $scoretotal[1]) * 100,2) . ' %)'; |
|
697 | + $scoretotal_display = round($scoretotal[0], 1).'/'.round($scoretotal[1], 1).' ('.round(($scoretotal[0] / $scoretotal[1]) * 100, 2).' %)'; |
|
698 | 698 | } |
699 | 699 | |
700 | 700 | $progress = Tracking::get_avg_student_progress($user_info['user_id'], $course_code, null, $sessionId); |
@@ -713,8 +713,8 @@ discard block |
||
713 | 713 | ); |
714 | 714 | |
715 | 715 | echo '<tr> |
716 | - <td ><a href="' . api_get_path(WEB_COURSE_PATH) . $course_info['directory'] .'/?id_session=' . $sessionId . '">'.$course_info['title'].'</a></td> |
|
717 | - <td >'.$time_spent_on_course .'</td> |
|
716 | + <td ><a href="' . api_get_path(WEB_COURSE_PATH).$course_info['directory'].'/?id_session='.$sessionId.'">'.$course_info['title'].'</a></td> |
|
717 | + <td >'.$time_spent_on_course.'</td> |
|
718 | 718 | <td >'.$progress.'</td> |
719 | 719 | <td >'.$score.'</td> |
720 | 720 | <td >'.$attendances_faults_avg.'</td> |
@@ -780,22 +780,22 @@ discard block |
||
780 | 780 | <table class="table table-striped table-hover"> |
781 | 781 | <thead> |
782 | 782 | <tr> |
783 | - <th><?php echo get_lang('Learnpaths');?></th> |
|
783 | + <th><?php echo get_lang('Learnpaths'); ?></th> |
|
784 | 784 | <th><?php |
785 | 785 | echo get_lang('Time').' '; |
786 | - Display :: display_icon('info3.gif', get_lang('TotalTimeByCourse'), array ('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
786 | + Display :: display_icon('info3.gif', get_lang('TotalTimeByCourse'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
787 | 787 | <th><?php |
788 | 788 | echo get_lang('AverageScore').' '; |
789 | - Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInAllAttempts'), array ( 'align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
789 | + Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInAllAttempts'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
790 | 790 | <th><?php |
791 | 791 | echo get_lang('LatestAttemptAverageScore').' '; |
792 | - Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), array ( 'align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
792 | + Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
793 | 793 | <th><?php |
794 | 794 | echo get_lang('Progress').' '; |
795 | - Display :: display_icon('info3.gif', get_lang('LPProgressScore'), array ('align' => 'absmiddle','hspace' => '3px')); ?></th> |
|
795 | + Display :: display_icon('info3.gif', get_lang('LPProgressScore'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
796 | 796 | <th><?php |
797 | 797 | echo get_lang('LastConnexion').' '; |
798 | - Display :: display_icon('info3.gif', get_lang('LastTimeTheCourseWasUsed'), array ('align' => 'absmiddle','hspace' => '3px')); ?></th> |
|
798 | + Display :: display_icon('info3.gif', get_lang('LastTimeTheCourseWasUsed'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
799 | 799 | <?php |
800 | 800 | echo '<th>'.get_lang('Details').'</th>'; |
801 | 801 | if (api_is_allowed_to_edit()) { |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | |
824 | 824 | if ($progress === null) { |
825 | 825 | $progress = '0%'; |
826 | - } else { |
|
826 | + } else { |
|
827 | 827 | $any_result = true; |
828 | 828 | } |
829 | 829 | |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | if (!empty($start_time)) { |
851 | 851 | $start_time = api_convert_and_format_date($start_time, DATE_TIME_FORMAT_LONG); |
852 | 852 | } else { |
853 | - $start_time = '-'; |
|
853 | + $start_time = '-'; |
|
854 | 854 | } |
855 | 855 | |
856 | 856 | if (!empty($total_time)) $any_result = true; |
@@ -879,11 +879,11 @@ discard block |
||
879 | 879 | $i++; |
880 | 880 | |
881 | 881 | // csv export content |
882 | - $csv_content[] = array ( |
|
882 | + $csv_content[] = array( |
|
883 | 883 | api_html_entity_decode(stripslashes($lp_name), ENT_QUOTES, $charset), |
884 | 884 | api_time_to_hms($total_time), |
885 | - $score . '%', |
|
886 | - $score_latest . '%', |
|
885 | + $score.'%', |
|
886 | + $score_latest.'%', |
|
887 | 887 | $progress.'%', |
888 | 888 | $start_time |
889 | 889 | ); |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | if ($any_result === true) { |
922 | 922 | $from = ''; |
923 | 923 | if ($from_myspace) { |
924 | - $from ='&from=myspace'; |
|
924 | + $from = '&from=myspace'; |
|
925 | 925 | } |
926 | 926 | $link = Display::url( |
927 | 927 | '<img src="../img/icons/22/2rightarrow.png" border="0" />', |
@@ -934,14 +934,14 @@ discard block |
||
934 | 934 | echo '<td>'; |
935 | 935 | if ($any_result === true) { |
936 | 936 | echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&cidReq='.Security::remove_XSS($_GET['course']).'&course='.Security::remove_XSS($_GET['course']).'&details='.Security::remove_XSS($_GET['details']).'&origin='.$origin.'&lp_id='.$learnpath->getId().'&student='.$user_info['user_id'].'&details=true&id_session='.$sessionId.'">'; |
937 | - echo Display::return_icon('clean.png',get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>'; |
|
937 | + echo Display::return_icon('clean.png', get_lang('Clean'), '', ICON_SIZE_SMALL).'</a>'; |
|
938 | 938 | echo '</a>'; |
939 | 939 | } |
940 | 940 | echo '</td>'; |
941 | 941 | echo '</tr>'; |
942 | 942 | } |
943 | 943 | $data_learnpath[$i][] = $lp_name; |
944 | - $data_learnpath[$i][] = $progress . '%'; |
|
944 | + $data_learnpath[$i][] = $progress.'%'; |
|
945 | 945 | } |
946 | 946 | } else { |
947 | 947 | //echo '<tr><td colspan="6">'.get_lang('NoLearnpath').'</td></tr>'; |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | <thead> |
959 | 959 | <tr> |
960 | 960 | <th><?php echo get_lang('Exercises'); ?></th> |
961 | - <th><?php echo get_lang('LearningPath');?></th> |
|
961 | + <th><?php echo get_lang('LearningPath'); ?></th> |
|
962 | 962 | <th><?php echo get_lang('AvgCourseScore').' '.Display :: return_icon('info3.gif', get_lang('AverageScore'), array('align' => 'absmiddle', 'hspace' => '3px')) ?></th> |
963 | 963 | <th><?php echo get_lang('Attempts'); ?></th> |
964 | 964 | <th><?php echo get_lang('LatestAttempt'); ?></th> |
@@ -977,7 +977,7 @@ discard block |
||
977 | 977 | ); |
978 | 978 | |
979 | 979 | $t_quiz = Database :: get_course_table(TABLE_QUIZ_TEST); |
980 | - $sql = "SELECT quiz.title, id FROM " . $t_quiz . " AS quiz |
|
980 | + $sql = "SELECT quiz.title, id FROM ".$t_quiz." AS quiz |
|
981 | 981 | WHERE |
982 | 982 | quiz.c_id = ".$info_course['real_id']." AND |
983 | 983 | (quiz.session_id = $sessionId OR quiz.session_id = 0) AND |
@@ -1020,7 +1020,7 @@ discard block |
||
1020 | 1020 | echo '<td>'; |
1021 | 1021 | |
1022 | 1022 | if ($count_attempts > 0) { |
1023 | - echo $score_percentage . '%'; |
|
1023 | + echo $score_percentage.'%'; |
|
1024 | 1024 | } else { |
1025 | 1025 | echo '-'; |
1026 | 1026 | $score_percentage = 0; |
@@ -1030,7 +1030,7 @@ discard block |
||
1030 | 1030 | echo '<td>'.$count_attempts.'</td>'; |
1031 | 1031 | echo '<td>'; |
1032 | 1032 | |
1033 | - $sql = 'SELECT exe_id FROM ' . $tbl_stats_exercices . ' |
|
1033 | + $sql = 'SELECT exe_id FROM '.$tbl_stats_exercices.' |
|
1034 | 1034 | WHERE |
1035 | 1035 | exe_exo_id ="'.$exercise_id.'" AND |
1036 | 1036 | exe_user_id ="'.$student_id.'" AND |
@@ -1043,18 +1043,18 @@ discard block |
||
1043 | 1043 | if (Database :: num_rows($result_last_attempt) > 0) { |
1044 | 1044 | $id_last_attempt = Database :: result($result_last_attempt, 0, 0); |
1045 | 1045 | if ($count_attempts > 0) |
1046 | - echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'"> |
|
1047 | - <img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" border="0" /> </a>'; |
|
1046 | + echo '<a href="../exercice/exercise_show.php?id='.$id_last_attempt.'&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin) ? 'tracking' : $origin).'"> |
|
1047 | + <img src="' . api_get_path(WEB_IMG_PATH).'quiz.gif" border="0" /> </a>'; |
|
1048 | 1048 | } |
1049 | 1049 | echo '</td>'; |
1050 | 1050 | |
1051 | 1051 | echo '<td>'; |
1052 | 1052 | $all_attempt_url = "../exercice/exercise_report.php?exerciseId=$exercise_id&cidReq=$course_code&filter_by_user=$student_id&id_session=$sessionId"; |
1053 | - echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url ); |
|
1053 | + echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url); |
|
1054 | 1054 | |
1055 | 1055 | echo '</td></tr>'; |
1056 | 1056 | $data_exercices[$i][] = $exercices['title']; |
1057 | - $data_exercices[$i][] = $score_percentage . '%'; |
|
1057 | + $data_exercices[$i][] = $score_percentage.'%'; |
|
1058 | 1058 | $data_exercices[$i][] = $count_attempts; |
1059 | 1059 | |
1060 | 1060 | $csv_content[] = array( |
@@ -1082,7 +1082,7 @@ discard block |
||
1082 | 1082 | $survey_list = SurveyManager::get_surveys($course_code, $sessionId); |
1083 | 1083 | |
1084 | 1084 | $survey_data = array(); |
1085 | - foreach($survey_list as $survey) { |
|
1085 | + foreach ($survey_list as $survey) { |
|
1086 | 1086 | $user_list = SurveyManager::get_people_who_filled_survey($survey['survey_id'], false, $info_course['real_id']); |
1087 | 1087 | $survey_done = Display::return_icon("accept_na.png", get_lang('NoAnswer'), array(), ICON_SIZE_SMALL); |
1088 | 1088 | if (in_array($student_id, $user_list)) { |
@@ -1107,7 +1107,7 @@ discard block |
||
1107 | 1107 | $column = 0; |
1108 | 1108 | $table->setCellContents($row, $column, $data); |
1109 | 1109 | $class = 'class="row_odd"'; |
1110 | - if($row % 2) { |
|
1110 | + if ($row % 2) { |
|
1111 | 1111 | $class = 'class="row_even"'; |
1112 | 1112 | } |
1113 | 1113 | $table->setRowAttributes($row, $class, true); |
@@ -1130,13 +1130,13 @@ discard block |
||
1130 | 1130 | </thead> |
1131 | 1131 | <tbody> |
1132 | 1132 | <?php |
1133 | - $csv_content[] = array (); |
|
1134 | - $nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId); |
|
1133 | + $csv_content[] = array(); |
|
1134 | + $nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId); |
|
1135 | 1135 | $messages = Tracking::count_student_messages($student_id, $course_code, $sessionId); |
1136 | - $links = Tracking::count_student_visited_links($student_id, $info_course['real_id'], $sessionId); |
|
1137 | - $chat_last_connection = Tracking::chat_last_connection($student_id, $info_course['real_id'], $sessionId); |
|
1136 | + $links = Tracking::count_student_visited_links($student_id, $info_course['real_id'], $sessionId); |
|
1137 | + $chat_last_connection = Tracking::chat_last_connection($student_id, $info_course['real_id'], $sessionId); |
|
1138 | 1138 | $documents = Tracking::count_student_downloaded_documents($student_id, $info_course['real_id'], $sessionId); |
1139 | - $uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $sessionId); |
|
1139 | + $uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $sessionId); |
|
1140 | 1140 | |
1141 | 1141 | $csv_content[] = array( |
1142 | 1142 | get_lang('OtherTools') |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | |
824 | 824 | if ($progress === null) { |
825 | 825 | $progress = '0%'; |
826 | - } else { |
|
826 | + } else { |
|
827 | 827 | $any_result = true; |
828 | 828 | } |
829 | 829 | |
@@ -853,7 +853,9 @@ discard block |
||
853 | 853 | $start_time = '-'; |
854 | 854 | } |
855 | 855 | |
856 | - if (!empty($total_time)) $any_result = true; |
|
856 | + if (!empty($total_time)) { |
|
857 | + $any_result = true; |
|
858 | + } |
|
857 | 859 | |
858 | 860 | // Quiz in lp |
859 | 861 | $score = Tracking::get_avg_student_score( |
@@ -873,8 +875,11 @@ discard block |
||
873 | 875 | true |
874 | 876 | ); |
875 | 877 | |
876 | - if ($i % 2 == 0) $css_class = "row_even"; |
|
877 | - else $css_class = "row_odd"; |
|
878 | + if ($i % 2 == 0) { |
|
879 | + $css_class = "row_even"; |
|
880 | + } else { |
|
881 | + $css_class = "row_odd"; |
|
882 | + } |
|
878 | 883 | |
879 | 884 | $i++; |
880 | 885 | |
@@ -1042,9 +1047,10 @@ discard block |
||
1042 | 1047 | $result_last_attempt = Database::query($sql); |
1043 | 1048 | if (Database :: num_rows($result_last_attempt) > 0) { |
1044 | 1049 | $id_last_attempt = Database :: result($result_last_attempt, 0, 0); |
1045 | - if ($count_attempts > 0) |
|
1046 | - echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'"> |
|
1050 | + if ($count_attempts > 0) { |
|
1051 | + echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'"> |
|
1047 | 1052 | <img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" border="0" /> </a>'; |
1053 | + } |
|
1048 | 1054 | } |
1049 | 1055 | echo '</td>'; |
1050 | 1056 |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | $interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('MySpace')); |
19 | 19 | $id_session = ''; |
20 | 20 | if (isset($_GET['id_session']) && $_GET['id_session'] != '') { |
21 | - $id_session = intval($_GET['id_session']); |
|
22 | - $interbreadcrumb[] = array ('url' => 'session.php', 'name' => get_lang('Sessions')); |
|
23 | - $interbreadcrumb[] = array ('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course')); |
|
21 | + $id_session = intval($_GET['id_session']); |
|
22 | + $interbreadcrumb[] = array ('url' => 'session.php', 'name' => get_lang('Sessions')); |
|
23 | + $interbreadcrumb[] = array ('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course')); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | // Set this option to true to enforce strict purification for usenames. |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | } else { |
45 | - api_not_allowed(true); |
|
45 | + api_not_allowed(true); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | set_time_limit(0); |
@@ -87,18 +87,18 @@ discard block |
||
87 | 87 | Display :: display_header($tool_name); |
88 | 88 | |
89 | 89 | if ($_FILES['import_file']['size'] == 0 && $_POST) { |
90 | - Display::display_error_message(get_lang('ThisFieldIsRequired')); |
|
90 | + Display::display_error_message(get_lang('ThisFieldIsRequired')); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | if (count($errors) != 0) { |
94 | - $error_message = '<ul>'; |
|
95 | - foreach ($errors as $index => $error_user) { |
|
96 | - $error_message .= '<li><strong>'.$error_user['error'].'</strong>: '; |
|
97 | - $error_message .= api_get_person_name($error_user['FirstName'], $error_user['LastName']); |
|
98 | - $error_message .= '</li>'; |
|
99 | - } |
|
100 | - $error_message .= '</ul>'; |
|
101 | - Display :: display_error_message($error_message, false); |
|
94 | + $error_message = '<ul>'; |
|
95 | + foreach ($errors as $index => $error_user) { |
|
96 | + $error_message .= '<li><strong>'.$error_user['error'].'</strong>: '; |
|
97 | + $error_message .= api_get_person_name($error_user['FirstName'], $error_user['LastName']); |
|
98 | + $error_message .= '</li>'; |
|
99 | + } |
|
100 | + $error_message .= '</ul>'; |
|
101 | + Display :: display_error_message($error_message, false); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | $form = new FormValidator('user_import'); |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | $tool_name = get_lang('ImportUserListXMLCSV'); |
16 | 16 | api_block_anonymous_users(); |
17 | 17 | |
18 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('MySpace')); |
|
18 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('MySpace')); |
|
19 | 19 | $id_session = ''; |
20 | 20 | if (isset($_GET['id_session']) && $_GET['id_session'] != '') { |
21 | 21 | $id_session = intval($_GET['id_session']); |
22 | - $interbreadcrumb[] = array ('url' => 'session.php', 'name' => get_lang('Sessions')); |
|
23 | - $interbreadcrumb[] = array ('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course')); |
|
22 | + $interbreadcrumb[] = array('url' => 'session.php', 'name' => get_lang('Sessions')); |
|
23 | + $interbreadcrumb[] = array('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course')); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | // Set this option to true to enforce strict purification for usenames. |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | if (count($errors) == 0) { |
64 | 64 | if (!empty($id_session)) { |
65 | - $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
65 | + $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
66 | 66 | // Selecting all the courses from the session id requested. |
67 | 67 | $sql = "SELECT c_id FROM $tbl_session_rel_course WHERE session_id ='$id_session'"; |
68 | 68 | $result = Database::query($sql); |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | |
104 | 104 | $form = new FormValidator('user_import'); |
105 | 105 | $form->addElement('hidden', 'formSent'); |
106 | -$form->addElement('hidden', 'id_session',$id_session); |
|
106 | +$form->addElement('hidden', 'id_session', $id_session); |
|
107 | 107 | $form->addElement('file', 'import_file', get_lang('ImportFileLocation')); |
108 | 108 | $form->addRule('import_file', get_lang('ThisFieldIsRequired'), 'required'); |
109 | -$allowed_file_types = array ('xml', 'csv'); |
|
109 | +$allowed_file_types = array('xml', 'csv'); |
|
110 | 110 | $form->addRule('import_file', get_lang('InvalidExtension').' ('.implode(',', $allowed_file_types).')', 'filetype', $allowed_file_types); |
111 | 111 | $form->addElement('radio', 'file_type', get_lang('FileType'), 'XML (<a href="../admin/example.xml" target="_blank">'.get_lang('ExampleXMLFile').'</a>)', 'xml'); |
112 | 112 | $form->addElement('radio', 'file_type', null, 'CSV (<a href="../admin/example.csv" target="_blank">'.get_lang('ExampleCSVFile').'</a>)', 'csv'); |