@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | foreach ($sessionCourses as $sessionCourse) { |
47 | 47 | $course = $sessionCourse->getCourse(); |
48 | - $coursesInfo[$course->getId()] = $course->getCode(); |
|
48 | + $coursesInfo[$course->getId()] = $course->getCode(); |
|
49 | 49 | $criteria = Criteria::create()->where( |
50 | 50 | Criteria::expr()->eq("status", Session::STUDENT) |
51 | 51 | ); |
@@ -68,21 +68,21 @@ discard block |
||
68 | 68 | ]; |
69 | 69 | } |
70 | 70 | |
71 | - $usersInfo[$user->getId()][$course->getId() . '_score'] = null; |
|
72 | - $usersInfo[$user->getId()][$course->getId() . '_progress'] = null; |
|
73 | - $usersInfo[$user->getId()][$course->getId() . '_last_sent_date'] = null; |
|
71 | + $usersInfo[$user->getId()][$course->getId().'_score'] = null; |
|
72 | + $usersInfo[$user->getId()][$course->getId().'_progress'] = null; |
|
73 | + $usersInfo[$user->getId()][$course->getId().'_last_sent_date'] = null; |
|
74 | 74 | |
75 | 75 | if (!$session->hasStudentInCourse($user, $course)) { |
76 | 76 | continue; |
77 | 77 | } |
78 | 78 | |
79 | - $usersInfo[$user->getId()][$course->getId() . '_score'] = Tracking::get_avg_student_score( |
|
79 | + $usersInfo[$user->getId()][$course->getId().'_score'] = Tracking::get_avg_student_score( |
|
80 | 80 | $user->getId(), |
81 | 81 | $course->getCode(), |
82 | 82 | null, |
83 | 83 | $session->getId() |
84 | 84 | ); |
85 | - $usersInfo[$user->getId()][$course->getId() . '_progress'] = Tracking::get_avg_student_progress( |
|
85 | + $usersInfo[$user->getId()][$course->getId().'_progress'] = Tracking::get_avg_student_progress( |
|
86 | 86 | $user->getId(), |
87 | 87 | $course->getCode(), |
88 | 88 | null, |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | continue; |
96 | 96 | } |
97 | 97 | |
98 | - $usersInfo[$user->getId()][$course->getId() . '_last_sent_date'] = api_format_date( |
|
98 | + $usersInfo[$user->getId()][$course->getId().'_last_sent_date'] = api_format_date( |
|
99 | 99 | $lastPublication->getSentDate()->getTimestamp(), |
100 | 100 | DATE_TIME_FORMAT_SHORT |
101 | 101 | ); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $dataToExport = [ |
108 | 108 | [$toolName] |
109 | 109 | ]; |
110 | - $fileName = 'works_in_session_' . api_get_local_time(); |
|
110 | + $fileName = 'works_in_session_'.api_get_local_time(); |
|
111 | 111 | |
112 | 112 | $dataToExport['headers'][] = get_lang('OfficialCode'); |
113 | 113 | $dataToExport['headers'][] = get_lang('StudentName'); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | $interbreadcrumb[] = [ |
141 | - 'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/index.php', |
|
141 | + 'url' => api_get_path(WEB_CODE_PATH).'mySpace/index.php', |
|
142 | 142 | 'name' => get_lang('MySpace') |
143 | 143 | ]; |
144 | 144 | |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | $actions = [ |
149 | 149 | Display::url( |
150 | 150 | Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), [], ICON_SIZE_MEDIUM), |
151 | - api_get_self() . '?' . http_build_query(['export' => 'csv', 'session' => $session->getId()]) |
|
151 | + api_get_self().'?'.http_build_query(['export' => 'csv', 'session' => $session->getId()]) |
|
152 | 152 | ), |
153 | 153 | Display::url( |
154 | 154 | Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), [], ICON_SIZE_MEDIUM), |
155 | - api_get_self() . '?' . http_build_query(['export' => 'xls', 'session' => $session->getId()]) |
|
155 | + api_get_self().'?'.http_build_query(['export' => 'xls', 'session' => $session->getId()]) |
|
156 | 156 | ) |
157 | 157 | ]; |
158 | 158 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | require_once api_get_path(SYS_CODE_PATH).'exercise/hotpotatoes.lib.php'; |
30 | 30 | |
31 | 31 | if (isset($uInfo)) { |
32 | - $interbreadcrumb[]= array( |
|
32 | + $interbreadcrumb[] = array( |
|
33 | 33 | 'url'=>'../user/userInfo.php?uInfo='.Security::remove_XSS($uInfo), |
34 | 34 | "name"=> api_ucfirst(get_lang('Users')) |
35 | 35 | ); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /*]]>*/ |
51 | 51 | </style>"; |
52 | 52 | |
53 | -Display::display_header($nameTools,"Tracking"); |
|
53 | +Display::display_header($nameTools, "Tracking"); |
|
54 | 54 | |
55 | 55 | /* Constants and variables */ |
56 | 56 | |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | $is_course_member = CourseManager::is_user_subscribed_in_real_or_linked_course($user_id, $courseId); |
59 | 59 | |
60 | 60 | // Database Table Definitions |
61 | -$TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
62 | -$TABLEUSER = Database::get_main_table(TABLE_MAIN_USER); |
|
63 | -$tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
64 | -$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
|
65 | -$TABLECOURSE_GROUPSUSER = Database::get_course_table(TABLE_GROUP_USER); |
|
61 | +$TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
62 | +$TABLEUSER = Database::get_main_table(TABLE_MAIN_USER); |
|
63 | +$tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
64 | +$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
|
65 | +$TABLECOURSE_GROUPSUSER = Database::get_course_table(TABLE_GROUP_USER); |
|
66 | 66 | $now = api_get_utc_datetime(); |
67 | 67 | |
68 | 68 | $sql = "SELECT 1 |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | OR (access_start_date='0000-00-00' AND access_end_date='0000-00-00')) |
75 | 75 | WHERE session_id='".api_get_session_id()."' AND c_id = $courseId"; |
76 | 76 | //echo $sql; |
77 | -$result=Database::query($sql); |
|
78 | -if(!Database::num_rows($result)){ |
|
77 | +$result = Database::query($sql); |
|
78 | +if (!Database::num_rows($result)) { |
|
79 | 79 | $disabled = true; |
80 | 80 | } |
81 | 81 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $tbl_learnpath_view = Database::get_course_table(TABLE_LP_VIEW); |
85 | 85 | $tbl_learnpath_item_view = Database::get_course_table(TABLE_LP_ITEM_VIEW); |
86 | 86 | |
87 | -$documentPath=api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
|
87 | +$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
|
88 | 88 | |
89 | 89 | // The variables for the days and the months |
90 | 90 | $DaysShort = api_get_week_days_short(); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | <table width="100%" cellpadding="2" cellspacing="3" border="0"> |
110 | 110 | <?php |
111 | 111 | // check if uid is tutor of this group |
112 | -if (( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
112 | +if (($is_allowedToTrack || $is_allowedToTrackEverybodyInCourse)) { |
|
113 | 113 | if (!$uInfo && !isset($uInfo)) { |
114 | 114 | /* |
115 | 115 | * Display list of user of this group |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $step = 25; // number of student per page |
134 | 134 | if ($userGroupNb > $step) { |
135 | 135 | if (!isset($offset)) { |
136 | - $offset=0; |
|
136 | + $offset = 0; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | $next = $offset + $step; |
@@ -186,13 +186,13 @@ discard block |
||
186 | 186 | $list_users = getManyResults3Col($sql); |
187 | 187 | echo "<table width='100%' cellpadding='2' cellspacing='1' border='0'>\n" |
188 | 188 | ."<tr align='center' valign='top' bgcolor='#E6E6E6'>\n" |
189 | - ."<td align='left'>",get_lang('UserName'),"</td>\n" |
|
189 | + ."<td align='left'>", get_lang('UserName'), "</td>\n" |
|
190 | 190 | ."</tr>\n"; |
191 | 191 | for ($i = 0; $i < sizeof($list_users); $i++) { |
192 | 192 | echo "<tr valign='top' align='center'>\n" |
193 | 193 | ."<td align='left'>" |
194 | - ."<a href='".api_get_self()."?uInfo=",$list_users[$i][0],"'>" |
|
195 | - .$list_users[$i][1]," ",$list_users[$i][2] |
|
194 | + ."<a href='".api_get_self()."?uInfo=", $list_users[$i][0], "'>" |
|
195 | + .$list_users[$i][1], " ", $list_users[$i][2] |
|
196 | 196 | ."</a>". |
197 | 197 | "</td>\n"; |
198 | 198 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | "; |
250 | 250 | |
251 | 251 | if (!isset($view)) { |
252 | - $view ='0000000'; |
|
252 | + $view = '0000000'; |
|
253 | 253 | } |
254 | 254 | //Logins |
255 | 255 | TrackingUserLog::display_login_tracking_info($view, $uInfo, $courseId); |
@@ -281,8 +281,8 @@ discard block |
||
281 | 281 | </tr>"; |
282 | 282 | |
283 | 283 | $sql = "SELECT id, name FROM $tbl_learnpath_main"; |
284 | - $result=Database::query($sql); |
|
285 | - $ar=Database::fetch_array($result); |
|
284 | + $result = Database::query($sql); |
|
285 | + $ar = Database::fetch_array($result); |
|
286 | 286 | |
287 | 287 | echo "<tr><td style='padding-left : 40px;padding-right : 40px;'>"; |
288 | 288 | echo "<table cellpadding='2' cellspacing='1' border='0' align='center'><tr> |
@@ -299,14 +299,14 @@ discard block |
||
299 | 299 | if ($ar['id'] == $scormcontopen) { |
300 | 300 | //have to list the students here |
301 | 301 | $contentId = intval($ar['id']); |
302 | - $sql3 = "SELECT iv.status, iv.score, i.title, iv.total_time " . |
|
303 | - "FROM $tbl_learnpath_item i " . |
|
304 | - "INNER JOIN $tbl_learnpath_item_view iv ON i.id=iv.lp_item_id " . |
|
305 | - "INNER JOIN $tbl_learnpath_view v ON iv.lp_view_id=v.id " . |
|
302 | + $sql3 = "SELECT iv.status, iv.score, i.title, iv.total_time ". |
|
303 | + "FROM $tbl_learnpath_item i ". |
|
304 | + "INNER JOIN $tbl_learnpath_item_view iv ON i.id=iv.lp_item_id ". |
|
305 | + "INNER JOIN $tbl_learnpath_view v ON iv.lp_view_id=v.id ". |
|
306 | 306 | "WHERE (v.user_id=".intval($uInfo)." and v.lp_id=$contentId) |
307 | 307 | ORDER BY v.id, i.id"; |
308 | - $result3=Database::query($sql3); |
|
309 | - $ar3=Database::fetch_array($result3); |
|
308 | + $result3 = Database::query($sql3); |
|
309 | + $ar3 = Database::fetch_array($result3); |
|
310 | 310 | if (is_array($ar3)) { |
311 | 311 | echo "<tr><td> </td> |
312 | 312 | <td class='secLine'> |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | echo "<tr><td> </td><td>"; |
329 | 329 | echo "$title</td><td align=right>{$ar3['status']}</td><td align=right>{$ar3['score']}</td><td align=right>$time</td>"; |
330 | 330 | echo "</tr>"; |
331 | - $ar3=Database::fetch_array($result3); |
|
331 | + $ar3 = Database::fetch_array($result3); |
|
332 | 332 | } |
333 | 333 | } else { |
334 | 334 | echo "<tr>"; |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | $ar = Database::fetch_array($result); |
340 | 340 | } |
341 | 341 | } else { |
342 | - $noscorm=true; |
|
342 | + $noscorm = true; |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | if ($noscorm) { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | // Now that there is an association created, move on |
65 | 65 | // to request authentication from the IdP |
66 | 66 | $identity = (!empty($services[0]['delegate'])) ? $services[0]['delegate'] : $claimed_id; |
67 | - if (isset($services[0]['types']) && is_array($services[0]['types']) && in_array(OPENID_NS_2_0 . '/server', $services[0]['types'])) { |
|
67 | + if (isset($services[0]['types']) && is_array($services[0]['types']) && in_array(OPENID_NS_2_0.'/server', $services[0]['types'])) { |
|
68 | 68 | $identity = 'http://openid.net/identifier_select/2.0'; |
69 | 69 | } |
70 | 70 | $authn_request = openid_authentication_request($claimed_id, $identity, $return_to, $assoc_handle, $services[0]['version']); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | |
120 | 120 | $xrds_url = $claimed_id; |
121 | 121 | if (_openid_is_xri($claimed_id)) { |
122 | - $xrds_url = 'http://xri.net/' . $claimed_id; |
|
122 | + $xrds_url = 'http://xri.net/'.$claimed_id; |
|
123 | 123 | } |
124 | 124 | $url = @parse_url($xrds_url); |
125 | 125 | if ($url['scheme'] == 'http' || $url['scheme'] == 'https') { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | //@todo Remove Old Associations: |
183 | 183 | $openid_association = Database::get_main_table(TABLE_MAIN_OPENID_ASSOCIATION); |
184 | 184 | $sql = "DELETE FROM $openid_association |
185 | - WHERE created + expires_in < '" . api_get_utc_datetime() . "'"; |
|
185 | + WHERE created + expires_in < '".api_get_utc_datetime()."'"; |
|
186 | 186 | Database::query($sql); |
187 | 187 | |
188 | 188 | // Check to see if we have an association for this IdP already |
@@ -339,17 +339,17 @@ discard block |
||
339 | 339 | switch ($uri['scheme']) { |
340 | 340 | case 'http': |
341 | 341 | $port = isset($uri['port']) ? $uri['port'] : 80; |
342 | - $host = $uri['host'] . ($port != 80 ? ':' . $port : ''); |
|
342 | + $host = $uri['host'].($port != 80 ? ':'.$port : ''); |
|
343 | 343 | $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15); |
344 | 344 | break; |
345 | 345 | case 'https': |
346 | 346 | // Note: Only works for PHP 4.3 compiled with OpenSSL. |
347 | 347 | $port = isset($uri['port']) ? $uri['port'] : 443; |
348 | - $host = $uri['host'] . ($port != 443 ? ':' . $port : ''); |
|
349 | - $fp = @fsockopen('ssl://' . $uri['host'], $port, $errno, $errstr, 20); |
|
348 | + $host = $uri['host'].($port != 443 ? ':'.$port : ''); |
|
349 | + $fp = @fsockopen('ssl://'.$uri['host'], $port, $errno, $errstr, 20); |
|
350 | 350 | break; |
351 | 351 | default: |
352 | - $result->error = 'invalid schema ' . $uri['scheme']; |
|
352 | + $result->error = 'invalid schema '.$uri['scheme']; |
|
353 | 353 | return $result; |
354 | 354 | } |
355 | 355 | |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | // Construct the path to act on. |
366 | 366 | $path = isset($uri['path']) ? $uri['path'] : '/'; |
367 | 367 | if (isset($uri['query'])) { |
368 | - $path .= '?' . $uri['query']; |
|
368 | + $path .= '?'.$uri['query']; |
|
369 | 369 | } |
370 | 370 | |
371 | 371 | // Create HTTP request. |
@@ -375,23 +375,23 @@ discard block |
||
375 | 375 | // host that do not take into account the port number. |
376 | 376 | 'Host' => "Host: $host", |
377 | 377 | 'User-Agent' => 'User-Agent: Chamilo (+http://www.chamilo.org/)', |
378 | - 'Content-Length' => 'Content-Length: ' . strlen($data) |
|
378 | + 'Content-Length' => 'Content-Length: '.strlen($data) |
|
379 | 379 | ); |
380 | 380 | |
381 | 381 | // If the server url has a user then attempt to use basic authentication |
382 | 382 | if (isset($uri['user'])) { |
383 | - $defaults['Authorization'] = 'Authorization: Basic ' . base64_encode($uri['user'] . (!empty($uri['pass']) ? ":" . $uri['pass'] : '')); |
|
383 | + $defaults['Authorization'] = 'Authorization: Basic '.base64_encode($uri['user'].(!empty($uri['pass']) ? ":".$uri['pass'] : '')); |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | foreach ($headers as $header => $value) { |
387 | - $defaults[$header] = $header . ': ' . $value; |
|
387 | + $defaults[$header] = $header.': '.$value; |
|
388 | 388 | } |
389 | 389 | |
390 | - $request = $method . ' ' . $path . " HTTP/1.0\r\n"; |
|
390 | + $request = $method.' '.$path." HTTP/1.0\r\n"; |
|
391 | 391 | $request .= implode("\r\n", $defaults); |
392 | 392 | $request .= "\r\n\r\n"; |
393 | 393 | if ($data) { |
394 | - $request .= $data . "\r\n"; |
|
394 | + $request .= $data."\r\n"; |
|
395 | 395 | } |
396 | 396 | $result->request = $request; |
397 | 397 | |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | if (isset($result->headers[$header]) && $header == 'Set-Cookie') { |
418 | 418 | // RFC 2109: the Set-Cookie response header comprises the token Set- |
419 | 419 | // Cookie:, followed by a comma-separated list of one or more cookies. |
420 | - $result->headers[$header] .= ',' . trim($value); |
|
420 | + $result->headers[$header] .= ','.trim($value); |
|
421 | 421 | } else { |
422 | 422 | $result->headers[$header] = trim($value); |
423 | 423 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $form = TicketManager::getCategoryForm($url, $projectId); |
64 | 64 | $formToString = $form->returnForm(); |
65 | 65 | if ($form->validate()) { |
66 | - $values =$form->getSubmitValues(); |
|
66 | + $values = $form->getSubmitValues(); |
|
67 | 67 | |
68 | 68 | $params = [ |
69 | 69 | 'name' => $values['name'], |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $form->setDefaults($cat); |
96 | 96 | $formToString = $form->returnForm(); |
97 | 97 | if ($form->validate()) { |
98 | - $values =$form->getSubmitValues(); |
|
98 | + $values = $form->getSubmitValues(); |
|
99 | 99 | |
100 | 100 | $params = [ |
101 | 101 | 'name' => $values['name'], |
@@ -6,24 +6,24 @@ |
||
6 | 6 | */ |
7 | 7 | class HTML_QuickForm_Compare_Fields extends HTML_QuickForm_Rule_Compare |
8 | 8 | { |
9 | - /** |
|
10 | - * Function to check an array of fields |
|
11 | - * @param array of field names |
|
9 | + /** |
|
10 | + * Function to check an array of fields |
|
11 | + * @param array of field names |
|
12 | 12 | * @param string operator ==, >=, etc |
13 | 13 | * @param string the value to compare |
14 | - * @return boolean True if date is valid |
|
15 | - */ |
|
16 | - function validate($values = [], $operator_and_max_value = null) { |
|
14 | + * @return boolean True if date is valid |
|
15 | + */ |
|
16 | + function validate($values = [], $operator_and_max_value = null) { |
|
17 | 17 | if (is_array($values) && !empty($values) && !empty($operator_and_max_value)) { |
18 | - $final_value = 0; |
|
19 | - foreach ($values as $value) { |
|
20 | - $final_value += $value; |
|
21 | - } |
|
22 | - $params = explode('@', $operator_and_max_value); |
|
23 | - $operator = $params[0]; |
|
24 | - $max_value = $params[1]; |
|
25 | - return parent::validate(array($final_value, $max_value), $operator); |
|
18 | + $final_value = 0; |
|
19 | + foreach ($values as $value) { |
|
20 | + $final_value += $value; |
|
21 | + } |
|
22 | + $params = explode('@', $operator_and_max_value); |
|
23 | + $operator = $params[0]; |
|
24 | + $max_value = $params[1]; |
|
25 | + return parent::validate(array($final_value, $max_value), $operator); |
|
26 | 26 | } |
27 | 27 | return false; |
28 | - } |
|
28 | + } |
|
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $form = new FormValidator( |
23 | 23 | 'thematic_advance', |
24 | 24 | 'POST', |
25 | - api_get_self() . '?' . api_get_cidreq() |
|
25 | + api_get_self().'?'.api_get_cidreq() |
|
26 | 26 | ); |
27 | 27 | $form->addElement('header', $header_form); |
28 | 28 | //$form->addElement('hidden', 'thematic_advance_token',$token); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | $thematic = new Thematic(); |
193 | 193 | $thematic->set_thematic_advance_attributes( |
194 | - isset($values['thematic_advance_id']) ? $values['thematic_advance_id']: null, |
|
194 | + isset($values['thematic_advance_id']) ? $values['thematic_advance_id'] : null, |
|
195 | 195 | $values['thematic_id'], |
196 | 196 | $values['start_date_type'] == 1 && isset($values['attendance_select']) ? $values['attendance_select'] : 0, |
197 | 197 | $values['content'], |
@@ -210,13 +210,13 @@ discard block |
||
210 | 210 | } |
211 | 211 | } |
212 | 212 | |
213 | - $redirectUrlParams = 'course_progress/index.php?' . api_get_cidreq() . '&' . |
|
213 | + $redirectUrlParams = 'course_progress/index.php?'.api_get_cidreq().'&'. |
|
214 | 214 | http_build_query([ |
215 | 215 | 'action' => 'thematic_advance_list', |
216 | 216 | 'thematic_id' => $values['thematic_id'] |
217 | 217 | ]); |
218 | 218 | |
219 | - header('Location: ' . api_get_path(WEB_CODE_PATH) . $redirectUrlParams); |
|
219 | + header('Location: '.api_get_path(WEB_CODE_PATH).$redirectUrlParams); |
|
220 | 220 | exit; |
221 | 221 | } |
222 | 222 | |
@@ -226,10 +226,10 @@ discard block |
||
226 | 226 | // thematic advance list |
227 | 227 | echo '<div class="actions">'; |
228 | 228 | echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=thematic_details">'. |
229 | - Display::return_icon('back.png', get_lang("BackTo"),'',ICON_SIZE_MEDIUM).'</a>'; |
|
229 | + Display::return_icon('back.png', get_lang("BackTo"), '', ICON_SIZE_MEDIUM).'</a>'; |
|
230 | 230 | if (api_is_allowed_to_edit(false, true)) { |
231 | 231 | echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic_id.'"> '. |
232 | - Display::return_icon('add.png', get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
232 | + Display::return_icon('add.png', get_lang('NewThematicAdvance'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
233 | 233 | } |
234 | 234 | echo '</div>'; |
235 | 235 | $table = new SortableTable( |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | if (!empty($gradebook) && $gradebook == 'view') { |
76 | - $interbreadcrumb[]= array ( |
|
76 | + $interbreadcrumb[] = array( |
|
77 | 77 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
78 | 78 | 'name' => get_lang('ToolGradebook') |
79 | 79 | ); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $form = new FormValidator( |
98 | 98 | 'lp_add', |
99 | 99 | 'post', |
100 | - api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?'.api_get_cidreq() |
|
100 | + api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq() |
|
101 | 101 | ); |
102 | 102 | |
103 | 103 | // Form title |
@@ -126,17 +126,17 @@ discard block |
||
126 | 126 | |
127 | 127 | // Start date |
128 | 128 | $form->addElement('checkbox', 'activate_start_date_check', null, get_lang('EnableStartTime'), array('onclick' => 'activate_start_date()')); |
129 | -$form->addElement('html','<div id="start_date_div" style="display:block;">'); |
|
129 | +$form->addElement('html', '<div id="start_date_div" style="display:block;">'); |
|
130 | 130 | $form->addDatePicker('publicated_on', get_lang('PublicationDate')); |
131 | -$form->addElement('html','</div>'); |
|
131 | +$form->addElement('html', '</div>'); |
|
132 | 132 | |
133 | 133 | //End date |
134 | 134 | $form->addElement('checkbox', 'activate_end_date_check', null, get_lang('EnableEndTime'), array('onclick' => 'activate_end_date()')); |
135 | -$form->addElement('html','<div id="end_date_div" style="display:none;">'); |
|
135 | +$form->addElement('html', '<div id="end_date_div" style="display:none;">'); |
|
136 | 136 | $form->addDatePicker('expired_on', get_lang('ExpirationDate')); |
137 | -$form->addElement('html','</div>'); |
|
137 | +$form->addElement('html', '</div>'); |
|
138 | 138 | |
139 | -$form->addElement('html','</div>'); |
|
139 | +$form->addElement('html', '</div>'); |
|
140 | 140 | |
141 | 141 | $defaults['activate_start_date_check'] = 1; |
142 | 142 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | $defaults['publicated_on'] = date('Y-m-d 08:00:00'); |
150 | -$defaults['expired_on'] = date('Y-m-d 08:00:00',time()+86400); |
|
150 | +$defaults['expired_on'] = date('Y-m-d 08:00:00', time() + 86400); |
|
151 | 151 | |
152 | 152 | $form->setDefaults($defaults); |
153 | 153 | $form->addButtonCreate(get_lang('CreateLearningPath')); |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | |
19 | 19 | $document_data = DocumentManager::get_document_data_by_id($_GET['id'], api_get_course_id(), true); |
20 | 20 | if (empty($document_data)) { |
21 | - if (api_is_in_group()) { |
|
22 | - $group_properties = GroupManager::get_group_properties(api_get_group_id()); |
|
23 | - $document_id = DocumentManager::get_document_id(api_get_course_info(), $group_properties['directory']); |
|
24 | - $document_data = DocumentManager::get_document_data_by_id($document_id, api_get_course_id()); |
|
25 | - } |
|
21 | + if (api_is_in_group()) { |
|
22 | + $group_properties = GroupManager::get_group_properties(api_get_group_id()); |
|
23 | + $document_id = DocumentManager::get_document_id(api_get_course_info(), $group_properties['directory']); |
|
24 | + $document_data = DocumentManager::get_document_data_by_id($document_id, api_get_course_id()); |
|
25 | + } |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $document_id = $document_data['id']; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | //make some vars |
32 | 32 | $wamidir = $dir; |
33 | 33 | if ($wamidir == "/") { |
34 | - $wamidir = ""; |
|
34 | + $wamidir = ""; |
|
35 | 35 | } |
36 | 36 | $wamiurlplay = api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document'.$wamidir."/"; |
37 | 37 | $groupId = api_get_group_id(); |
@@ -41,48 +41,48 @@ discard block |
||
41 | 41 | // Please, do not modify this dirname formatting |
42 | 42 | |
43 | 43 | if (strstr($dir, '..')) { |
44 | - $dir = '/'; |
|
44 | + $dir = '/'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if ($dir[0] == '.') { |
48 | - $dir = substr($dir, 1); |
|
48 | + $dir = substr($dir, 1); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if ($dir[0] != '/') { |
52 | - $dir = '/'.$dir; |
|
52 | + $dir = '/'.$dir; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | if ($dir[strlen($dir) - 1] != '/') { |
56 | - $dir .= '/'; |
|
56 | + $dir .= '/'; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$dir; |
60 | 60 | |
61 | 61 | if (!is_dir($filepath)) { |
62 | - $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; |
|
63 | - $dir = '/'; |
|
62 | + $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; |
|
63 | + $dir = '/'; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | //groups //TODO: clean |
67 | 67 | if (!empty($groupId)) { |
68 | - $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
69 | - $noPHP_SELF = true; |
|
70 | - $group = GroupManager :: get_group_properties($groupId); |
|
71 | - $path = explode('/', $dir); |
|
72 | - if ('/'.$path[1] != $group['directory']) { |
|
73 | - api_not_allowed(true); |
|
74 | - } |
|
68 | + $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
69 | + $noPHP_SELF = true; |
|
70 | + $group = GroupManager :: get_group_properties($groupId); |
|
71 | + $path = explode('/', $dir); |
|
72 | + if ('/'.$path[1] != $group['directory']) { |
|
73 | + api_not_allowed(true); |
|
74 | + } |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $interbreadcrumb[] = array("url" => "./document.php?id=".$document_id.'&'.api_get_cidreq(), "name" => get_lang('Documents')); |
78 | 78 | |
79 | 79 | if (!$is_allowed_in_course) { |
80 | - api_not_allowed(true); |
|
80 | + api_not_allowed(true); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || |
84 | - DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) { |
|
85 | - api_not_allowed(true); |
|
84 | + DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) { |
|
85 | + api_not_allowed(true); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /* Header */ |
@@ -90,26 +90,26 @@ discard block |
||
90 | 90 | |
91 | 91 | $display_dir = $dir; |
92 | 92 | if (isset ($group)) { |
93 | - $display_dir = explode('/', $dir); |
|
94 | - unset ($display_dir[0]); |
|
95 | - unset ($display_dir[1]); |
|
96 | - $display_dir = implode('/', $display_dir); |
|
93 | + $display_dir = explode('/', $dir); |
|
94 | + unset ($display_dir[0]); |
|
95 | + unset ($display_dir[1]); |
|
96 | + $display_dir = implode('/', $display_dir); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | // Interbreadcrumb for the current directory root path |
100 | 100 | $counter = 0; |
101 | 101 | if (isset($document_data['parents'])) { |
102 | - foreach($document_data['parents'] as $document_sub_data) { |
|
103 | - //fixing double group folder in breadcrumb |
|
104 | - if (api_get_group_id()) { |
|
105 | - if ($counter == 0) { |
|
106 | - $counter++; |
|
107 | - continue; |
|
108 | - } |
|
109 | - } |
|
110 | - $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']); |
|
111 | - $counter++; |
|
112 | - } |
|
102 | + foreach($document_data['parents'] as $document_sub_data) { |
|
103 | + //fixing double group folder in breadcrumb |
|
104 | + if (api_get_group_id()) { |
|
105 | + if ($counter == 0) { |
|
106 | + $counter++; |
|
107 | + continue; |
|
108 | + } |
|
109 | + } |
|
110 | + $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']); |
|
111 | + $counter++; |
|
112 | + } |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | //make some vars |
@@ -121,12 +121,12 @@ discard block |
||
121 | 121 | $htmlHeadXtra[] = '<script type="text/javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'swfobject/swfobject.js"></script>'; |
122 | 122 | |
123 | 123 | $actions = Display::toolbarButton( |
124 | - get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'), |
|
125 | - 'document.php?' . api_get_cidreq() . "&id=$document_id", |
|
126 | - 'arrow-left', |
|
127 | - 'default', |
|
128 | - [], |
|
129 | - false |
|
124 | + get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'), |
|
125 | + 'document.php?' . api_get_cidreq() . "&id=$document_id", |
|
126 | + 'arrow-left', |
|
127 | + 'default', |
|
128 | + [], |
|
129 | + false |
|
130 | 130 | ); |
131 | 131 | |
132 | 132 | $template = new Template($nameTools); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | //groups //TODO: clean |
67 | 67 | if (!empty($groupId)) { |
68 | - $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
68 | + $interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
69 | 69 | $noPHP_SELF = true; |
70 | 70 | $group = GroupManager :: get_group_properties($groupId); |
71 | 71 | $path = explode('/', $dir); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || |
84 | - DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) { |
|
84 | + DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir), api_get_session_id()))) { |
|
85 | 85 | api_not_allowed(true); |
86 | 86 | } |
87 | 87 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | // Interbreadcrumb for the current directory root path |
100 | 100 | $counter = 0; |
101 | 101 | if (isset($document_data['parents'])) { |
102 | - foreach($document_data['parents'] as $document_sub_data) { |
|
102 | + foreach ($document_data['parents'] as $document_sub_data) { |
|
103 | 103 | //fixing double group folder in breadcrumb |
104 | 104 | if (api_get_group_id()) { |
105 | 105 | if ($counter == 0) { |
@@ -115,14 +115,14 @@ discard block |
||
115 | 115 | //make some vars |
116 | 116 | $wamiuserid = api_get_user_id(); |
117 | 117 | |
118 | -$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'rtc/RecordRTC.js"></script>'; |
|
119 | -$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'wami-recorder/recorder.js"></script>'; |
|
120 | -$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'wami-recorder/gui.js"></script>'; |
|
121 | -$htmlHeadXtra[] = '<script type="text/javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'swfobject/swfobject.js"></script>'; |
|
118 | +$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'rtc/RecordRTC.js"></script>'; |
|
119 | +$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'wami-recorder/recorder.js"></script>'; |
|
120 | +$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'wami-recorder/gui.js"></script>'; |
|
121 | +$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'swfobject/swfobject.js"></script>'; |
|
122 | 122 | |
123 | 123 | $actions = Display::toolbarButton( |
124 | - get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'), |
|
125 | - 'document.php?' . api_get_cidreq() . "&id=$document_id", |
|
124 | + get_lang('BackTo').' '.get_lang('DocumentsOverview'), |
|
125 | + 'document.php?'.api_get_cidreq()."&id=$document_id", |
|
126 | 126 | 'arrow-left', |
127 | 127 | 'default', |
128 | 128 | [], |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | - * @return array |
|
143 | + * @return string[] |
|
144 | 144 | */ |
145 | 145 | public static function getValidExtraFieldTypes() |
146 | 146 | { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | /** |
219 | 219 | * @param array $conditions |
220 | - * @param null $order_field_options_by |
|
220 | + * @param string $order_field_options_by |
|
221 | 221 | * |
222 | 222 | * @return array |
223 | 223 | */ |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | /** |
376 | 376 | * @param string $handler |
377 | 377 | * |
378 | - * @return array |
|
378 | + * @return string[] |
|
379 | 379 | */ |
380 | 380 | public static function get_extra_fields_by_handler($handler) |
381 | 381 | { |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
577 | - * @return array |
|
577 | + * @return string[] |
|
578 | 578 | */ |
579 | 579 | public function get_field_types() |
580 | 580 | { |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | /** |
585 | 585 | * @param int $id |
586 | 586 | * |
587 | - * @return null |
|
587 | + * @return string|null |
|
588 | 588 | */ |
589 | 589 | public function get_field_type_by_id($id) |
590 | 590 | { |
@@ -1826,7 +1826,7 @@ discard block |
||
1826 | 1826 | } |
1827 | 1827 | |
1828 | 1828 | /** |
1829 | - * @return array |
|
1829 | + * @return string[] |
|
1830 | 1830 | */ |
1831 | 1831 | public function getJqgridColumnNames() |
1832 | 1832 | { |
@@ -2086,7 +2086,7 @@ discard block |
||
2086 | 2086 | } |
2087 | 2087 | |
2088 | 2088 | /** |
2089 | - * @param array $columns |
|
2089 | + * @param string[] $columns |
|
2090 | 2090 | * @param array $column_model |
2091 | 2091 | * @param array $extraFields |
2092 | 2092 | * @return array |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | 'changeable', |
21 | 21 | 'filter', |
22 | 22 | 'extra_field_type', |
23 | - /* Enable this when field_loggeable is introduced as a table field (2.0) |
|
23 | + /* Enable this when field_loggeable is introduced as a table field (2.0) |
|
24 | 24 | 'field_loggeable', |
25 | 25 | */ |
26 | 26 | 'created_at' |
@@ -2041,7 +2041,7 @@ discard block |
||
2041 | 2041 | 'align' => 'left', |
2042 | 2042 | 'sortable' => 'true', |
2043 | 2043 | ), |
2044 | - array( |
|
2044 | + array( |
|
2045 | 2045 | 'name' => 'visible_to_others', |
2046 | 2046 | 'index' => 'visible_to_others', |
2047 | 2047 | 'width' => '40', |
@@ -27,19 +27,19 @@ discard block |
||
27 | 27 | ); |
28 | 28 | |
29 | 29 | public $ops = array( |
30 | - 'eq' => '=', //equal |
|
31 | - 'ne' => '<>', //not equal |
|
32 | - 'lt' => '<', //less than |
|
33 | - 'le' => '<=', //less than or equal |
|
34 | - 'gt' => '>', //greater than |
|
35 | - 'ge' => '>=', //greater than or equal |
|
36 | - 'bw' => 'LIKE', //begins with |
|
30 | + 'eq' => '=', //equal |
|
31 | + 'ne' => '<>', //not equal |
|
32 | + 'lt' => '<', //less than |
|
33 | + 'le' => '<=', //less than or equal |
|
34 | + 'gt' => '>', //greater than |
|
35 | + 'ge' => '>=', //greater than or equal |
|
36 | + 'bw' => 'LIKE', //begins with |
|
37 | 37 | 'bn' => 'NOT LIKE', //doesn't begin with |
38 | - 'in' => 'LIKE', //is in |
|
38 | + 'in' => 'LIKE', //is in |
|
39 | 39 | 'ni' => 'NOT LIKE', //is not in |
40 | - 'ew' => 'LIKE', //ends with |
|
40 | + 'ew' => 'LIKE', //ends with |
|
41 | 41 | 'en' => 'NOT LIKE', //doesn't end with |
42 | - 'cn' => 'LIKE', //contains |
|
42 | + 'cn' => 'LIKE', //contains |
|
43 | 43 | 'nc' => 'NOT LIKE' //doesn't contain |
44 | 44 | ); |
45 | 45 | |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | */ |
385 | 385 | public static function get_extra_fields_by_handler($handler) |
386 | 386 | { |
387 | - $types= array(); |
|
387 | + $types = array(); |
|
388 | 388 | $types[self::FIELD_TYPE_TEXT] = get_lang('FieldTypeText'); |
389 | 389 | $types[self::FIELD_TYPE_TEXTAREA] = get_lang('FieldTypeTextarea'); |
390 | 390 | $types[self::FIELD_TYPE_RADIO] = get_lang('FieldTypeRadio'); |
@@ -1072,7 +1072,7 @@ discard block |
||
1072 | 1072 | // chzn-select doesn't work for sessions?? |
1073 | 1073 | $form->addElement( |
1074 | 1074 | 'select', |
1075 | - 'extra_' . $field_details['variable'], |
|
1075 | + 'extra_'.$field_details['variable'], |
|
1076 | 1076 | $field_details['display_text'], |
1077 | 1077 | $options, |
1078 | 1078 | array('id' => 'extra_'.$field_details['variable']) |
@@ -1131,7 +1131,7 @@ discard block |
||
1131 | 1131 | |
1132 | 1132 | if (!$admin_permissions) { |
1133 | 1133 | if ($field_details['visible_to_self'] == 0) { |
1134 | - $form->freeze('extra_' . $field_details['variable']); |
|
1134 | + $form->freeze('extra_'.$field_details['variable']); |
|
1135 | 1135 | } |
1136 | 1136 | } |
1137 | 1137 | break; |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | } |
1209 | 1209 | });'; |
1210 | 1210 | |
1211 | - $first_id = null; |
|
1211 | + $first_id = null; |
|
1212 | 1212 | if (!empty($extraData)) { |
1213 | 1213 | if (isset($extraData['extra_'.$field_details['variable']])) { |
1214 | 1214 | $first_id = $extraData['extra_'.$field_details['variable']]['extra_'.$field_details['variable']]; |
@@ -1468,9 +1468,9 @@ discard block |
||
1468 | 1468 | |
1469 | 1469 | if (is_array($extraData) && array_key_exists($fieldVariable, $extraData)) { |
1470 | 1470 | |
1471 | - if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) { |
|
1471 | + if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) { |
|
1472 | 1472 | $fieldTexts[] = Display::img( |
1473 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1473 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1474 | 1474 | $field_details['display_text'], |
1475 | 1475 | ['width' => '300'] |
1476 | 1476 | ); |
@@ -1493,7 +1493,7 @@ discard block |
||
1493 | 1493 | $allowed_picture_types = ['jpg', 'jpeg', 'png', 'gif']; |
1494 | 1494 | $form->addRule( |
1495 | 1495 | 'extra_'.$field_details['variable'], |
1496 | - get_lang('OnlyImagesAllowed') . ' ('.implode(',', $allowed_picture_types).')', |
|
1496 | + get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', |
|
1497 | 1497 | 'filetype', |
1498 | 1498 | $allowed_picture_types |
1499 | 1499 | ); |
@@ -1535,10 +1535,10 @@ discard block |
||
1535 | 1535 | if (is_array($extraData) && |
1536 | 1536 | array_key_exists($fieldVariable, $extraData) |
1537 | 1537 | ) { |
1538 | - if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) { |
|
1538 | + if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) { |
|
1539 | 1539 | $fieldTexts[] = Display::url( |
1540 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1541 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1540 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1541 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1542 | 1542 | array( |
1543 | 1543 | 'title' => $field_details['display_text'], |
1544 | 1544 | 'target' => '_blank' |
@@ -1578,12 +1578,12 @@ discard block |
||
1578 | 1578 | "extra_{$field_details['variable']}", |
1579 | 1579 | $field_details['display_text'] |
1580 | 1580 | ); |
1581 | - $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes'); |
|
1581 | + $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes'); |
|
1582 | 1582 | |
1583 | 1583 | if (!$admin_permissions) { |
1584 | 1584 | if ($field_details['visible_to_self'] == 0) { |
1585 | 1585 | $form->freeze( |
1586 | - 'extra_' . $field_details['variable'] |
|
1586 | + 'extra_'.$field_details['variable'] |
|
1587 | 1587 | ); |
1588 | 1588 | } |
1589 | 1589 | } |
@@ -1594,13 +1594,13 @@ discard block |
||
1594 | 1594 | $field_details['display_text'] |
1595 | 1595 | ); |
1596 | 1596 | $form->applyFilter( |
1597 | - 'extra_' . $field_details['variable'], |
|
1597 | + 'extra_'.$field_details['variable'], |
|
1598 | 1598 | 'stripslashes' |
1599 | 1599 | ); |
1600 | 1600 | if (!$admin_permissions) { |
1601 | 1601 | if ($field_details['visible_to_self'] == 0) { |
1602 | 1602 | $form->freeze( |
1603 | - 'extra_' . $field_details['variable'] |
|
1603 | + 'extra_'.$field_details['variable'] |
|
1604 | 1604 | ); |
1605 | 1605 | } |
1606 | 1606 | } |
@@ -1610,12 +1610,12 @@ discard block |
||
1610 | 1610 | "extra_{$field_details['variable']}", |
1611 | 1611 | $field_details['display_text'] |
1612 | 1612 | ); |
1613 | - $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes'); |
|
1613 | + $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes'); |
|
1614 | 1614 | |
1615 | 1615 | if (!$admin_permissions) { |
1616 | 1616 | if ($field_details['visible_to_self'] == 0) { |
1617 | 1617 | $form->freeze( |
1618 | - 'extra_' . $field_details['variable'] |
|
1618 | + 'extra_'.$field_details['variable'] |
|
1619 | 1619 | ); |
1620 | 1620 | } |
1621 | 1621 | } |
@@ -1626,13 +1626,13 @@ discard block |
||
1626 | 1626 | $field_details['display_text'] |
1627 | 1627 | ); |
1628 | 1628 | $form->applyFilter( |
1629 | - 'extra_' . $field_details['variable'], |
|
1629 | + 'extra_'.$field_details['variable'], |
|
1630 | 1630 | 'stripslashes' |
1631 | 1631 | ); |
1632 | 1632 | if (!$admin_permissions) { |
1633 | 1633 | if ($field_details['visible_to_self'] == 0) { |
1634 | 1634 | $form->freeze( |
1635 | - 'extra_' . $field_details['variable'] |
|
1635 | + 'extra_'.$field_details['variable'] |
|
1636 | 1636 | ); |
1637 | 1637 | } |
1638 | 1638 | } |
@@ -1663,7 +1663,7 @@ discard block |
||
1663 | 1663 | |
1664 | 1664 | if (typeof google === "object") { |
1665 | 1665 | |
1666 | - var address = "' . $dataValue . '"; |
|
1666 | + var address = "' . $dataValue.'"; |
|
1667 | 1667 | initializeGeo'.$field_details['variable'].'(address, false); |
1668 | 1668 | |
1669 | 1669 | $("#geolocalization_extra_'.$field_details['variable'].'").on("click", function() { |
@@ -1685,7 +1685,7 @@ discard block |
||
1685 | 1685 | }); |
1686 | 1686 | |
1687 | 1687 | } else { |
1688 | - $("#map_extra_'.$field_details['variable'].'").html("<div class=\"alert alert-info\">' . get_lang('YouNeedToActivateTheGoogleMapsPluginInAdminPlatformToSeeTheMap') . '</div>"); |
|
1688 | + $("#map_extra_'.$field_details['variable'].'").html("<div class=\"alert alert-info\">'.get_lang('YouNeedToActivateTheGoogleMapsPluginInAdminPlatformToSeeTheMap').'</div>"); |
|
1689 | 1689 | } |
1690 | 1690 | |
1691 | 1691 | }); |
@@ -1700,7 +1700,7 @@ discard block |
||
1700 | 1700 | }; |
1701 | 1701 | |
1702 | 1702 | var geoError = function(error) { |
1703 | - alert("Geocode ' . get_lang('Error') . ': " + error); |
|
1703 | + alert("Geocode ' . get_lang('Error').': " + error); |
|
1704 | 1704 | }; |
1705 | 1705 | |
1706 | 1706 | var geoOptions = { |
@@ -1751,11 +1751,11 @@ discard block |
||
1751 | 1751 | infowindow.open(map_'.$field_details['variable'].', marker); |
1752 | 1752 | }); |
1753 | 1753 | } else { |
1754 | - alert("' . get_lang("NotFound") . '"); |
|
1754 | + alert("' . get_lang("NotFound").'"); |
|
1755 | 1755 | } |
1756 | 1756 | |
1757 | 1757 | } else { |
1758 | - alert("Geocode ' . get_lang('Error') . ': " + status); |
|
1758 | + alert("Geocode ' . get_lang('Error').': " + status); |
|
1759 | 1759 | } |
1760 | 1760 | }); |
1761 | 1761 | } |
@@ -1819,8 +1819,8 @@ discard block |
||
1819 | 1819 | $(document).ready(function() { |
1820 | 1820 | if (typeof google === "object") { |
1821 | 1821 | |
1822 | - var lat = "' . $lat . '"; |
|
1823 | - var lng = "' . $lng . '"; |
|
1822 | + var lat = "' . $lat.'"; |
|
1823 | + var lng = "' . $lng.'"; |
|
1824 | 1824 | var latLng = new google.maps.LatLng(lat, lng); |
1825 | 1825 | initializeGeo'.$field_details['variable'].'(false, latLng); |
1826 | 1826 | |
@@ -1845,7 +1845,7 @@ discard block |
||
1845 | 1845 | } |
1846 | 1846 | }); |
1847 | 1847 | } else { |
1848 | - $("#map_extra_'.$field_details['variable'].'").html("<div class=\"alert alert-info\">' . get_lang('YouNeedToActivateTheGoogleMapsPluginInAdminPlatformToSeeTheMap') . '</div>"); |
|
1848 | + $("#map_extra_'.$field_details['variable'].'").html("<div class=\"alert alert-info\">'.get_lang('YouNeedToActivateTheGoogleMapsPluginInAdminPlatformToSeeTheMap').'</div>"); |
|
1849 | 1849 | } |
1850 | 1850 | |
1851 | 1851 | }); |
@@ -1860,7 +1860,7 @@ discard block |
||
1860 | 1860 | }; |
1861 | 1861 | |
1862 | 1862 | var geoError = function(error) { |
1863 | - alert("Geocode ' . get_lang('Error') . ': " + error); |
|
1863 | + alert("Geocode ' . get_lang('Error').': " + error); |
|
1864 | 1864 | }; |
1865 | 1865 | |
1866 | 1866 | var geoOptions = { |
@@ -1911,11 +1911,11 @@ discard block |
||
1911 | 1911 | infowindow.open(map_'.$field_details['variable'].', marker); |
1912 | 1912 | }); |
1913 | 1913 | } else { |
1914 | - alert("' . get_lang("NotFound") . '"); |
|
1914 | + alert("' . get_lang("NotFound").'"); |
|
1915 | 1915 | } |
1916 | 1916 | |
1917 | 1917 | } else { |
1918 | - alert("Geocode ' . get_lang('Error') . ': " + status); |
|
1918 | + alert("Geocode ' . get_lang('Error').': " + status); |
|
1919 | 1919 | } |
1920 | 1920 | }); |
1921 | 1921 | } |
@@ -2111,7 +2111,7 @@ discard block |
||
2111 | 2111 | $form->addElement('header', $header); |
2112 | 2112 | |
2113 | 2113 | if ($action == 'edit') { |
2114 | - $translateUrl = api_get_path(WEB_CODE_PATH) . 'extrafield/translate.php?' . http_build_query([ |
|
2114 | + $translateUrl = api_get_path(WEB_CODE_PATH).'extrafield/translate.php?'.http_build_query([ |
|
2115 | 2115 | 'extra_field' => $id |
2116 | 2116 | ]); |
2117 | 2117 | $translateButton = Display::toolbarButton(get_lang('TranslateThisTerm'), $translateUrl, 'language', 'link'); |
@@ -2448,7 +2448,7 @@ discard block |
||
2448 | 2448 | foreach ($extra_fields as $extra_info) { |
2449 | 2449 | $extra_field_info = $extra_info['extra_field_info']; |
2450 | 2450 | $inject_joins .= " INNER JOIN $this->table_field_values fv$counter |
2451 | - ON (s." . $this->primaryKey . " = fv$counter." . $this->handler_id . ") "; |
|
2451 | + ON (s.".$this->primaryKey." = fv$counter.".$this->handler_id.") "; |
|
2452 | 2452 | // Add options |
2453 | 2453 | if (isset($extra_field_info['field_type']) && in_array( |
2454 | 2454 | $extra_field_info['field_type'], |
@@ -2461,7 +2461,7 @@ discard block |
||
2461 | 2461 | ) { |
2462 | 2462 | $options['where'] = str_replace( |
2463 | 2463 | $extra_info['field'], |
2464 | - 'fv' . $counter . '.field_id = ' . $extra_info['id'] . ' AND fvo' . $counter . '.option_value', |
|
2464 | + 'fv'.$counter.'.field_id = '.$extra_info['id'].' AND fvo'.$counter.'.option_value', |
|
2465 | 2465 | $options['where'] |
2466 | 2466 | ); |
2467 | 2467 | $inject_joins .= " |
@@ -2476,13 +2476,13 @@ discard block |
||
2476 | 2476 | ) { |
2477 | 2477 | $options['where'] = str_replace( |
2478 | 2478 | $extra_info['field'], |
2479 | - 'tag' . $counter . '.tag ', |
|
2479 | + 'tag'.$counter.'.tag ', |
|
2480 | 2480 | $options['where'] |
2481 | 2481 | ); |
2482 | 2482 | |
2483 | 2483 | $inject_joins .= " |
2484 | 2484 | INNER JOIN $this->table_field_rel_tag tag_rel$counter |
2485 | - ON (tag_rel$counter.field_id = ".$extra_info['id']." AND tag_rel$counter.item_id = s." . $this->primaryKey.") |
|
2485 | + ON (tag_rel$counter.field_id = ".$extra_info['id']." AND tag_rel$counter.item_id = s.".$this->primaryKey.") |
|
2486 | 2486 | INNER JOIN $this->table_field_tag tag$counter |
2487 | 2487 | ON (tag$counter.id = tag_rel$counter.tag_id) |
2488 | 2488 | "; |
@@ -2688,19 +2688,19 @@ discard block |
||
2688 | 2688 | break; |
2689 | 2689 | } |
2690 | 2690 | |
2691 | - if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) { |
|
2691 | + if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) { |
|
2692 | 2692 | break; |
2693 | 2693 | } |
2694 | 2694 | |
2695 | 2695 | $image = Display::img( |
2696 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2696 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2697 | 2697 | $field['display_text'], |
2698 | 2698 | array('width' => '300') |
2699 | 2699 | ); |
2700 | 2700 | |
2701 | 2701 | $displayedValue = Display::url( |
2702 | 2702 | $image, |
2703 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2703 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2704 | 2704 | array('target' => '_blank') |
2705 | 2705 | ); |
2706 | 2706 | break; |
@@ -2709,13 +2709,13 @@ discard block |
||
2709 | 2709 | break; |
2710 | 2710 | } |
2711 | 2711 | |
2712 | - if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) { |
|
2712 | + if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) { |
|
2713 | 2713 | break; |
2714 | 2714 | } |
2715 | 2715 | |
2716 | 2716 | $displayedValue = Display::url( |
2717 | 2717 | get_lang('Download'), |
2718 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2718 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2719 | 2719 | array( |
2720 | 2720 | 'title' => $field['display_text'], |
2721 | 2721 | 'target' => '_blank' |