@@ -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 | "; |
@@ -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 |
@@ -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); |
@@ -485,19 +485,19 @@ discard block |
||
485 | 485 | </thead> |
486 | 486 | <tbody> |
487 | 487 | <tr> |
488 | - <td><?php echo get_lang('Name') . ' : '.$user_info['complete_name']; ?></td> |
|
488 | + <td><?php echo get_lang('Name').' : '.$user_info['complete_name']; ?></td> |
|
489 | 489 | </tr> |
490 | 490 | <tr> |
491 | - <td><?php echo get_lang('Email') . ' : '; |
|
491 | + <td><?php echo get_lang('Email').' : '; |
|
492 | 492 | if (!empty ($user_info['email'])) { |
493 | - echo '<a href="mailto:' . $user_info['email'] . '">' . $user_info['email'] . '</a>'; |
|
493 | + echo '<a href="mailto:'.$user_info['email'].'">'.$user_info['email'].'</a>'; |
|
494 | 494 | } else { |
495 | 495 | echo get_lang('NoEmail'); |
496 | 496 | } ?> |
497 | 497 | </td> |
498 | 498 | </tr> |
499 | 499 | <tr> |
500 | - <td> <?php echo get_lang('Tel') . ' : '; |
|
500 | + <td> <?php echo get_lang('Tel').' : '; |
|
501 | 501 | if (!empty ($user_info['phone'])) { |
502 | 502 | echo $user_info['phone']; |
503 | 503 | } else { |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | </td> |
508 | 508 | </tr> |
509 | 509 | <tr> |
510 | - <td> <?php echo get_lang('OfficialCode') . ' : '; |
|
510 | + <td> <?php echo get_lang('OfficialCode').' : '; |
|
511 | 511 | if (!empty ($user_info['official_code'])) { |
512 | 512 | echo $user_info['official_code']; |
513 | 513 | } else { |
@@ -517,13 +517,13 @@ discard block |
||
517 | 517 | </td> |
518 | 518 | </tr> |
519 | 519 | <tr> |
520 | - <td><?php echo get_lang('OnLine') . ' : '.$online; ?> </td> |
|
520 | + <td><?php echo get_lang('OnLine').' : '.$online; ?> </td> |
|
521 | 521 | </tr> |
522 | 522 | <?php |
523 | 523 | |
524 | 524 | // Display timezone if the user selected one and if the admin allows the use of user's timezone |
525 | 525 | $timezone = null; |
526 | - $timezone_user = UserManager::get_extra_user_data_by_field($user_info['user_id'],'timezone'); |
|
526 | + $timezone_user = UserManager::get_extra_user_data_by_field($user_info['user_id'], 'timezone'); |
|
527 | 527 | $use_users_timezone = api_get_setting('use_users_timezone', 'timezones'); |
528 | 528 | if ($timezone_user['timezone'] != null && $use_users_timezone == 'true') { |
529 | 529 | $timezone = $timezone_user['timezone']; |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | if ($timezone !== null) { |
532 | 532 | ?> |
533 | 533 | <tr> |
534 | - <td> <?php echo get_lang('Timezone') . ' : '.$timezone; ?> </td> |
|
534 | + <td> <?php echo get_lang('Timezone').' : '.$timezone; ?> </td> |
|
535 | 535 | </tr> |
536 | 536 | <?php |
537 | 537 | } |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | <td align="right"> |
564 | 564 | <?php |
565 | 565 | echo get_lang('Progress').' '; |
566 | - Display :: display_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array ('align' => 'absmiddle', 'hspace' => '3px'));?> |
|
566 | + Display :: display_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')); ?> |
|
567 | 567 | </td> |
568 | 568 | <td align="left"><?php echo $avg_student_progress.'%' ?></td> |
569 | 569 | </tr> |
@@ -571,9 +571,9 @@ discard block |
||
571 | 571 | <td align="right"> |
572 | 572 | <?php |
573 | 573 | echo get_lang('Score').' '; |
574 | - Display :: display_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array ('align' => 'absmiddle', 'hspace' => '3px')); ?> |
|
574 | + Display :: display_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')); ?> |
|
575 | 575 | </td> |
576 | - <td align="left"><?php if (is_numeric($avg_student_score)) { echo $avg_student_score.'%';} else { echo $avg_student_score ;} ?></td> |
|
576 | + <td align="left"><?php if (is_numeric($avg_student_score)) { echo $avg_student_score.'%'; } else { echo $avg_student_score; } ?></td> |
|
577 | 577 | </tr> |
578 | 578 | <?php |
579 | 579 | if (!empty($nb_login)) { |
@@ -607,10 +607,10 @@ discard block |
||
607 | 607 | $table_title = ''; |
608 | 608 | if (!empty($sessionId)) { |
609 | 609 | $session_name = api_get_session_name($sessionId); |
610 | - $table_title = $session_name ? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ':''; |
|
610 | + $table_title = $session_name ? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ' : ''; |
|
611 | 611 | } |
612 | 612 | if (!empty($info_course['title'])) { |
613 | - $table_title .= $info_course ? Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$info_course['title'].' ':''; |
|
613 | + $table_title .= $info_course ? Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$info_course['title'].' ' : ''; |
|
614 | 614 | } |
615 | 615 | |
616 | 616 | echo Display::page_subheader($table_title); |
@@ -648,13 +648,13 @@ discard block |
||
648 | 648 | } |
649 | 649 | $date_session = ''; |
650 | 650 | if (!empty($access_start_date) && !empty($access_end_date)) { |
651 | - $date_session = get_lang('From') . ' ' . $access_start_date . ' ' . get_lang('Until') . ' ' . $access_end_date; |
|
651 | + $date_session = get_lang('From').' '.$access_start_date.' '.get_lang('Until').' '.$access_end_date; |
|
652 | 652 | } |
653 | 653 | $title = ''; |
654 | 654 | if (empty($sessionId)) { |
655 | 655 | $title = Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_SMALL).' '.get_lang('Courses'); |
656 | 656 | } else { |
657 | - $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session?' ('.$date_session.')':''); |
|
657 | + $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session ? ' ('.$date_session.')' : ''); |
|
658 | 658 | } |
659 | 659 | |
660 | 660 | // Courses |
@@ -705,9 +705,9 @@ discard block |
||
705 | 705 | $scoretotal = array(); |
706 | 706 | if (isset($cats) && isset($cats[0])) { |
707 | 707 | if (!empty($sessionId)) { |
708 | - $scoretotal= $cats[0]->calc_score($student_id, null, $course_code, $sessionId); |
|
708 | + $scoretotal = $cats[0]->calc_score($student_id, null, $course_code, $sessionId); |
|
709 | 709 | } else { |
710 | - $scoretotal= $cats[0]->calc_score($student_id, null, $course_code); |
|
710 | + $scoretotal = $cats[0]->calc_score($student_id, null, $course_code); |
|
711 | 711 | } |
712 | 712 | } |
713 | 713 | |
@@ -740,8 +740,8 @@ discard block |
||
740 | 740 | ); |
741 | 741 | |
742 | 742 | echo '<tr> |
743 | - <td ><a href="' . api_get_path(WEB_COURSE_PATH) . $course_info['directory'] .'/?id_session=' . $sessionId . '">'.$course_info['title'].'</a></td> |
|
744 | - <td >'.$time_spent_on_course .'</td> |
|
743 | + <td ><a href="' . api_get_path(WEB_COURSE_PATH).$course_info['directory'].'/?id_session='.$sessionId.'">'.$course_info['title'].'</a></td> |
|
744 | + <td >'.$time_spent_on_course.'</td> |
|
745 | 745 | <td >'.$progress.'</td> |
746 | 746 | <td >'.$score.'</td> |
747 | 747 | <td >'.$attendances_faults_avg.'</td> |
@@ -807,22 +807,22 @@ discard block |
||
807 | 807 | <table class="table table-striped table-hover"> |
808 | 808 | <thead> |
809 | 809 | <tr> |
810 | - <th><?php echo get_lang('Learnpaths');?></th> |
|
810 | + <th><?php echo get_lang('Learnpaths'); ?></th> |
|
811 | 811 | <th><?php |
812 | 812 | echo get_lang('Time').' '; |
813 | - Display :: display_icon('info3.gif', get_lang('TotalTimeByCourse'), array ('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
813 | + Display :: display_icon('info3.gif', get_lang('TotalTimeByCourse'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
814 | 814 | <th><?php |
815 | 815 | echo get_lang('AverageScore').' '; |
816 | - Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInAllAttempts'), array ( 'align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
816 | + Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInAllAttempts'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
817 | 817 | <th><?php |
818 | 818 | echo get_lang('LatestAttemptAverageScore').' '; |
819 | - Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), array ( 'align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
819 | + Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
820 | 820 | <th><?php |
821 | 821 | echo get_lang('Progress').' '; |
822 | - Display :: display_icon('info3.gif', get_lang('LPProgressScore'), array ('align' => 'absmiddle','hspace' => '3px')); ?></th> |
|
822 | + Display :: display_icon('info3.gif', get_lang('LPProgressScore'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
823 | 823 | <th><?php |
824 | 824 | echo get_lang('LastConnexion').' '; |
825 | - Display :: display_icon('info3.gif', get_lang('LastTimeTheCourseWasUsed'), array ('align' => 'absmiddle','hspace' => '3px')); ?></th> |
|
825 | + Display :: display_icon('info3.gif', get_lang('LastTimeTheCourseWasUsed'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th> |
|
826 | 826 | <?php |
827 | 827 | echo '<th>'.get_lang('Details').'</th>'; |
828 | 828 | if (api_is_allowed_to_edit()) { |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | |
851 | 851 | if ($progress === null) { |
852 | 852 | $progress = '0%'; |
853 | - } else { |
|
853 | + } else { |
|
854 | 854 | $any_result = true; |
855 | 855 | } |
856 | 856 | |
@@ -877,7 +877,7 @@ discard block |
||
877 | 877 | if (!empty($start_time)) { |
878 | 878 | $start_time = api_convert_and_format_date($start_time, DATE_TIME_FORMAT_LONG); |
879 | 879 | } else { |
880 | - $start_time = '-'; |
|
880 | + $start_time = '-'; |
|
881 | 881 | } |
882 | 882 | |
883 | 883 | if (!empty($total_time)) $any_result = true; |
@@ -906,11 +906,11 @@ discard block |
||
906 | 906 | $i++; |
907 | 907 | |
908 | 908 | // csv export content |
909 | - $csv_content[] = array ( |
|
909 | + $csv_content[] = array( |
|
910 | 910 | api_html_entity_decode(stripslashes($lp_name), ENT_QUOTES, $charset), |
911 | 911 | api_time_to_hms($total_time), |
912 | - $score . '%', |
|
913 | - $score_latest . '%', |
|
912 | + $score.'%', |
|
913 | + $score_latest.'%', |
|
914 | 914 | $progress.'%', |
915 | 915 | $start_time |
916 | 916 | ); |
@@ -948,7 +948,7 @@ discard block |
||
948 | 948 | if ($any_result === true) { |
949 | 949 | $from = ''; |
950 | 950 | if ($from_myspace) { |
951 | - $from ='&from=myspace'; |
|
951 | + $from = '&from=myspace'; |
|
952 | 952 | } |
953 | 953 | $link = Display::url( |
954 | 954 | Display::return_icon('2rightarrow.png'), |
@@ -961,14 +961,14 @@ discard block |
||
961 | 961 | echo '<td>'; |
962 | 962 | if ($any_result === true) { |
963 | 963 | 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.'">'; |
964 | - echo Display::return_icon('clean.png',get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>'; |
|
964 | + echo Display::return_icon('clean.png', get_lang('Clean'), '', ICON_SIZE_SMALL).'</a>'; |
|
965 | 965 | echo '</a>'; |
966 | 966 | } |
967 | 967 | echo '</td>'; |
968 | 968 | echo '</tr>'; |
969 | 969 | } |
970 | 970 | $data_learnpath[$i][] = $lp_name; |
971 | - $data_learnpath[$i][] = $progress . '%'; |
|
971 | + $data_learnpath[$i][] = $progress.'%'; |
|
972 | 972 | } |
973 | 973 | } else { |
974 | 974 | //echo '<tr><td colspan="6">'.get_lang('NoLearnpath').'</td></tr>'; |
@@ -985,7 +985,7 @@ discard block |
||
985 | 985 | <thead> |
986 | 986 | <tr> |
987 | 987 | <th><?php echo get_lang('Exercises'); ?></th> |
988 | - <th><?php echo get_lang('LearningPath');?></th> |
|
988 | + <th><?php echo get_lang('LearningPath'); ?></th> |
|
989 | 989 | <th><?php echo get_lang('AvgCourseScore').' '.Display :: return_icon('info3.gif', get_lang('AverageScore'), array('align' => 'absmiddle', 'hspace' => '3px')) ?></th> |
990 | 990 | <th><?php echo get_lang('Attempts'); ?></th> |
991 | 991 | <th><?php echo get_lang('LatestAttempt'); ?></th> |
@@ -1004,7 +1004,7 @@ discard block |
||
1004 | 1004 | ); |
1005 | 1005 | |
1006 | 1006 | $t_quiz = Database :: get_course_table(TABLE_QUIZ_TEST); |
1007 | - $sql = "SELECT quiz.title, id FROM " . $t_quiz . " AS quiz |
|
1007 | + $sql = "SELECT quiz.title, id FROM ".$t_quiz." AS quiz |
|
1008 | 1008 | WHERE |
1009 | 1009 | quiz.c_id = ".$info_course['real_id']." AND |
1010 | 1010 | (quiz.session_id = $sessionId OR quiz.session_id = 0) AND |
@@ -1047,7 +1047,7 @@ discard block |
||
1047 | 1047 | echo '<td>'; |
1048 | 1048 | |
1049 | 1049 | if ($count_attempts > 0) { |
1050 | - echo $score_percentage . '%'; |
|
1050 | + echo $score_percentage.'%'; |
|
1051 | 1051 | } else { |
1052 | 1052 | echo '-'; |
1053 | 1053 | $score_percentage = 0; |
@@ -1057,7 +1057,7 @@ discard block |
||
1057 | 1057 | echo '<td>'.$count_attempts.'</td>'; |
1058 | 1058 | echo '<td>'; |
1059 | 1059 | |
1060 | - $sql = 'SELECT exe_id FROM ' . $tbl_stats_exercices . ' |
|
1060 | + $sql = 'SELECT exe_id FROM '.$tbl_stats_exercices.' |
|
1061 | 1061 | WHERE |
1062 | 1062 | exe_exo_id ="'.$exercise_id.'" AND |
1063 | 1063 | exe_user_id ="'.$student_id.'" AND |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | if (Database :: num_rows($result_last_attempt) > 0) { |
1071 | 1071 | $id_last_attempt = Database :: result($result_last_attempt, 0, 0); |
1072 | 1072 | if ($count_attempts > 0) |
1073 | - 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).'"> |
|
1073 | + 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).'"> |
|
1074 | 1074 | '.Display::return_icon('quiz.gif').' |
1075 | 1075 | </a>'; |
1076 | 1076 | } |
@@ -1078,11 +1078,11 @@ discard block |
||
1078 | 1078 | |
1079 | 1079 | echo '<td>'; |
1080 | 1080 | $all_attempt_url = "../exercice/exercise_report.php?exerciseId=$exercise_id&cidReq=$course_code&filter_by_user=$student_id&id_session=$sessionId"; |
1081 | - echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url ); |
|
1081 | + echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url); |
|
1082 | 1082 | |
1083 | 1083 | echo '</td></tr>'; |
1084 | 1084 | $data_exercices[$i][] = $exercices['title']; |
1085 | - $data_exercices[$i][] = $score_percentage . '%'; |
|
1085 | + $data_exercices[$i][] = $score_percentage.'%'; |
|
1086 | 1086 | $data_exercices[$i][] = $count_attempts; |
1087 | 1087 | |
1088 | 1088 | $csv_content[] = array( |
@@ -1110,7 +1110,7 @@ discard block |
||
1110 | 1110 | $survey_list = SurveyManager::get_surveys($course_code, $sessionId); |
1111 | 1111 | |
1112 | 1112 | $survey_data = array(); |
1113 | - foreach($survey_list as $survey) { |
|
1113 | + foreach ($survey_list as $survey) { |
|
1114 | 1114 | $user_list = SurveyManager::get_people_who_filled_survey($survey['survey_id'], false, $info_course['real_id']); |
1115 | 1115 | $survey_done = Display::return_icon("accept_na.png", get_lang('NoAnswer'), array(), ICON_SIZE_SMALL); |
1116 | 1116 | if (in_array($student_id, $user_list)) { |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | $column = 0; |
1136 | 1136 | $table->setCellContents($row, $column, $data); |
1137 | 1137 | $class = 'class="row_odd"'; |
1138 | - if($row % 2) { |
|
1138 | + if ($row % 2) { |
|
1139 | 1139 | $class = 'class="row_even"'; |
1140 | 1140 | } |
1141 | 1141 | $table->setRowAttributes($row, $class, true); |
@@ -1158,13 +1158,13 @@ discard block |
||
1158 | 1158 | </thead> |
1159 | 1159 | <tbody> |
1160 | 1160 | <?php |
1161 | - $csv_content[] = array (); |
|
1162 | - $nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId); |
|
1161 | + $csv_content[] = array(); |
|
1162 | + $nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId); |
|
1163 | 1163 | $messages = Tracking::count_student_messages($student_id, $course_code, $sessionId); |
1164 | - $links = Tracking::count_student_visited_links($student_id, $info_course['real_id'], $sessionId); |
|
1165 | - $chat_last_connection = Tracking::chat_last_connection($student_id, $info_course['real_id'], $sessionId); |
|
1164 | + $links = Tracking::count_student_visited_links($student_id, $info_course['real_id'], $sessionId); |
|
1165 | + $chat_last_connection = Tracking::chat_last_connection($student_id, $info_course['real_id'], $sessionId); |
|
1166 | 1166 | $documents = Tracking::count_student_downloaded_documents($student_id, $info_course['real_id'], $sessionId); |
1167 | - $uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $sessionId); |
|
1167 | + $uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $sessionId); |
|
1168 | 1168 | |
1169 | 1169 | $csv_content[] = array( |
1170 | 1170 | get_lang('OtherTools') |
@@ -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'); |
@@ -36,8 +36,8 @@ |
||
36 | 36 | |
37 | 37 | function count_courses() |
38 | 38 | { |
39 | - global $nb_courses; |
|
40 | - return $nb_courses; |
|
39 | + global $nb_courses; |
|
40 | + return $nb_courses; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | //checking if the current coach is the admin coach |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : null; |
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_session"]) && $_GET["id_session"] != "") { |
22 | 22 | $interbreadcrumb[] = array("url" => "session.php", "name" => get_lang('Sessions')); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $user_id = intval($_GET['user_id']); |
68 | 68 | $user_info = api_get_user_info($user_id); |
69 | 69 | $title = get_lang('AssignedCoursesTo').' '.api_get_person_name($user_info['firstname'], $user_info['lastname']); |
70 | - $courses = CourseManager::get_course_list_of_user_as_course_admin($user_id); |
|
70 | + $courses = CourseManager::get_course_list_of_user_as_course_admin($user_id); |
|
71 | 71 | } else { |
72 | 72 | $title = get_lang('YourCourseList'); |
73 | 73 | $courses = CourseManager::get_courses_followed_by_drh(api_get_user_id()); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | if (!api_is_session_admin()) { |
84 | 84 | $menu_items[] = Display::url( |
85 | - Display::return_icon('stats.png', get_lang('MyStats'),'',ICON_SIZE_MEDIUM), |
|
85 | + Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), |
|
86 | 86 | api_get_path(WEB_CODE_PATH)."auth/my_progress.php" |
87 | 87 | ); |
88 | 88 | $menu_items[] = Display::url( |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | } |
127 | 127 | |
128 | - $toolbar = Display::toolbarAction('toolbar-course', $content = array( 0 => $actionsLeft, 1 => $actionsRight )); |
|
128 | + $toolbar = Display::toolbarAction('toolbar-course', $content = array(0 => $actionsLeft, 1 => $actionsRight)); |
|
129 | 129 | |
130 | 130 | echo $toolbar; |
131 | 131 |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | |
20 | 20 | $this_section = SECTION_TRACKING; |
21 | 21 | |
22 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
22 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
23 | 23 | |
24 | 24 | if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) { |
25 | - $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers')); |
|
25 | + $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers')); |
|
26 | 26 | } |
27 | 27 | |
28 | -if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") { |
|
29 | - $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors')); |
|
28 | +if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") { |
|
29 | + $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors')); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | function get_count_users() |
@@ -121,8 +121,8 @@ discard block |
||
121 | 121 | $courseInfo = api_get_course_info($course_code); |
122 | 122 | $courseId = $courseInfo['real_id']; |
123 | 123 | if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) { |
124 | - $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
125 | - $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
124 | + $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
125 | + $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
126 | 126 | if (is_numeric($my_average)) { |
127 | 127 | $avg_student_score += $my_average; |
128 | 128 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'"> |
162 | 162 | <img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>'; |
163 | 163 | } else { |
164 | - $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
164 | + $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
165 | 165 | <img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>'; |
166 | 166 | } |
167 | 167 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | if (api_is_drh()) { |
192 | 192 | $menu_items = array( |
193 | - Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ), |
|
193 | + Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"), |
|
194 | 194 | Display::url(Display::return_icon('user_na.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), '#'), |
195 | 195 | Display::url(Display::return_icon('teacher.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'), |
196 | 196 | Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'), |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | ); |
219 | 219 | $actionsLeft .= Display::url( |
220 | 220 | Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM), |
221 | - api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php" |
|
221 | + api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php" |
|
222 | 222 | ); |
223 | 223 | $actionsLeft .= Display::url( |
224 | 224 | Display::return_icon( |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | [], |
228 | 228 | ICON_SIZE_MEDIUM |
229 | 229 | ), |
230 | - api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php" |
|
230 | + api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php" |
|
231 | 231 | ); |
232 | 232 | } |
233 | 233 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | ); |
243 | 243 | |
244 | 244 | |
245 | -$toolbar = Display::toolbarAction('toolbar-student', $content = array( 0 => $actionsLeft, 1 => $actionsRight )); |
|
245 | +$toolbar = Display::toolbarAction('toolbar-student', $content = array(0 => $actionsLeft, 1 => $actionsRight)); |
|
246 | 246 | |
247 | 247 | $table = new SortableTable( |
248 | 248 | 'tracking_student', |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | } |
36 | 36 | $sql = "SELECT user.user_id,lastname,firstname,email |
37 | 37 | FROM $tbl_user as user, $tbl_admin as admin |
38 | - WHERE admin.user_id=user.user_id" . $order_clause; |
|
38 | + WHERE admin.user_id=user.user_id".$order_clause; |
|
39 | 39 | $result_admins = Database::query($sql); |
40 | 40 | |
41 | 41 | if (api_is_western_name_order()) { |
42 | - echo '<table class="data_table"><tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
42 | + echo '<table class="data_table"><tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
43 | 43 | } else { |
44 | - echo '<table class="data_table"><tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
44 | + echo '<table class="data_table"><tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | $css_class = "row_odd"; |
66 | 66 | if ($i % 20 == 0 && $i != 0) { |
67 | 67 | if (api_is_western_name_order()) { |
68 | - echo '<tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
68 | + echo '<tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
69 | 69 | } else { |
70 | - echo '<tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
70 | + echo '<tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | } else { |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $i++; |
78 | 78 | |
79 | 79 | if (api_is_western_name_order()) { |
80 | - echo "<tr class=" . $css_class . "><td>$firstname</td><td>$lastname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>"; |
|
80 | + echo "<tr class=".$css_class."><td>$firstname</td><td>$lastname</td><td><a href='mailto:".$email."'>$email</a></td></tr>"; |
|
81 | 81 | } else { |
82 | - echo "<tr class=" . $css_class . "><td>$lastname</td><td>$firstname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>"; |
|
82 | + echo "<tr class=".$css_class."><td>$lastname</td><td>$firstname</td><td><a href='mailto:".$email."'>$email</a></td></tr>"; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | } else { |
95 | 95 | // No results |
96 | - echo '<tr><td colspan="3">' . get_lang('NoResults') . '</td></tr>'; |
|
96 | + echo '<tr><td colspan="3">'.get_lang('NoResults').'</td></tr>'; |
|
97 | 97 | } |
98 | 98 | echo '</table>'; |
99 | 99 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | echo " |
105 | 105 | <br /><br /> |
106 | 106 | <form method='post' action='admin.php'> |
107 | - <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'> |
|
108 | - " . get_lang('ExportExcel') . " |
|
107 | + <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel')."'> |
|
108 | + " . get_lang('ExportExcel')." |
|
109 | 109 | </button> |
110 | 110 | <form> |
111 | 111 | "; |
@@ -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() |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | $courseInfo = api_get_course_info($course_code); |
123 | 123 | $courseId = $courseInfo['real_id']; |
124 | 124 | if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) { |
125 | - $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
126 | - $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
125 | + $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']); |
|
126 | + $my_average = Tracking :: get_avg_student_score($student_id, $course_code); |
|
127 | 127 | if (is_numeric($my_average)) { |
128 | 128 | $avg_student_score += $my_average; |
129 | 129 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'"> |
163 | 163 | '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>'; |
164 | 164 | } else { |
165 | - $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
165 | + $detailsLink = '<a href="myStudents.php?student='.$student_id.'"> |
|
166 | 166 | '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>'; |
167 | 167 | } |
168 | 168 | $row[] = $detailsLink; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $actionsLeft = ''; |
182 | 182 | if (api_is_drh()) { |
183 | 183 | $menu_items = array( |
184 | - Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ), |
|
184 | + Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"), |
|
185 | 185 | Display::url(Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), 'student.php'), |
186 | 186 | Display::url(Display::return_icon('teacher_na.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'), |
187 | 187 | Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'), |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | ); |
209 | 209 | |
210 | 210 | |
211 | -$toolbar = Display::toolbarAction('toolbar-teachers', $content = array( 0 => $actionsLeft, 1 => $actionsRight )); |
|
211 | +$toolbar = Display::toolbarAction('toolbar-teachers', $content = array(0 => $actionsLeft, 1 => $actionsRight)); |
|
212 | 212 | |
213 | 213 | $table = new SortableTable( |
214 | 214 | 'tracking_teachers', |
@@ -138,7 +138,7 @@ |
||
138 | 138 | </div><br /> |
139 | 139 | <div id="cev_cont_stats"> |
140 | 140 | <?php |
141 | - if ($result_to_print != "") { |
|
141 | + if ($result_to_print != "") { |
|
142 | 142 | $rst = get_stats($user_id, $courseId); |
143 | 143 | $foo_stats = '<strong>'.get_lang('Total').': </strong>'.$rst['total'].'<br />'; |
144 | 144 | $foo_stats .= '<strong>'.get_lang('Average').': </strong>'.$rst['avg'].'<br />'; |