Passed
Push — 1.10.x ( d9a04b...aeb152 )
by Yannick
123:06 queued 74:04
created
main/admin/course_intro_pdf_import.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,26 +90,26 @@
 block discarded – undo
90 90
 {
91 91
     $baseDir = api_get_path(SYS_ARCHIVE_PATH);
92 92
     $uploadPath = 'pdfimport/';
93
-    $errors = array ();
93
+    $errors = array();
94 94
     if (!is_dir($baseDir.$uploadPath)) {
95 95
         @mkdir($baseDir.$uploadPath);
96 96
     }
97
-    if (!unzip_uploaded_file($_FILES['import_file'], $uploadPath, $baseDir, 1024*1024*1024)) {
97
+    if (!unzip_uploaded_file($_FILES['import_file'], $uploadPath, $baseDir, 1024 * 1024 * 1024)) {
98 98
         error_log('Could not unzip uploaded file in '.__FILE__.', line '.__LINE__);
99 99
         return $errors;
100 100
     }
101 101
     $list = scandir($baseDir.$uploadPath);
102 102
     $i = 0;
103 103
     foreach ($list as $file) {
104
-        if (substr($file,0,1) == '.' or !is_file($baseDir.$uploadPath.$file)) {
104
+        if (substr($file, 0, 1) == '.' or !is_file($baseDir.$uploadPath.$file)) {
105 105
             continue;
106 106
         }
107
-        $parts = preg_split('/_/',$file);
107
+        $parts = preg_split('/_/', $file);
108 108
         $course = api_get_course_info($parts[0]);
109 109
         if (count($course) > 0) {
110 110
             // Build file info because handle_uploaded_document() needs it (name, type, size, tmp_name)
111 111
             $fileSize = filesize($baseDir.$uploadPath.$file);
112
-            $docId = add_document($course, $subDir.'/'.$file, 'file', $fileSize, $parts[1].' '.substr($parts[2],0,-4));
112
+            $docId = add_document($course, $subDir.'/'.$file, 'file', $fileSize, $parts[1].' '.substr($parts[2], 0, -4));
113 113
             if ($docId > 0) {
114 114
                 if (!is_file($baseDir.$uploadPath.$file)) {
115 115
                     error_log($baseDir.$uploadPath.$file.' does not exists in '.__FILE__);
Please login to merge, or discard this patch.
main/admin/user_edit.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 }
69 69
 </script>';
70 70
 
71
-$htmlHeadXtra[] = '<link  href="'. api_get_path(WEB_PATH) .'web/assets/cropper/dist/cropper.min.css" rel="stylesheet">';
72
-$htmlHeadXtra[] = '<script src="'. api_get_path(WEB_PATH) .'web/assets/cropper/dist/cropper.min.js"></script>';
71
+$htmlHeadXtra[] = '<link  href="'.api_get_path(WEB_PATH).'web/assets/cropper/dist/cropper.min.css" rel="stylesheet">';
72
+$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_PATH).'web/assets/cropper/dist/cropper.min.js"></script>';
73 73
 $htmlHeadXtra[] = '<script>
74 74
 $(document).ready(function() {
75 75
     var $image = $("#previewImage");
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 }
194 194
 
195 195
 if (api_get_setting('login_is_email') == 'true') {
196
-    $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
196
+    $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
197 197
     $form->addRule('email', get_lang('UserTaken'), 'username_available', $user_data['username']);
198 198
 }
199 199
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
 // Picture
209 209
 $form->addElement('file', 'picture', get_lang('AddPicture'), array('id' => 'picture', 'class' => 'picture-form'));
210
-$allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif');
210
+$allowed_picture_types = array('jpg', 'jpeg', 'png', 'gif');
211 211
 
212 212
 $form->addHtml(''
213 213
                 . '<div class="form-group">'
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 if (api_get_setting('login_is_email') != 'true') {
239 239
 	$form->addElement('text', 'username', get_lang('LoginName'), array('maxlength' => USERNAME_MAX_LENGTH));
240 240
     $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required');
241
-    $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
241
+    $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
242 242
     $form->addRule('username', get_lang('OnlyLettersAndNumbersAllowed'), 'username');
243 243
     $form->addRule('username', get_lang('UserTaken'), 'username_available', $user_data['username']);
244 244
 }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 }
276 276
 $form->addElement('radio', 'reset_password', null, get_lang('AutoGeneratePassword'), 1);
277 277
 $group = array();
278
-$group[] =$form->createElement('radio', 'reset_password', null, get_lang('EnterPassword'), 2);
278
+$group[] = $form->createElement('radio', 'reset_password', null, get_lang('EnterPassword'), 2);
279 279
 $group[] = $form->createElement(
280 280
     'password',
281 281
     'password',
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
 // Platform admin
310 310
 if (api_is_platform_admin()) {
311 311
 	$group = array();
312
-	$group[] =$form->createElement('radio', 'platform_admin', null, get_lang('Yes'), 1);
313
-	$group[] =$form->createElement('radio', 'platform_admin', null, get_lang('No'), 0);
312
+	$group[] = $form->createElement('radio', 'platform_admin', null, get_lang('Yes'), 1);
313
+	$group[] = $form->createElement('radio', 'platform_admin', null, get_lang('No'), 0);
314 314
 
315
-	$user_data['status'] == 1 ? $display = 'block':$display = 'none';
315
+	$user_data['status'] == 1 ? $display = 'block' : $display = 'none';
316 316
 
317 317
 	$form->addElement('html', '<div id="id_platform_admin" style="display:'.$display.'">');
318 318
 	$form->addGroup($group, 'admin', get_lang('PlatformAdmin'), null, false);
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 if (!$user_data['platform_admin']) {
337 337
 	// Expiration Date
338 338
 	$form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0);
339
-	$group = array ();
339
+	$group = array();
340 340
 	$group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('Enabled'), 1);
341 341
 	$group[] = $form->createElement('DateTimePicker', 'expiration_date', null, array('onchange' => 'javascript: enable_expiration_date();'));
342 342
 	$form->addGroup($group, 'max_member_group', null, '', false);
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 $jquery_ready_content = $returnParams['jquery_ready_content'];
353 353
 
354 354
 // the $jquery_ready_content variable collects all functions that will be load in the $(document).ready javascript function
355
-$htmlHeadXtra[] ='<script>
355
+$htmlHeadXtra[] = '<script>
356 356
 $(document).ready(function(){
357 357
 	'.$jquery_ready_content.'
358 358
 });
Please login to merge, or discard this patch.
main/admin/add_courses_to_usergroup.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 api_protect_admin_script(true);
20 20
 
21 21
 // Setting breadcrumbs.
22
-$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
23
-$interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes'));
22
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
23
+$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
24 24
 
25 25
 // Setting the name of the tool.
26 26
 $tool_name = get_lang('SubscribeClassToCourses');
27 27
 
28 28
 $add_type = 'multiple';
29
-if (isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){
29
+if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
30 30
     $add_type = Security::remove_XSS($_REQUEST['add_type']);
31 31
 }
32 32
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 $searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id);
99 99
 $searchForm->addHeader(get_lang('AdvancedSearch'));
100
-$renderer =& $searchForm->defaultRenderer();
100
+$renderer = & $searchForm->defaultRenderer();
101 101
 $searchForm->addElement('hidden', 'id', $id);
102 102
 foreach ($filters as $param) {
103 103
     $searchForm->addElement($param['type'], $param['name'], $param['label']);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 //checking for extra field with filter on
143 143
 
144
-function search($needle,$type)
144
+function search($needle, $type)
145 145
 {
146 146
     global $elements_in;
147 147
     $xajax_response = new xajaxResponse();
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         } else {
152 152
             $list = CourseManager::get_courses_list(0, 0, 2, 'ASC', -1, $needle);
153 153
         }
154
-        if ($type=='single') {
154
+        if ($type == 'single') {
155 155
         } else {
156 156
             $return .= '<select id="elements_not_in" name="elements_not_in_name[]" multiple="multiple" size="15" style="width:360px;">';
157 157
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 }
183 183
 
184 184
 echo '<div class="actions">';
185
-echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>';
185
+echo '<a href="usergroups.php">'.Display::return_icon('back.png', get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>';
186 186
 echo Display::url(get_lang('AdvancedSearch'), '#', array('class' => 'advanced_options', 'id' => 'advanced_search'));
187 187
 echo '</div>';
188 188
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
 ?>
194 194
 
195
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
195
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
196 196
 
197 197
 <?php echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
198 198
 echo Display::input('hidden', 'id', $id);
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
   <td align="center"><b><?php echo get_lang('CoursesInGroup') ?> :</b></td>
212 212
 </tr>
213 213
 
214
-<?php if ($add_type=='multiple') { ?>
214
+<?php if ($add_type == 'multiple') { ?>
215 215
 <tr>
216 216
 <td align="center">
217 217
 <?php echo get_lang('FirstLetterCourseTitle'); ?> :
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
   <td align="center">
230 230
   <div id="content_source">
231 231
       <?php
232
-      if (!($add_type=='multiple')) {
232
+      if (!($add_type == 'multiple')) {
233 233
         ?>
234 234
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
235 235
         <div id="ajax_list_users_single"></div>
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
       } else {
238 238
       ?>
239 239
       <div id="ajax_list_multiple">
240
-        <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?>
240
+        <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?>
241 241
       </div>
242 242
     <?php
243 243
       }
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
   </td>
269 269
   <td align="center">
270 270
 <?php
271
-    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false );
271
+    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), false);
272 272
     unset($sessionUsersList);
273 273
 ?>
274 274
  </td>
Please login to merge, or discard this patch.
main/admin/user_export.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
 
23 23
 set_time_limit(0);
24 24
 
25
-$courses = array ();
25
+$courses = array();
26 26
 $courses[''] = '--';
27 27
 $sql = "SELECT code,visual_code,title FROM $course_table ORDER BY visual_code";
28 28
 
29 29
 global $_configuration;
30 30
 
31 31
 if (api_is_multiple_url_enabled()) {
32
-	$tbl_course_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
32
+	$tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
33 33
 	$access_url_id = api_get_current_access_url_id();
34
-	if ($access_url_id != -1){
34
+	if ($access_url_id != -1) {
35 35
 	$sql = "SELECT code,visual_code,title
36 36
 		FROM $course_table as c
37 37
 		INNER JOIN $tbl_course_rel_access_url as course_rel_url
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 }
47 47
 $form = new FormValidator('export_users');
48 48
 $form->addElement('header', $tool_name);
49
-$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML','xml');
49
+$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML', 'xml');
50 50
 $form->addElement('radio', 'file_type', null, 'CSV', 'csv');
51 51
 $form->addElement('radio', 'file_type', null, 'XLS', 'xls');
52 52
 
53
-$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'),'1');
53
+$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'), '1');
54 54
 $form->addElement('select', 'course_code', get_lang('OnlyUsersFromCourse'), $courses);
55 55
 $form->addButtonExport(get_lang('Export'));
56 56
 $form->setDefaults(array('file_type' => 'csv'));
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 				u.firstname 	AS FirstName,
69 69
 				u.email 		AS Email,
70 70
 				u.username	AS UserName,
71
-				".(($_configuration['password_encryption']!='none')?" ":"u.password AS Password, ")."
71
+				".(($_configuration['password_encryption'] != 'none') ? " " : "u.password AS Password, ")."
72 72
 				u.auth_source	AS AuthSource,
73 73
 				u.status		AS Status,
74 74
 				u.official_code	AS OfficialCode,
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 		$filename = 'export_users_'.$course_code.'_'.api_get_local_time();
84 84
 	} else {
85 85
 		if (api_is_multiple_url_enabled()) {
86
-			$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
86
+			$tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
87 87
 			$access_url_id = api_get_current_access_url_id();
88 88
 			if ($access_url_id != -1) {
89
-			$sql.= " FROM $user_table u
89
+			$sql .= " FROM $user_table u
90 90
 					INNER JOIN $tbl_user_rel_access_url as user_rel_url
91 91
 				ON (u.user_id= user_rel_url.user_id)
92 92
 				WHERE access_url_id = $access_url_id
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		$filename = 'export_users_'.api_get_local_time();
99 99
 	}
100 100
 	$data = array();
101
-	$extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC',false);
102
-	if ($export['addcsvheader']=='1' AND $export['file_type']=='csv') {
101
+	$extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC', false);
102
+	if ($export['addcsvheader'] == '1' AND $export['file_type'] == 'csv') {
103 103
 		if ($_configuration['password_encryption'] != 'none') {
104 104
 			$data[] = array(
105 105
 				'UserId',
@@ -127,19 +127,19 @@  discard block
 block discarded – undo
127 127
 			);
128 128
 		}
129 129
 
130
-		foreach($extra_fields as $extra) {
131
-			$data[0][]=$extra[1];
130
+		foreach ($extra_fields as $extra) {
131
+			$data[0][] = $extra[1];
132 132
 		}
133 133
 	}
134 134
 
135 135
 	$res = Database::query($sql);
136
-	while($user = Database::fetch_array($res,'ASSOC')) {
136
+	while ($user = Database::fetch_array($res, 'ASSOC')) {
137 137
 		$student_data = UserManager:: get_extra_user_data(
138 138
 			$user['UserId'],
139 139
 			true,
140 140
 			false
141 141
 		);
142
-		foreach($student_data as $key=>$value) {
142
+		foreach ($student_data as $key=>$value) {
143 143
 			$key = substr($key, 6);
144 144
 			if (is_array($value)) {
145 145
 				$user[$key] = $value[$key];
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 				$user[$key] = $value;
148 148
 			}
149 149
 		}
150
-		$data[] = $user	;
150
+		$data[] = $user;
151 151
 	}
152 152
 
153 153
 	switch ($file_type) {
Please login to merge, or discard this patch.
main/admin/user_information.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     api_not_allowed();
22 22
 }
23 23
 $user = api_get_user_info($_GET['user_id'], true);
24
-$tool_name = $user['complete_name'].(empty($user['official_code'])?'':' ('.$user['official_code'].')');
24
+$tool_name = $user['complete_name'].(empty($user['official_code']) ? '' : ' ('.$user['official_code'].')');
25 25
 $table_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
26 26
 $table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
27 27
 
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
 
48 48
     $exportLink = Display::url(
49 49
         Display::return_icon(
50
-            'export_csv.png', get_lang('ExportAsCSV'),'', ICON_SIZE_MEDIUM
50
+            'export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM
51 51
         ),
52 52
         api_get_self().'?user_id='.$user['user_id'].'&action=export'
53 53
     );
54 54
     $vCardExportLink = Display::url(
55 55
         Display::return_icon(
56
-            'vcard.png', get_lang('UserInfo'),'', ICON_SIZE_MEDIUM
56
+            'vcard.png', get_lang('UserInfo'), '', ICON_SIZE_MEDIUM
57 57
         ),
58 58
         api_get_path(WEB_PATH).'main/social/vcard_export.php?userId='.$user['user_id']
59 59
     );
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         $tools = '<a href="course_information.php?code='.$courseCode.'">'.
294 294
             Display::return_icon('synthese_view.gif', get_lang('Overview')).'</a>'.
295 295
             '<a href="'.$courseInfo['course_public_url'].'">'.
296
-            Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>' .
296
+            Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>'.
297 297
             '<a href="course_edit.php?id='.$course->c_id.'">'.
298 298
             Display::return_icon('edit.gif', get_lang('Edit')).'</a>';
299 299
         if ($course->status == STUDENT) {
Please login to merge, or discard this patch.
main/admin/course_export.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 api_protect_admin_script();
15 15
 
16 16
 $tool_name = get_lang('ExportCourses');
17
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
17
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
18 18
 
19 19
 set_time_limit(0);
20 20
 
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
 
63 63
         $dataToExport = [];
64 64
         foreach ($courses as $course) {
65
-            $dataToExport['code'] = str_replace(';',',',$course['code']);
66
-            $dataToExport['title'] = str_replace(';',',',$course['title']);
67
-            $dataToExport['category_code'] = str_replace(';',',',$course['category_code']);
68
-            $dataToExport['tutor_name'] = str_replace(';',',',$course['tutor_name']);
69
-            $dataToExport['course_language'] = str_replace(';',',',$course['course_language']);
65
+            $dataToExport['code'] = str_replace(';', ',', $course['code']);
66
+            $dataToExport['title'] = str_replace(';', ',', $course['title']);
67
+            $dataToExport['category_code'] = str_replace(';', ',', $course['category_code']);
68
+            $dataToExport['tutor_name'] = str_replace(';', ',', $course['tutor_name']);
69
+            $dataToExport['course_language'] = str_replace(';', ',', $course['course_language']);
70 70
 
71 71
             $dataToExport['students'] = '';
72 72
             $dataToExport['teachers'] = '';
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 	$form->addHtml('</div>');
149 149
 }
150 150
 
151
-$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null);
152
-$form->addElement('radio', 'file_type', '' , 'XLS' , 'xls', null);
151
+$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV', 'csv', null);
152
+$form->addElement('radio', 'file_type', '', 'XLS', 'xls', null);
153 153
 $form->addElement('radio', 'file_type', null, 'XML', 'xml', null, array('id' => 'file_type_xml'));
154 154
 
155 155
 $form->setDefaults(['select_type' => '1', 'file_type' => 'csv']);
Please login to merge, or discard this patch.
main/admin/ldap_form_add_users_group.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 /**
10 10
  * This form is included by ldap_import_students.php and ldap_import_students_to_session.php
11 11
  */
12
-$nbre=0;
12
+$nbre = 0;
13 13
 echo '<form name="form" method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'">';
14
-	if($statut==1)
14
+	if ($statut == 1)
15 15
 	{
16 16
 		echo get_lang('EmailNotifySubscription').': <input type="checkbox" name="mailling" value="1" checked="checked"><i>'.get_lang('DontUnchek').'</i>';
17 17
 	}
@@ -19,30 +19,30 @@  discard block
 block discarded – undo
19 19
 	{
20 20
 		echo '<input type="hidden" name="mailling" value="1">';
21 21
 	}
22
-if(!empty($course))
22
+if (!empty($course))
23 23
 {
24 24
 	echo '<input type="hidden" name="course" value="'.Security::remove_XSS($course).'">';
25 25
 }
26
-elseif(!empty($id_session))
26
+elseif (!empty($id_session))
27 27
 {
28 28
 	echo '<input type="hidden" name="id_session" value="'.Security::remove_XSS($id_session).'">';
29 29
 }
30 30
 $is_western_name_order = api_is_western_name_order();
31 31
 echo '<input type="hidden" name="confirmed" value="yes">';
32 32
 echo '<table border="0" cellspacing="0" width="100%">';
33
-echo '<tr align="center" id="header3">' .
34
-		'<td width="15%"><input type="button" value="'.get_lang('AllSlashNone').'" onClick="checkAll();"></td>' .
35
-		'<td width="40%"><b>'.get_lang('Email').'</b></td>' .
33
+echo '<tr align="center" id="header3">'.
34
+		'<td width="15%"><input type="button" value="'.get_lang('AllSlashNone').'" onClick="checkAll();"></td>'.
35
+		'<td width="40%"><b>'.get_lang('Email').'</b></td>'.
36 36
 		($is_western_name_order
37
-			? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>' .
37
+			? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>'.
38 38
 			'<td width="15%"><b>'.get_lang('Name').'</b></td>'
39
-			: '<td width="15%"><b>'.get_lang('Name').'</b></td>' .
40
-			'<td width="15%"><b>'.get_lang('FirstName').'</b></td>') .
41
-		'<td width="15%"><b>'.get_lang('Login').'</b></td>' .
39
+			: '<td width="15%"><b>'.get_lang('Name').'</b></td>'.
40
+			'<td width="15%"><b>'.get_lang('FirstName').'</b></td>').
41
+		'<td width="15%"><b>'.get_lang('Login').'</b></td>'.
42 42
 	  '</tr>'."\n";
43 43
 while (list ($key, $val) = each($nom_form)) {
44
-	$nbre=$nbre+1;
45
-	if($nbre & 1) $ndiv=2; else $ndiv=3;
44
+	$nbre = $nbre + 1;
45
+	if ($nbre & 1) $ndiv = 2; else $ndiv = 3;
46 46
 	echo '<tr align="center" id="header'.$ndiv.'">';
47 47
 	echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
48 48
 	echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
Please login to merge, or discard this patch.
main/admin/skill_list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 }
21 21
 
22 22
 $action = isset($_GET['action']) ? $_GET['action'] : 'list';
23
-$skillId = isset($_GET['id']) ? intval($_GET['id']): 0;
23
+$skillId = isset($_GET['id']) ? intval($_GET['id']) : 0;
24 24
 
25 25
 $entityManager = Database::getManager();
26 26
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             );
56 56
         }
57 57
 
58
-        header('Location: ' . api_get_self());
58
+        header('Location: '.api_get_self());
59 59
         exit;
60 60
         break;
61 61
     case 'disable':
@@ -108,33 +108,33 @@  discard block
 block discarded – undo
108 108
             );
109 109
         }
110 110
 
111
-        header('Location: ' . api_get_self());
111
+        header('Location: '.api_get_self());
112 112
         exit;
113 113
         break;
114 114
     case 'list':
115 115
         //no break
116 116
     default:
117
-        $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
117
+        $interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
118 118
 
119 119
         $message = Session::has('message') ? Session::read('message') : null;
120 120
 
121 121
         $toolbar = Display::toolbarButton(
122 122
             get_lang('CreateSkill'),
123
-            api_get_path(WEB_CODE_PATH) . 'admin/skill_create.php',
123
+            api_get_path(WEB_CODE_PATH).'admin/skill_create.php',
124 124
             'plus',
125 125
             'success',
126 126
             ['title' => get_lang('CreateSkill')]
127 127
         );
128 128
         $toolbar .= Display::toolbarButton(
129 129
             get_lang('SkillsWheel'),
130
-            api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php',
130
+            api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php',
131 131
             'bullseye',
132 132
             'primary',
133 133
             ['title' => get_lang('CreateSkill')]
134 134
         );
135 135
         $toolbar .= Display::toolbarButton(
136 136
             get_lang('BadgesManagement'),
137
-            api_get_path(WEB_CODE_PATH) . 'admin/skill_badge_list.php',
137
+            api_get_path(WEB_CODE_PATH).'admin/skill_badge_list.php',
138 138
             'shield',
139 139
             'warning',
140 140
             ['title' => get_lang('BadgesManagement')]
Please login to merge, or discard this patch.
main/admin/inactive_user_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
 Display :: display_header($tool_name, "");
25 25
 
26 26
 //On sélectionne les user élèves
27
-$sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname " ;
27
+$sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname ";
28 28
 $result = Database::query($sql);
29 29
 
30
-while($row = Database::fetch_array($result)) {
30
+while ($row = Database::fetch_array($result)) {
31 31
     $user_id = $row['user_id'];
32 32
     //  pour chaque élève, on trouve la dernière connexion
33 33
     //$last_connection_date = UserManager:: delete_inactive_student($user_id, 2, true);
Please login to merge, or discard this patch.