@@ -5,6 +5,6 @@ |
||
5 | 5 | * @author Imanol Losada Oriol <[email protected]> |
6 | 6 | * @package chamilo.plugin.skype |
7 | 7 | */ |
8 | -require_once __DIR__ . '/config.php'; |
|
8 | +require_once __DIR__.'/config.php'; |
|
9 | 9 | |
10 | 10 | Skype::create()->install(); |
@@ -5,6 +5,6 @@ |
||
5 | 5 | * @author Imanol Losada Oriol <[email protected]> |
6 | 6 | * @package chamilo.plugin.skype |
7 | 7 | */ |
8 | -require_once __DIR__ . '/config.php'; |
|
8 | +require_once __DIR__.'/config.php'; |
|
9 | 9 | |
10 | 10 | Skype::create()->install(); |
@@ -5,6 +5,6 @@ |
||
5 | 5 | * @author Imanol Losada Oriol <[email protected]> |
6 | 6 | * @package chamilo.plugin.skype |
7 | 7 | */ |
8 | -require_once __DIR__ . '/config.php'; |
|
8 | +require_once __DIR__.'/config.php'; |
|
9 | 9 | |
10 | 10 | Skype::create()->install(); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | if ($geolocalization) { |
75 | 75 | $gmapsApiKey = $gMapsPlugin->get('api_key'); |
76 | - $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='. $gmapsApiKey . '" ></script>'; |
|
76 | + $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='.$gmapsApiKey.'" ></script>'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | $htmlHeadXtra[] = api_get_css_asset('cropper/dist/cropper.min.css'); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | if (api_get_setting('login_is_email') == 'true') { |
156 | - $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
156 | + $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
157 | 157 | $form->addRule('email', get_lang('UserTaken'), 'username_available', $user_data['username']); |
158 | 158 | } |
159 | 159 | |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | if (api_get_setting('login_is_email') != 'true') { |
188 | 188 | $form->addElement('text', 'username', get_lang('LoginName'), array('maxlength' => USERNAME_MAX_LENGTH)); |
189 | 189 | $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required'); |
190 | - $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
190 | + $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
191 | 191 | $form->addRule('username', get_lang('OnlyLettersAndNumbersAllowed'), 'username'); |
192 | 192 | $form->addRule('username', get_lang('UserTaken'), 'username_available', $user_data['username']); |
193 | 193 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | } |
225 | 225 | $form->addElement('radio', 'reset_password', null, get_lang('AutoGeneratePassword'), 1); |
226 | 226 | $group = array(); |
227 | -$group[] =$form->createElement('radio', 'reset_password', null, get_lang('EnterPassword'), 2); |
|
227 | +$group[] = $form->createElement('radio', 'reset_password', null, get_lang('EnterPassword'), 2); |
|
228 | 228 | $group[] = $form->createElement( |
229 | 229 | 'password', |
230 | 230 | 'password', |
@@ -258,10 +258,10 @@ discard block |
||
258 | 258 | // Platform admin |
259 | 259 | if (api_is_platform_admin()) { |
260 | 260 | $group = array(); |
261 | - $group[] =$form->createElement('radio', 'platform_admin', null, get_lang('Yes'), 1); |
|
262 | - $group[] =$form->createElement('radio', 'platform_admin', null, get_lang('No'), 0); |
|
261 | + $group[] = $form->createElement('radio', 'platform_admin', null, get_lang('Yes'), 1); |
|
262 | + $group[] = $form->createElement('radio', 'platform_admin', null, get_lang('No'), 0); |
|
263 | 263 | |
264 | - $user_data['status'] == 1 ? $display = 'block':$display = 'none'; |
|
264 | + $user_data['status'] == 1 ? $display = 'block' : $display = 'none'; |
|
265 | 265 | |
266 | 266 | $form->addElement('html', '<div id="id_platform_admin" style="display:'.$display.'">'); |
267 | 267 | $form->addGroup($group, 'admin', get_lang('PlatformAdmin'), null, false); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | if (!$user_data['platform_admin']) { |
286 | 286 | // Expiration Date |
287 | 287 | $form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0); |
288 | - $group = array (); |
|
288 | + $group = array(); |
|
289 | 289 | $group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('Enabled'), 1); |
290 | 290 | $group[] = $form->createElement('DateTimePicker', 'expiration_date', null, array('onchange' => 'javascript: enable_expiration_date();')); |
291 | 291 | $form->addGroup($group, 'max_member_group', null, null, false); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | if ($studentBoss) { |
304 | 304 | foreach ($studentBoss as $bossId => $userData) { |
305 | 305 | $bossInfo = api_get_user_info($userData['user_id']); |
306 | - $studentBossToSelect[$bossInfo['user_id']] = $bossInfo['complete_name_with_username']; |
|
306 | + $studentBossToSelect[$bossInfo['user_id']] = $bossInfo['complete_name_with_username']; |
|
307 | 307 | } |
308 | 308 | } |
309 | 309 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $jquery_ready_content = $returnParams['jquery_ready_content']; |
321 | 321 | |
322 | 322 | // the $jquery_ready_content variable collects all functions that will be load in the $(document).ready javascript function |
323 | -$htmlHeadXtra[] ='<script> |
|
323 | +$htmlHeadXtra[] = '<script> |
|
324 | 324 | $(document).ready(function(){ |
325 | 325 | '.$jquery_ready_content.' |
326 | 326 | }); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | if ($geolocalization) { |
35 | 35 | $gmapsApiKey = $gMapsPlugin->get('api_key'); |
36 | - $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='. $gmapsApiKey . '" ></script>'; |
|
36 | + $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='.$gmapsApiKey.'" ></script>'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | $htmlHeadXtra[] = api_get_password_checker_js('#username', '#password1'); |
@@ -119,10 +119,10 @@ discard block |
||
119 | 119 | if (api_is_western_name_order()) { |
120 | 120 | // FIRST NAME and LAST NAME |
121 | 121 | $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40)); |
122 | - $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40)); |
|
122 | + $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40)); |
|
123 | 123 | } else { |
124 | 124 | // LAST NAME and FIRST NAME |
125 | - $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40)); |
|
125 | + $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40)); |
|
126 | 126 | $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40)); |
127 | 127 | } |
128 | 128 | if (api_get_setting('profile', 'name') !== 'true') { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $form->applyFilter(array('lastname', 'firstname'), 'stripslashes'); |
132 | 132 | $form->applyFilter(array('lastname', 'firstname'), 'trim'); |
133 | 133 | $form->applyFilter(array('lastname', 'firstname'), 'html_filter'); |
134 | -$form->addRule('lastname' , get_lang('ThisFieldIsRequired'), 'required'); |
|
134 | +$form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required'); |
|
135 | 135 | $form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required'); |
136 | 136 | |
137 | 137 | // USERNAME |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $form->freeze('email'); |
177 | 177 | } |
178 | 178 | |
179 | -if (api_get_setting('registration', 'email') == 'true' && api_get_setting('profile', 'email') == 'true') { |
|
179 | +if (api_get_setting('registration', 'email') == 'true' && api_get_setting('profile', 'email') == 'true') { |
|
180 | 180 | $form->applyFilter('email', 'stripslashes'); |
181 | 181 | $form->applyFilter('email', 'trim'); |
182 | 182 | $form->addRule('email', get_lang('ThisFieldIsRequired'), 'required'); |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | |
329 | 329 | // the $jquery_ready_content variable collects all functions that |
330 | 330 | // will be load in the $(document).ready javascript function |
331 | -$htmlHeadXtra[] ='<script> |
|
331 | +$htmlHeadXtra[] = '<script> |
|
332 | 332 | $(document).ready(function(){ |
333 | 333 | '.$jquery_ready_content.' |
334 | 334 | }); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | if ($geolocalization) { |
37 | 37 | $gmapsApiKey = $gMapsPlugin->get('api_key'); |
38 | - $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='. $gmapsApiKey . '" ></script>'; |
|
38 | + $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='.$gmapsApiKey.'" ></script>'; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $htmlHeadXtra[] = api_get_password_checker_js('#username', '#pass1'); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | if (api_get_setting('registration', 'email') != 'true') { |
97 | 97 | $form->addRule('email', get_lang('ThisFieldIsRequired'), 'required'); |
98 | 98 | } |
99 | - $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
99 | + $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
100 | 100 | $form->addRule('email', get_lang('UserTaken'), 'username_available'); |
101 | 101 | } |
102 | 102 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ); |
138 | 138 | $form->applyFilter('username', 'trim'); |
139 | 139 | $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required'); |
140 | - $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
140 | + $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
141 | 141 | $form->addRule('username', get_lang('UsernameWrong'), 'username'); |
142 | 142 | $form->addRule('username', get_lang('UserTaken'), 'username_available'); |
143 | 143 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if (CHECK_PASS_EASY_TO_FIND) { |
169 | 169 | $form->addRule( |
170 | 170 | 'pass1', |
171 | - get_lang('PassTooEasy') . ': ' . api_generate_password(), |
|
171 | + get_lang('PassTooEasy').': '.api_generate_password(), |
|
172 | 172 | 'callback', |
173 | 173 | 'api_check_password' |
174 | 174 | ); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | ) |
241 | 241 | ); |
242 | 242 | |
243 | - $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options); |
|
243 | + $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options); |
|
244 | 244 | $form->addElement('static', null, null, get_lang('ClickOnTheImageForANewOne')); |
245 | 245 | |
246 | 246 | $form->addElement('text', 'captcha', get_lang('EnterTheLettersYouSee'), array('size' => 40)); |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | } |
384 | 384 | } |
385 | 385 | |
386 | - $tool_name = get_lang('Registration', null, (!empty($_POST['language'])?$_POST['language']: $_user['language'])); |
|
386 | + $tool_name = get_lang('Registration', null, (!empty($_POST['language']) ? $_POST['language'] : $_user['language'])); |
|
387 | 387 | |
388 | 388 | if (api_get_setting('allow_terms_conditions') === 'true' && $user_already_registered_show_terms) { |
389 | 389 | $tool_name = get_lang('TermsAndConditions'); |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | |
406 | 406 | if (file_exists($home.'register_top_'.$user_selected_language.'.html')) { |
407 | - $home_top_temp = @(string)file_get_contents($home.'register_top_'.$user_selected_language.'.html'); |
|
407 | + $home_top_temp = @(string) file_get_contents($home.'register_top_'.$user_selected_language.'.html'); |
|
408 | 408 | $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
409 | 409 | $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
410 | 410 | if (!empty($open)) { |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | if (api_get_setting('show_terms_if_profile_completed') === 'true') { |
435 | 435 | $userInfo = api_get_user_info(); |
436 | 436 | if ($userInfo && $userInfo['status'] != ANONYMOUS) { |
437 | - if ((int)$userInfo['profile_completed'] !== 1) { |
|
437 | + if ((int) $userInfo['profile_completed'] !== 1) { |
|
438 | 438 | api_not_allowed(true); |
439 | 439 | } |
440 | 440 | } |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | Database::query($sql); |
648 | 648 | |
649 | 649 | // 2. Send mail to all platform admin |
650 | - $emailsubject = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username']; |
|
650 | + $emailsubject = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username']; |
|
651 | 651 | $emailbody = get_lang('ApprovalForNewAccount', null, $values['language'])."\n"; |
652 | 652 | $emailbody .= get_lang('UserName', null, $values['language']).': '.$values['username']."\n"; |
653 | 653 | |
@@ -787,14 +787,14 @@ discard block |
||
787 | 787 | } |
788 | 788 | } else { |
789 | 789 | if (!empty($values['email'])) { |
790 | - $text_after_registration.= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>'; |
|
790 | + $text_after_registration .= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>'; |
|
791 | 791 | } |
792 | 792 | |
793 | 793 | if ($is_allowedCreateCourse) { |
794 | 794 | if ($usersCanCreateCourse) { |
795 | - $form_data['message'] = '<p>'. get_lang('NowGoCreateYourCourse', null, $_user['language']). "</p>"; |
|
795 | + $form_data['message'] = '<p>'.get_lang('NowGoCreateYourCourse', null, $_user['language'])."</p>"; |
|
796 | 796 | } |
797 | - $form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php'; |
|
797 | + $form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php'; |
|
798 | 798 | |
799 | 799 | if (api_get_setting('course_validation') === 'true') { |
800 | 800 | $form_data['button'] = Display::button( |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | } else { |
818 | 818 | if (api_get_setting('allow_students_to_browse_courses') == 'true') { |
819 | 819 | $form_data['action'] = 'courses.php?action=subscribe'; |
820 | - $form_data['message'] = '<p>'. get_lang('NowGoChooseYourCourses', null, $_user['language']). ".</p>"; |
|
820 | + $form_data['message'] = '<p>'.get_lang('NowGoChooseYourCourses', null, $_user['language']).".</p>"; |
|
821 | 821 | } else { |
822 | 822 | $form_data['action'] = api_get_path(WEB_PATH).'user_portal.php'; |
823 | 823 | } |