@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | /** |
9 | 9 | * Init |
10 | 10 | */ |
11 | -require_once __DIR__ . '/../config.php'; |
|
11 | +require_once __DIR__.'/../config.php'; |
|
12 | 12 | // Protect test |
13 | 13 | api_protect_admin_script(); |
14 | 14 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | // Check if a file that limits access from webservices exists and contains |
44 | 44 | // the restraining check |
45 | -if (is_file(api_get_path(WEB_CODE_PATH) .'webservices/webservice-auth-ip.conf.php')) { |
|
45 | +if (is_file(api_get_path(WEB_CODE_PATH).'webservices/webservice-auth-ip.conf.php')) { |
|
46 | 46 | include api_get_path(WEB_CODE_PATH).'webservices/webservice-auth-ip.conf.php'; |
47 | 47 | if (!empty($ws_auth_ip)) { |
48 | 48 | $check_ip = true; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $params['secret_key'] = sha1($security_key); |
64 | 64 | |
65 | 65 | // Registration soap wsdl |
66 | -$wsUrl = api_get_path(WEB_CODE_PATH) . 'webservices/registration.soap.php?wsdl'; |
|
66 | +$wsUrl = api_get_path(WEB_CODE_PATH).'webservices/registration.soap.php?wsdl'; |
|
67 | 67 | $options = array( |
68 | 68 | 'location' => $wsUrl, |
69 | 69 | 'uri' => $wsUrl |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $result = $client->__soapCall('HookAdvancedSubscription..WSSessionGetDetailsByUser', array($params)); |
80 | 80 | if (is_object($result) && isset($result->action_url)) { |
81 | 81 | echo '<br />'; |
82 | - echo Display::url("message" . $result->message, $result->action_url); |
|
82 | + echo Display::url("message".$result->message, $result->action_url); |
|
83 | 83 | } |
84 | 84 | } catch (\Exception $e) { |
85 | 85 | var_dump($e); |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | global $_configuration; |
50 | 50 | $this->name = 'C'.api_get_course_int_id().'-'.api_get_session_id(); |
51 | 51 | $accessUrl = api_get_access_url($_configuration['access_url']); |
52 | - $this->externalRoomType = substr($accessUrl['url'], strpos($accessUrl['url'],'://')+3,-1); |
|
52 | + $this->externalRoomType = substr($accessUrl['url'], strpos($accessUrl['url'], '://') + 3, -1); |
|
53 | 53 | if (strcmp($this->externalRoomType, 'localhost') == 0) { |
54 | - $this->externalRoomType = substr(api_get_path(WEB_PATH), strpos(api_get_path(WEB_PATH),'://')+3, -1); |
|
54 | + $this->externalRoomType = substr(api_get_path(WEB_PATH), strpos(api_get_path(WEB_PATH), '://') + 3, -1); |
|
55 | 55 | } |
56 | 56 | $this->externalRoomType = 'chamilolms.'.$this->externalRoomType; |
57 | 57 | } |
@@ -110,6 +110,6 @@ discard block |
||
110 | 110 | if (!isset($this->$attribute)) { |
111 | 111 | return $voidReturn; |
112 | 112 | } |
113 | - return $this->$attribute?'true':'false'; |
|
113 | + return $this->$attribute ? 'true' : 'false'; |
|
114 | 114 | } |
115 | 115 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | foreach ($config as $fooid => $configrecord) { |
42 | 42 | $canonic = preg_replace('/^customfooter_/', '', $configrecord['variable']); |
43 | - if (in_array($canonic, array('footer_left', 'footer_right'))){ |
|
43 | + if (in_array($canonic, array('footer_left', 'footer_right'))) { |
|
44 | 44 | $form_settings[$canonic] = $configrecord['selected_value']; |
45 | 45 | } |
46 | 46 | } |
@@ -5,6 +5,6 @@ |
||
5 | 5 | * @author José Loguercio Silva <[email protected]> |
6 | 6 | * @package chamilo.plugin.google_maps |
7 | 7 | */ |
8 | -require_once __DIR__ . '/config.php'; |
|
8 | +require_once __DIR__.'/config.php'; |
|
9 | 9 | |
10 | 10 | GoogleMapsPlugin::create()->uninstall(); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @author José Loguercio Silva <[email protected]> |
6 | 6 | * @package chamilo.plugin.google_maps |
7 | 7 | */ |
8 | -require_once __DIR__ . '/config.php'; |
|
8 | +require_once __DIR__.'/config.php'; |
|
9 | 9 | |
10 | 10 | $googleMapsPlugin = GoogleMapsPlugin::create(); |
11 | 11 |
@@ -5,6 +5,6 @@ |
||
5 | 5 | * @author José Loguercio Silva <[email protected]> |
6 | 6 | * @package chamilo.plugin.google_maps |
7 | 7 | */ |
8 | -require_once __DIR__ . '/config.php'; |
|
8 | +require_once __DIR__.'/config.php'; |
|
9 | 9 | |
10 | 10 | GoogleMapsPlugin::create()->install(); |
@@ -283,7 +283,7 @@ |
||
283 | 283 | $content = $form->returnForm(); |
284 | 284 | break; |
285 | 285 | case "delete": |
286 | - if (!(api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $eventId) )) { |
|
286 | + if (!(api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $eventId))) { |
|
287 | 287 | // a coach can only delete an element belonging to his session |
288 | 288 | $content = $agenda->deleteEvent($eventId); |
289 | 289 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | //YW Hack security to quick fix RolesRights bug |
21 | 21 | $is_allowed = true; |
22 | 22 | |
23 | -require_once api_get_path(SYS_CODE_PATH) . 'exercise/hotpotatoes.lib.php'; |
|
23 | +require_once api_get_path(SYS_CODE_PATH).'exercise/hotpotatoes.lib.php'; |
|
24 | 24 | |
25 | 25 | /* Header */ |
26 | 26 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | AND ((access_start_date <= '$now' |
65 | 65 | AND access_end_date >= '$now') |
66 | 66 | OR (access_start_date IS NULL AND access_end_date IS NULL)) |
67 | - WHERE session_id='" . api_get_session_id() . "' AND c_id = $courseId"; |
|
67 | + WHERE session_id='".api_get_session_id()."' AND c_id = $courseId"; |
|
68 | 68 | //echo $sql; |
69 | 69 | $result = Database::query($sql); |
70 | 70 | if (!Database::num_rows($result)) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $tbl_learnpath_view = Database::get_course_table(TABLE_LP_VIEW); |
78 | 78 | $tbl_learnpath_item_view = Database::get_course_table(TABLE_LP_ITEM_VIEW); |
79 | 79 | |
80 | -$documentPath = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document'; |
|
80 | +$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
|
81 | 81 | |
82 | 82 | // The variables for the days and the months |
83 | 83 | $DaysShort = api_get_week_days_short(); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | // if user can track everybody : list user of course |
110 | 110 | $sql = "SELECT count(user_id) |
111 | 111 | FROM $TABLECOURSUSER |
112 | - WHERE c_id = '$courseId' AND relation_type<>" . COURSE_RELATION_TYPE_RRHH . ""; |
|
112 | + WHERE c_id = '$courseId' AND relation_type<>".COURSE_RELATION_TYPE_RRHH.""; |
|
113 | 113 | |
114 | 114 | } else { |
115 | 115 | // if user can only track one group : list users of this group |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | // list of users in this course |
148 | 148 | $sql = "SELECT u.user_id, u.firstname,u.lastname |
149 | 149 | FROM $TABLECOURSUSER cu , $TABLEUSER u |
150 | - WHERE cu.user_id = u.user_id AND cu.relation_type<>" . COURSE_RELATION_TYPE_RRHH . " |
|
150 | + WHERE cu.user_id = u.user_id AND cu.relation_type<>".COURSE_RELATION_TYPE_RRHH." |
|
151 | 151 | AND cu.c_id = '$courseId' |
152 | 152 | LIMIT $offset,$step"; |
153 | 153 | } else { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | // check if user is in this course |
174 | 174 | $tracking_is_accepted = $is_course_member; |
175 | 175 | $tracked_user_info = api_get_user_info($uInfo); |
176 | - $title[0] = $tracked_user_info[1] . '_' . $tracked_user_info[2]; |
|
176 | + $title[0] = $tracked_user_info[1].'_'.$tracked_user_info[2]; |
|
177 | 177 | } else { |
178 | 178 | // check if user is in the group of this tutor |
179 | 179 | $sql = "SELECT u.firstname,u.lastname, u.email |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $tracking_is_accepted = true; |
188 | 188 | } |
189 | 189 | |
190 | - $title[0] = $tracked_user_info['firstname'] . '_' . $tracked_user_info['lastname']; |
|
190 | + $title[0] = $tracked_user_info['firstname'].'_'.$tracked_user_info['lastname']; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | if ($tracking_is_accepted) { |
@@ -235,8 +235,8 @@ discard block |
||
235 | 235 | $_cid |
236 | 236 | ); |
237 | 237 | |
238 | - $title_line = $title_line1 . $title_line2 . $title_line3 . $title_line4 . $title_line5; |
|
239 | - $line = $line1 . $line2 . $line3 . $line4 . $line5; |
|
238 | + $title_line = $title_line1.$title_line2.$title_line3.$title_line4.$title_line5; |
|
239 | + $line = $line1.$line2.$line3.$line4.$line5; |
|
240 | 240 | } else { |
241 | 241 | echo get_lang('ErrorUserNotInGroup'); |
242 | 242 | } |
@@ -303,22 +303,22 @@ discard block |
||
303 | 303 | * force the browser to save the file instead of opening it |
304 | 304 | */ |
305 | 305 | |
306 | - $len = strlen($title_line . $line); |
|
306 | + $len = strlen($title_line.$line); |
|
307 | 307 | header('Content-type: application/octet-stream'); |
308 | 308 | //header('Content-Type: application/force-download'); |
309 | - header('Content-length: ' . $len); |
|
309 | + header('Content-length: '.$len); |
|
310 | 310 | $filename = html_entity_decode( |
311 | 311 | str_replace( |
312 | 312 | ":", |
313 | 313 | "", |
314 | - str_replace(" ", "_", $title[0] . '_' . $title[1] . '.csv') |
|
314 | + str_replace(" ", "_", $title[0].'_'.$title[1].'.csv') |
|
315 | 315 | ) |
316 | 316 | ); |
317 | 317 | $filename = api_replace_dangerous_char($filename); |
318 | 318 | if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) { |
319 | - header('Content-Disposition: filename= ' . $filename); |
|
319 | + header('Content-Disposition: filename= '.$filename); |
|
320 | 320 | } else { |
321 | - header('Content-Disposition: attachment; filename= ' . $filename); |
|
321 | + header('Content-Disposition: attachment; filename= '.$filename); |
|
322 | 322 | } |
323 | 323 | if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { |
324 | 324 | header('Pragma: '); |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | 'Cache-Control: public' |
328 | 328 | ); // IE cannot download from sessions without a cache |
329 | 329 | } |
330 | - header('Content-Description: ' . $filename); |
|
330 | + header('Content-Description: '.$filename); |
|
331 | 331 | header('Content-transfer-encoding: binary'); |
332 | 332 | |
333 | 333 | echo api_html_entity_decode($title_line, ENT_QUOTES, $charset); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | require_once api_get_path(SYS_CODE_PATH).'exercise/hotpotatoes.lib.php'; |
28 | 28 | |
29 | 29 | if (isset($uInfo)) { |
30 | - $interbreadcrumb[]= array( |
|
30 | + $interbreadcrumb[] = array( |
|
31 | 31 | 'url'=>'../user/userInfo.php?uInfo='.Security::remove_XSS($uInfo), |
32 | 32 | "name"=> api_ucfirst(get_lang('Users')) |
33 | 33 | ); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | /*]]>*/ |
49 | 49 | </style>"; |
50 | 50 | |
51 | -Display::display_header($nameTools,"Tracking"); |
|
51 | +Display::display_header($nameTools, "Tracking"); |
|
52 | 52 | |
53 | 53 | /* Constants and variables */ |
54 | 54 | |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | $is_course_member = CourseManager::is_user_subscribed_in_real_or_linked_course($user_id, $courseId); |
57 | 57 | |
58 | 58 | // Database Table Definitions |
59 | -$TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
60 | -$TABLEUSER = Database::get_main_table(TABLE_MAIN_USER); |
|
61 | -$tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
62 | -$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
|
63 | -$TABLECOURSE_GROUPSUSER = Database::get_course_table(TABLE_GROUP_USER); |
|
59 | +$TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
60 | +$TABLEUSER = Database::get_main_table(TABLE_MAIN_USER); |
|
61 | +$tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
62 | +$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
|
63 | +$TABLECOURSE_GROUPSUSER = Database::get_course_table(TABLE_GROUP_USER); |
|
64 | 64 | $now = api_get_utc_datetime(); |
65 | 65 | |
66 | 66 | $sql = "SELECT 1 |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | OR (access_start_date IS NULL AND access_end_date IS NULL)) |
73 | 73 | WHERE session_id='".api_get_session_id()."' AND c_id = $courseId"; |
74 | 74 | //echo $sql; |
75 | -$result=Database::query($sql); |
|
76 | -if(!Database::num_rows($result)){ |
|
75 | +$result = Database::query($sql); |
|
76 | +if (!Database::num_rows($result)) { |
|
77 | 77 | $disabled = true; |
78 | 78 | } |
79 | 79 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $tbl_learnpath_view = Database::get_course_table(TABLE_LP_VIEW); |
83 | 83 | $tbl_learnpath_item_view = Database::get_course_table(TABLE_LP_ITEM_VIEW); |
84 | 84 | |
85 | -$documentPath=api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
|
85 | +$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
|
86 | 86 | |
87 | 87 | // The variables for the days and the months |
88 | 88 | $DaysShort = api_get_week_days_short(); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | <table width="100%" cellpadding="2" cellspacing="3" border="0"> |
108 | 108 | <?php |
109 | 109 | // check if uid is tutor of this group |
110 | -if (( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
110 | +if (($is_allowedToTrack || $is_allowedToTrackEverybodyInCourse)) { |
|
111 | 111 | if (!$uInfo && !isset($uInfo)) { |
112 | 112 | /* |
113 | 113 | * Display list of user of this group |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $step = 25; // number of student per page |
132 | 132 | if ($userGroupNb > $step) { |
133 | 133 | if (!isset($offset)) { |
134 | - $offset=0; |
|
134 | + $offset = 0; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | $next = $offset + $step; |
@@ -184,13 +184,13 @@ discard block |
||
184 | 184 | $list_users = getManyResults3Col($sql); |
185 | 185 | echo "<table width='100%' cellpadding='2' cellspacing='1' border='0'>\n" |
186 | 186 | ."<tr align='center' valign='top' bgcolor='#E6E6E6'>\n" |
187 | - ."<td align='left'>",get_lang('UserName'),"</td>\n" |
|
187 | + ."<td align='left'>", get_lang('UserName'), "</td>\n" |
|
188 | 188 | ."</tr>\n"; |
189 | 189 | for ($i = 0; $i < sizeof($list_users); $i++) { |
190 | 190 | echo "<tr valign='top' align='center'>\n" |
191 | 191 | ."<td align='left'>" |
192 | - ."<a href='".api_get_self()."?uInfo=",$list_users[$i][0],"'>" |
|
193 | - .$list_users[$i][1]," ",$list_users[$i][2] |
|
192 | + ."<a href='".api_get_self()."?uInfo=", $list_users[$i][0], "'>" |
|
193 | + .$list_users[$i][1], " ", $list_users[$i][2] |
|
194 | 194 | ."</a>". |
195 | 195 | "</td>\n"; |
196 | 196 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | "; |
248 | 248 | |
249 | 249 | if (!isset($view)) { |
250 | - $view ='0000000'; |
|
250 | + $view = '0000000'; |
|
251 | 251 | } |
252 | 252 | //Logins |
253 | 253 | TrackingUserLog::display_login_tracking_info($view, $uInfo, $courseId); |
@@ -279,8 +279,8 @@ discard block |
||
279 | 279 | </tr>"; |
280 | 280 | |
281 | 281 | $sql = "SELECT id, name FROM $tbl_learnpath_main"; |
282 | - $result=Database::query($sql); |
|
283 | - $ar=Database::fetch_array($result); |
|
282 | + $result = Database::query($sql); |
|
283 | + $ar = Database::fetch_array($result); |
|
284 | 284 | |
285 | 285 | echo "<tr><td style='padding-left : 40px;padding-right : 40px;'>"; |
286 | 286 | echo "<table cellpadding='2' cellspacing='1' border='0' align='center'><tr> |
@@ -297,14 +297,14 @@ discard block |
||
297 | 297 | if ($ar['id'] == $scormcontopen) { |
298 | 298 | //have to list the students here |
299 | 299 | $contentId = intval($ar['id']); |
300 | - $sql3 = "SELECT iv.status, iv.score, i.title, iv.total_time " . |
|
301 | - "FROM $tbl_learnpath_item i " . |
|
302 | - "INNER JOIN $tbl_learnpath_item_view iv ON i.id=iv.lp_item_id " . |
|
303 | - "INNER JOIN $tbl_learnpath_view v ON iv.lp_view_id=v.id " . |
|
300 | + $sql3 = "SELECT iv.status, iv.score, i.title, iv.total_time ". |
|
301 | + "FROM $tbl_learnpath_item i ". |
|
302 | + "INNER JOIN $tbl_learnpath_item_view iv ON i.id=iv.lp_item_id ". |
|
303 | + "INNER JOIN $tbl_learnpath_view v ON iv.lp_view_id=v.id ". |
|
304 | 304 | "WHERE (v.user_id=".intval($uInfo)." and v.lp_id=$contentId) |
305 | 305 | ORDER BY v.id, i.id"; |
306 | - $result3=Database::query($sql3); |
|
307 | - $ar3=Database::fetch_array($result3); |
|
306 | + $result3 = Database::query($sql3); |
|
307 | + $ar3 = Database::fetch_array($result3); |
|
308 | 308 | if (is_array($ar3)) { |
309 | 309 | echo "<tr><td> </td> |
310 | 310 | <td class='secLine'> |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | echo "<tr><td> </td><td>"; |
327 | 327 | echo "$title</td><td align=right>{$ar3['status']}</td><td align=right>{$ar3['score']}</td><td align=right>$time</td>"; |
328 | 328 | echo "</tr>"; |
329 | - $ar3=Database::fetch_array($result3); |
|
329 | + $ar3 = Database::fetch_array($result3); |
|
330 | 330 | } |
331 | 331 | } else { |
332 | 332 | echo "<tr>"; |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $ar = Database::fetch_array($result); |
338 | 338 | } |
339 | 339 | } else { |
340 | - $noscorm=true; |
|
340 | + $noscorm = true; |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | if ($noscorm) { |