Completed
Push — 1.11.x ( 566ea6...b264ab )
by José
110:20 queued 69:00
created
main/admin/course_export.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $courses = $course_list;
47 47
     }
48 48
 
49
-	if (!empty($courses)) {
49
+    if (!empty($courses)) {
50 50
 
51 51
         $archiveFile = 'export_courses_list_'.api_get_local_time();
52 52
 
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
                 Export::arrayToXls($listToExport, $archiveFile);
99 99
                 break;
100 100
         }
101
-	} else {
101
+    } else {
102 102
         Display::addFlash(
103 103
             Display::return_message(
104 104
                 get_lang('ThereAreNotSelectedCoursesOrCoursesListIsEmpty')
105 105
             )
106 106
         );
107
-	}
107
+    }
108 108
 }
109 109
 
110 110
 
@@ -114,29 +114,29 @@  discard block
 block discarded – undo
114 114
 $form->addHeader($tool_name);
115 115
 $form->addHidden('formSent', 1);
116 116
 $form->addElement(
117
-	'radio',
118
-	'select_type',
119
-	get_lang('Option'),
120
-	get_lang('ExportAllCoursesList'),
121
-	 '1',
122
-	 ['onclick' => "javascript: if(this.checked){document.getElementById('div-course-list').style.display='none';}"]
117
+    'radio',
118
+    'select_type',
119
+    get_lang('Option'),
120
+    get_lang('ExportAllCoursesList'),
121
+        '1',
122
+        ['onclick' => "javascript: if(this.checked){document.getElementById('div-course-list').style.display='none';}"]
123 123
 );
124 124
 
125 125
 $form->addElement(
126
-	'radio',
127
-	'select_type',
128
-	'',
129
-	get_lang('ExportSelectedCoursesFromCoursesList'),
130
-	'2',
131
-	['onclick' => "javascript: if(this.checked){document.getElementById('div-course-list').style.display='block';}"]
126
+    'radio',
127
+    'select_type',
128
+    '',
129
+    get_lang('ExportSelectedCoursesFromCoursesList'),
130
+    '2',
131
+    ['onclick' => "javascript: if(this.checked){document.getElementById('div-course-list').style.display='block';}"]
132 132
 );
133 133
 
134 134
 if (!empty($course_list)) {
135
-	$form->addHtml('<div id="div-course-list" style="display:none">');
136
-	$coursesInList = [];
137
-	foreach ($course_list as $course) {
138
-		$coursesInList[$course['code']] = $course['title'].' ('.$course['code'].')';
139
-	}
135
+    $form->addHtml('<div id="div-course-list" style="display:none">');
136
+    $coursesInList = [];
137
+    foreach ($course_list as $course) {
138
+        $coursesInList[$course['code']] = $course['title'].' ('.$course['code'].')';
139
+    }
140 140
 
141 141
     $form->addSelect(
142 142
         'course_code',
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         ['multiple' => 'multiple']
146 146
     );
147 147
 
148
-	$form->addHtml('</div>');
148
+    $form->addHtml('</div>');
149 149
 }
150 150
 
151 151
 $form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null);
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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
 
@@ -64,17 +64,17 @@  discard block
 block discarded – undo
64 64
         $dataToExport = [];
65 65
 
66 66
         foreach ($courses as $course) {
67
-            $dataToExport['code'] = str_replace(';',',',$course['code']);
68
-            $dataToExport['title'] = str_replace(';',',',$course['title']);
69
-            $dataToExport['category_code'] = str_replace(';',',',$course['category_code']);
67
+            $dataToExport['code'] = str_replace(';', ',', $course['code']);
68
+            $dataToExport['title'] = str_replace(';', ',', $course['title']);
69
+            $dataToExport['category_code'] = str_replace(';', ',', $course['category_code']);
70 70
             $categoryInfo = CourseCategory::getCategory($course['category_code']);
71 71
             if ($categoryInfo) {
72
-                $dataToExport['category_name'] = str_replace(';',',',$categoryInfo['name']);
72
+                $dataToExport['category_name'] = str_replace(';', ',', $categoryInfo['name']);
73 73
             } else {
74 74
                 $dataToExport['category_name'] = '';
75 75
             }
76
-            $dataToExport['tutor_name'] = str_replace(';',',',$course['tutor_name']);
77
-            $dataToExport['course_language'] = str_replace(';',',',$course['course_language']);
76
+            $dataToExport['tutor_name'] = str_replace(';', ',', $course['tutor_name']);
77
+            $dataToExport['course_language'] = str_replace(';', ',', $course['course_language']);
78 78
 
79 79
             $dataToExport['students'] = '';
80 80
             $dataToExport['teachers'] = '';
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
 	$form->addHtml('</div>');
157 157
 }
158 158
 
159
-$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null);
160
-$form->addElement('radio', 'file_type', '' , 'XLS' , 'xls', null);
159
+$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV', 'csv', null);
160
+$form->addElement('radio', 'file_type', '', 'XLS', 'xls', null);
161 161
 $form->addElement('radio', 'file_type', null, 'XML', 'xml', null, array('id' => 'file_type_xml'));
162 162
 
163 163
 $form->setDefaults(['select_type' => '1', 'file_type' => 'csv']);
Please login to merge, or discard this patch.
main/admin/ldap_form_add_users_group.php 3 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -11,58 +11,58 @@
 block discarded – undo
11 11
  */
12 12
 $nbre=0;
13 13
 echo '<form name="form" method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'">';
14
-	if($statut==1)
15
-	{
16
-		echo get_lang('EmailNotifySubscription').': <input type="checkbox" name="mailling" value="1" checked="checked"><i>'.get_lang('DontUnchek').'</i>';
17
-	}
18
-	else
19
-	{
20
-		echo '<input type="hidden" name="mailling" value="1">';
21
-	}
14
+    if($statut==1)
15
+    {
16
+        echo get_lang('EmailNotifySubscription').': <input type="checkbox" name="mailling" value="1" checked="checked"><i>'.get_lang('DontUnchek').'</i>';
17
+    }
18
+    else
19
+    {
20
+        echo '<input type="hidden" name="mailling" value="1">';
21
+    }
22 22
 if(!empty($course))
23 23
 {
24
-	echo '<input type="hidden" name="course" value="'.Security::remove_XSS($course).'">';
24
+    echo '<input type="hidden" name="course" value="'.Security::remove_XSS($course).'">';
25 25
 }
26 26
 elseif(!empty($id_session))
27 27
 {
28
-	echo '<input type="hidden" name="id_session" value="'.Security::remove_XSS($id_session).'">';
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 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
-		($is_western_name_order
37
-			? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>' .
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>' .
42
-	  '</tr>'."\n";
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
+        ($is_western_name_order
37
+            ? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>' .
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>' .
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;
46
-	echo '<tr align="center" id="header'.$ndiv.'">';
47
-	echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
48
-	echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
49
-	if ($is_western_name_order)
50
-	{
51
-		echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
52
-		echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
53
-	}
54
-	else
55
-	{
56
-		echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
57
-		echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
58
-	}
59
-	echo '<td>'.$username_form[$key].'<input type="hidden" name="username_form['.$key.']" size="10" value="'.$username_form[$key].'">';
60
-	echo '<input type="hidden" name="tutor_form['.$key.']" value="0">';
61
-	echo '<input type="hidden" name="admin_form['.$key.']" value="1">';
62
-	echo '<input type="hidden" name="password_form['.$key.']"  value="'.$password_form[$key].'">';
63
-	echo '<input type="hidden" name="statut['.$key.']"  value="'.$statut.'">';
64
-	echo '</td>';
65
-	echo '</tr>';
44
+    $nbre=$nbre+1;
45
+    if($nbre & 1) $ndiv=2; else $ndiv=3;
46
+    echo '<tr align="center" id="header'.$ndiv.'">';
47
+    echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
48
+    echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
49
+    if ($is_western_name_order)
50
+    {
51
+        echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
52
+        echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
53
+    }
54
+    else
55
+    {
56
+        echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
57
+        echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
58
+    }
59
+    echo '<td>'.$username_form[$key].'<input type="hidden" name="username_form['.$key.']" size="10" value="'.$username_form[$key].'">';
60
+    echo '<input type="hidden" name="tutor_form['.$key.']" value="0">';
61
+    echo '<input type="hidden" name="admin_form['.$key.']" value="1">';
62
+    echo '<input type="hidden" name="password_form['.$key.']"  value="'.$password_form[$key].'">';
63
+    echo '<input type="hidden" name="statut['.$key.']"  value="'.$statut.'">';
64
+    echo '</td>';
65
+    echo '</tr>';
66 66
 }
67 67
 echo '</table>';
68 68
 echo '<br />';
Please login to merge, or discard this 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.
Braces   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,16 +14,14 @@  discard block
 block discarded – undo
14 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
-	}
18
-	else
17
+	} else
19 18
 	{
20 19
 		echo '<input type="hidden" name="mailling" value="1">';
21 20
 	}
22 21
 if(!empty($course))
23 22
 {
24 23
 	echo '<input type="hidden" name="course" value="'.Security::remove_XSS($course).'">';
25
-}
26
-elseif(!empty($id_session))
24
+} elseif(!empty($id_session))
27 25
 {
28 26
 	echo '<input type="hidden" name="id_session" value="'.Security::remove_XSS($id_session).'">';
29 27
 }
@@ -42,7 +40,11 @@  discard block
 block discarded – undo
42 40
 	  '</tr>'."\n";
43 41
 while (list ($key, $val) = each($nom_form)) {
44 42
 	$nbre=$nbre+1;
45
-	if($nbre & 1) $ndiv=2; else $ndiv=3;
43
+	if($nbre & 1) {
44
+	    $ndiv=2;
45
+	} else {
46
+	    $ndiv=3;
47
+	}
46 48
 	echo '<tr align="center" id="header'.$ndiv.'">';
47 49
 	echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
48 50
 	echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
@@ -50,8 +52,7 @@  discard block
 block discarded – undo
50 52
 	{
51 53
 		echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
52 54
 		echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
53
-	}
54
-	else
55
+	} else
55 56
 	{
56 57
 		echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
57 58
 		echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_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 2 patches
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.
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
     @author Andre Boivin base code
5 5
 	@author Julio Montoya fixing lot of little details
6 6
 	@todo this script is not ready for a production use that's why I'm commenting the function delete_inactive_student
7
-
8
-*	@package chamilo.admin
7
+ *	@package chamilo.admin
9 8
 *	script pour effacer les user inactif depuis x temps
10 9
 */
11 10
 $cidReset = true;
Please login to merge, or discard this patch.
main/admin/usergroup_user_import.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
         foreach ($mandatory_fields as $field) {
27 27
             if (!isset($user_class[$field]) || strlen($user_class[$field]) == 0) {
28
-                $user_class['error'] = get_lang($field . 'Mandatory');
28
+                $user_class['error'] = get_lang($field.'Mandatory');
29 29
                 $errors[] = $user_class;
30 30
             }
31 31
         }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 // 2.1.1 Check whether code exists in DB
38 38
                 $exists = $usergroup->usergroup_exists($user_class['ClassName']);
39 39
                 if (!$exists) {
40
-                    $user_class['error'] = get_lang('CodeDoesNotExists') . ': ' . $user_class['ClassName'];
40
+                    $user_class['error'] = get_lang('CodeDoesNotExists').': '.$user_class['ClassName'];
41 41
                     $errors[] = $user_class;
42 42
                 } else {
43 43
                     $classcodes[$user_class['CourseCode']] = 1;
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
         if (!UserManager::is_username_empty($user_class['UserName'])) {
50 50
             // 3.1. Check whether username is too long.
51 51
             if (UserManager::is_username_too_long($user_class['UserName'])) {
52
-                $user_class['error'] = get_lang('UserNameTooLong') . ': ' . $user_class['UserName'];
52
+                $user_class['error'] = get_lang('UserNameTooLong').': '.$user_class['UserName'];
53 53
                 $errors[] = $user_class;
54 54
             }
55 55
 
56 56
             $username = UserManager::purify_username($user_class['UserName'], $purification_option_for_usernames);
57 57
             // 3.2. Check whether username exists.
58 58
             if (UserManager::is_username_available($username)) {
59
-                $user_class['error'] = get_lang('UnknownUser') . ': ' . $username;
59
+                $user_class['error'] = get_lang('UnknownUser').': '.$username;
60 60
                 $errors[] = $user_class;
61 61
             }
62 62
         }
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
             $class_name = $user_data['class_name'];
106 106
             $user_list_name = $user_data['user_list_name'];
107 107
             $usergroup->subscribe_users_to_usergroup($class_id, $user_list, $deleteUsersNotInList);
108
-            $message .= Display::return_message(get_lang('Class') . ': ' . $class_name . '<br />', 'normal', false);
109
-            $message .= Display::return_message(get_lang('Users') . ': ' . implode(', ', $user_list_name));
108
+            $message .= Display::return_message(get_lang('Class').': '.$class_name.'<br />', 'normal', false);
109
+            $message .= Display::return_message(get_lang('Users').': '.implode(', ', $user_list_name));
110 110
         }
111 111
     }
112 112
     return $message;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 $this_section = SECTION_PLATFORM_ADMIN;
129 129
 api_protect_admin_script(true);
130 130
 
131
-$tool_name = get_lang('AddUsersToAClass') . ' CSV';
131
+$tool_name = get_lang('AddUsersToAClass').' CSV';
132 132
 
133 133
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
134 134
 $interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 if (count($errors) != 0) {
165 165
     $error_message = "\n";
166 166
     foreach ($errors as $index => $error_class_user) {
167
-        $error_message .= get_lang('Line') . ' ' . $error_class_user['line'] . ': ' . $error_class_user['error'] . '</b>';
167
+        $error_message .= get_lang('Line').' '.$error_class_user['line'].': '.$error_class_user['error'].'</b>';
168 168
         $error_message .= "<br />";
169 169
     }
170 170
     $error_message .= "\n";
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 }
173 173
 $form->display();
174 174
 ?>
175
-<p><?php echo get_lang('CSVMustLookLike') . ' (' . get_lang('MandatoryFields') . ')'; ?> :</p>
175
+<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
176 176
 <pre>
177 177
 <b>UserName</b>;<b>ClassName</b>
178 178
 jdoe;class01
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,6 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 /**
13 13
  * Validates imported data.
14
+ * @param Ddeboer\DataImport\Reader\CsvReader $user_classes
14 15
  */
15 16
 function validate_data($user_classes) {
16 17
     global $purification_option_for_usernames;
@@ -66,6 +67,7 @@  discard block
 block discarded – undo
66 67
 
67 68
 /**
68 69
  * Saves imported data.
70
+ * @param Ddeboer\DataImport\Reader\CsvReader $users_classes
69 71
  */
70 72
 function save_data($users_classes, $deleteUsersNotInList = false) {
71 73
 
@@ -115,7 +117,7 @@  discard block
 block discarded – undo
115 117
 /**
116 118
  * Reads a CSV-file.
117 119
  * @param string $file Path to the CSV-file
118
- * @return array All course-information read from the file
120
+ * @return Ddeboer\DataImport\Reader\CsvReader All course-information read from the file
119 121
  */
120 122
 function parse_csv_data($file) {
121 123
     $courses = Import::csvToArray($file);
Please login to merge, or discard this patch.
main/admin/event_type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 
46 46
 $languages = api_get_languages();
47 47
 
48
-$ajaxPath = api_get_path(WEB_CODE_PATH) . 'inc/ajax/events.ajax.php';
48
+$ajaxPath = api_get_path(WEB_CODE_PATH).'inc/ajax/events.ajax.php';
49 49
 
50
-$action_array = array(array('url' =>'event_controller.php?action=listing' , 'content' => Display::return_icon('view_text.png', get_lang('ListView'), array(), ICON_SIZE_MEDIUM)));
50
+$action_array = array(array('url' =>'event_controller.php?action=listing', 'content' => Display::return_icon('view_text.png', get_lang('ListView'), array(), ICON_SIZE_MEDIUM)));
51 51
 
52 52
 $key_lang = get_lang('YouHaveSomeUnsavedChanges');
53 53
 $users = UserManager::get_user_list(array(), array('firstname'));
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         <select class="col-md-6" multiple="1" id="eventList" onchange="confirmMessage(this.name); return false;" name="eventList">
312 312
         <?php
313 313
         foreach ($event_config as $key => $config) {
314
-            echo '<option value="' . $key . '">' . $config['name_lang_var'] . '</option>';
314
+            echo '<option value="'.$key.'">'.$config['name_lang_var'].'</option>';
315 315
         }
316 316
         ?>
317 317
         </select>
Please login to merge, or discard this patch.
main/admin/dashboard_add_users_to_user.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 $add_type = 'multiple';
56 56
 if (isset($_GET['add_type']) && $_GET['add_type']!='') {
57
-	$add_type = Security::remove_XSS($_REQUEST['add_type']);
57
+    $add_type = Security::remove_XSS($_REQUEST['add_type']);
58 58
 }
59 59
 
60 60
 if (!api_is_platform_admin()) {
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
             ";
121 121
         }
122 122
 
123
-		$rs	= Database::query($sql);
124
-		$xajax_response->addAssign('ajax_list_users_multiple','innerHTML',api_utf8_encode($return));
123
+        $rs	= Database::query($sql);
124
+        $xajax_response->addAssign('ajax_list_users_multiple','innerHTML',api_utf8_encode($return));
125 125
 
126 126
         if ($type == 'single') {
127 127
             $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                     $return .= '...<br />';
161 161
                 }
162 162
             }
163
-           $xajax_response->addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
163
+            $xajax_response->addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
164 164
         } else {
165 165
             $return .= '<select id="origin" class="form-control" name="NoAssignedUsersList[]" multiple="multiple" size="15" ">';
166 166
             while($user = Database :: fetch_array($rs)) {
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
             $return .= '</select>';
171 171
             $xajax_response->addAssign('ajax_list_users_multiple', 'innerHTML', api_utf8_encode($return));
172 172
         }
173
-	}
174
-	return $xajax_response;
173
+    }
174
+    return $xajax_response;
175 175
 }
176 176
 
177 177
 $xajax->processRequests();
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
 $msg = '';
286 286
 if (isset($_POST['formSent']) && intval($_POST['formSent']) == 1) {
287
-	$user_list = $_POST['UsersList'];
287
+    $user_list = $_POST['UsersList'];
288 288
 
289 289
     switch ($userStatus) {
290 290
         case DRH:
@@ -349,13 +349,13 @@  discard block
 block discarded – undo
349 349
 $assigned_users_id = array_keys($assigned_users_to_hrm);
350 350
 $without_assigned_users = '';
351 351
 if (count($assigned_users_id) > 0) {
352
-	$without_assigned_users = " user.user_id NOT IN(".implode(',',$assigned_users_id).") AND ";
352
+    $without_assigned_users = " user.user_id NOT IN(".implode(',',$assigned_users_id).") AND ";
353 353
 }
354 354
 
355 355
 $search_user = '';
356 356
 if (!empty($firstLetterUser)) {
357
-	$needle = Database::escape_string($firstLetterUser);
358
-	$search_user ="AND ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%'";
357
+    $needle = Database::escape_string($firstLetterUser);
358
+    $search_user ="AND ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%'";
359 359
 }
360 360
 
361 361
 $sqlConditions = null;
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 }
376 376
 
377 377
 if (api_is_multiple_url_enabled()) {
378
-	$sql = "SELECT user.user_id, username, lastname, firstname
378
+    $sql = "SELECT user.user_id, username, lastname, firstname
379 379
 	        FROM $tbl_user user  LEFT JOIN $tbl_access_url_rel_user au ON (au.user_id = user.user_id)
380 380
 			WHERE
381 381
                 $without_assigned_users
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
                 $sqlConditions
386 386
             ORDER BY firstname";
387 387
 } else {
388
-	$sql = "SELECT user_id, username, lastname, firstname
388
+    $sql = "SELECT user_id, username, lastname, firstname
389 389
 	        FROM $tbl_user user
390 390
 			WHERE
391 391
 			    $without_assigned_users
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 <input type="hidden" name="formSent" value="1" />
402 402
 <?php
403 403
 if(!empty($msg)) {
404
-	Display::display_normal_message($msg); //main API
404
+    Display::display_normal_message($msg); //main API
405 405
 }
406 406
 ?>
407 407
 
@@ -454,26 +454,26 @@  discard block
 block discarded – undo
454 454
             </div>
455 455
             
456 456
           <?php
457
-          }
458
-          ?>
457
+            }
458
+            ?>
459 459
             <div class="separate-action">
460 460
                 <?php
461
-		echo '<button class="btn btn-success" type="button" value="" onclick="valide()" >'.$tool_name.'</button>';
461
+        echo '<button class="btn btn-success" type="button" value="" onclick="valide()" >'.$tool_name.'</button>';
462 462
             ?>
463 463
             </div>
464 464
         </div>
465 465
     </div>
466 466
     <div class="col-md-4">
467 467
         <?php
468
-	if (UserManager::is_admin($user_id)) {
469
-		echo get_lang('AssignedUsersListToPlatformAdministrator');
468
+    if (UserManager::is_admin($user_id)) {
469
+        echo get_lang('AssignedUsersListToPlatformAdministrator');
470 470
             } else if ($user_info['status'] == SESSIONADMIN) {
471 471
                     echo get_lang('AssignedUsersListToSessionsAdministrator');
472 472
             } else if ($user_info['status'] == STUDENT_BOSS) {
473 473
                     echo get_lang('AssignedUsersListToStudentBoss');
474 474
             } else {
475 475
                     echo get_lang('AssignedUsersListToHumanResourcesManager');
476
-	}
476
+    }
477 477
         ?>
478 478
         <div class="form-group">
479 479
             <div class="col-sm-12">
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 // setting breadcrumbs
26 26
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
27
-$interbreadcrumb[] = array('url' => 'user_list.php','name' => get_lang('UserList'));
27
+$interbreadcrumb[] = array('url' => 'user_list.php', 'name' => get_lang('UserList'));
28 28
 
29 29
 // Database Table Definitions
30 30
 $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
@@ -44,17 +44,17 @@  discard block
 block discarded – undo
44 44
 $isAdmin = UserManager::is_admin($user_id);
45 45
 if ($isAdmin) {
46 46
     $userStatus = PLATFORM_ADMIN;
47
-    $tool_name= get_lang('AssignUsersToPlatformAdministrator');
47
+    $tool_name = get_lang('AssignUsersToPlatformAdministrator');
48 48
 } else if ($user_info['status'] == SESSIONADMIN) {
49
-    $tool_name= get_lang('AssignUsersToSessionsAdministrator');
50
-} else if  ($user_info['status'] == STUDENT_BOSS) {
51
-    $tool_name= get_lang('AssignUsersToBoss');
49
+    $tool_name = get_lang('AssignUsersToSessionsAdministrator');
50
+} else if ($user_info['status'] == STUDENT_BOSS) {
51
+    $tool_name = get_lang('AssignUsersToBoss');
52 52
 } else {
53
-    $tool_name= get_lang('AssignUsersToHumanResourcesManager');
53
+    $tool_name = get_lang('AssignUsersToHumanResourcesManager');
54 54
 }
55 55
 
56 56
 $add_type = 'multiple';
57
-if (isset($_GET['add_type']) && $_GET['add_type']!='') {
57
+if (isset($_GET['add_type']) && $_GET['add_type'] != '') {
58 58
 	$add_type = Security::remove_XSS($_REQUEST['add_type']);
59 59
 }
60 60
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 function search_users($needle, $type)
66 66
 {
67
-    global $tbl_access_url_rel_user,  $tbl_user, $user_anonymous, $current_user_id, $user_id, $userStatus;
67
+    global $tbl_access_url_rel_user, $tbl_user, $user_anonymous, $current_user_id, $user_id, $userStatus;
68 68
 
69 69
     $xajax_response = new xajaxResponse();
70 70
     $return = '';
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                     LEFT JOIN $tbl_access_url_rel_user au ON (au.user_id = user.user_id)
103 103
                     WHERE
104 104
                         ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND
105
-                        status NOT IN(".DRH.", ".SESSIONADMIN.", " . STUDENT_BOSS . ") AND
105
+                        status NOT IN(".DRH.", ".SESSIONADMIN.", ".STUDENT_BOSS.") AND
106 106
                         user.user_id NOT IN ($user_anonymous, $current_user_id, $user_id)
107 107
                         $without_assigned_users AND
108 108
                         access_url_id = ".api_get_current_access_url_id()."
@@ -114,15 +114,15 @@  discard block
 block discarded – undo
114 114
                     FROM $tbl_user user
115 115
                     WHERE
116 116
                         ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND
117
-                        status NOT IN(".DRH.", ".SESSIONADMIN.", " . STUDENT_BOSS . ") AND
117
+                        status NOT IN(".DRH.", ".SESSIONADMIN.", ".STUDENT_BOSS.") AND
118 118
                         user_id NOT IN ($user_anonymous, $current_user_id, $user_id)
119 119
                     $without_assigned_users
120 120
                     $order_clause
121 121
             ";
122 122
         }
123 123
 
124
-		$rs	= Database::query($sql);
125
-		$xajax_response->addAssign('ajax_list_users_multiple','innerHTML',api_utf8_encode($return));
124
+		$rs = Database::query($sql);
125
+		$xajax_response->addAssign('ajax_list_users_multiple', 'innerHTML', api_utf8_encode($return));
126 126
 
127 127
         if ($type == 'single') {
128 128
             $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
 
142 142
             switch ($userStatus) {
143 143
                 case DRH:
144
-                    $sql .= " user.status <> 6 AND user.status <> " . DRH;
144
+                    $sql .= " user.status <> 6 AND user.status <> ".DRH;
145 145
                     break;
146 146
                 case STUDENT_BOSS:
147
-                    $sql .= " user.status <> 6 AND user.status <> " . STUDENT_BOSS;
147
+                    $sql .= " user.status <> 6 AND user.status <> ".STUDENT_BOSS;
148 148
                     break;
149 149
             }
150 150
 
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
                     $return .= '...<br />';
162 162
                 }
163 163
             }
164
-           $xajax_response->addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
164
+           $xajax_response->addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return));
165 165
         } else {
166 166
             $return .= '<select id="origin" class="form-control" name="NoAssignedUsersList[]" multiple="multiple" size="15" ">';
167
-            while($user = Database :: fetch_array($rs)) {
167
+            while ($user = Database :: fetch_array($rs)) {
168 168
                 $person_name = api_get_person_name($user['firstname'], $user['lastname']);
169
-                $return .= '<option value="'.$user['user_id'].'" title="'.htmlspecialchars($person_name,ENT_QUOTES).'">'.$person_name.' ('.$user['username'].')</option>';
169
+                $return .= '<option value="'.$user['user_id'].'" title="'.htmlspecialchars($person_name, ENT_QUOTES).'">'.$person_name.' ('.$user['username'].')</option>';
170 170
             }
171 171
             $return .= '</select>';
172 172
             $xajax_response->addAssign('ajax_list_users_multiple', 'innerHTML', api_utf8_encode($return));
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 }
244 244
 </script>';
245 245
 
246
-$formSent=0;
246
+$formSent = 0;
247 247
 $errorMsg = '';
248 248
 $UserList = array();
249 249
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 
259 259
 $searchForm = new FormValidator('search', 'get', api_get_self().'?user='.$user_id);
260 260
 $searchForm->addHeader(get_lang('AdvancedSearch'));
261
-$renderer =& $searchForm->defaultRenderer();
261
+$renderer = & $searchForm->defaultRenderer();
262 262
 
263 263
 $searchForm->addElement('hidden', 'user', $user_id);
264 264
 foreach ($filters as $param) {
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             $affected_rows = 0;
301 301
     }
302 302
 
303
-    if ($affected_rows)	{
303
+    if ($affected_rows) {
304 304
         $msg = get_lang('AssignedUsersHaveBeenUpdatedSuccessfully');
305 305
     }
306 306
 }
@@ -312,18 +312,18 @@  discard block
 block discarded – undo
312 312
 $actionsLeft = '';
313 313
 if ($userStatus != STUDENT_BOSS) {
314 314
     $actionsLeft = Display::url(
315
-        Display::return_icon('course-add.png', get_lang('AssignCourses'), null, ICON_SIZE_MEDIUM ),
315
+        Display::return_icon('course-add.png', get_lang('AssignCourses'), null, ICON_SIZE_MEDIUM),
316 316
         "dashboard_add_courses_to_user.php?user=$user_id"
317 317
     );
318 318
 
319 319
     $actionsLeft .= Display::url(
320
-        Display::return_icon('session-add.png', get_lang('AssignSessions'), null, ICON_SIZE_MEDIUM ) ,
320
+        Display::return_icon('session-add.png', get_lang('AssignSessions'), null, ICON_SIZE_MEDIUM),
321 321
         "dashboard_add_sessions_to_user.php?user=$user_id"
322 322
     );
323 323
 }
324 324
 
325 325
 $actionsRight = Display::url(
326
-    '<em class="fa fa-search"></em> ' . get_lang('AdvancedSearch'),
326
+    '<em class="fa fa-search"></em> '.get_lang('AdvancedSearch'),
327 327
     '#',
328 328
     array('class' => 'btn btn-default advanced_options', 'id' => 'advanced_search')
329 329
 );
@@ -360,13 +360,13 @@  discard block
 block discarded – undo
360 360
 $assigned_users_id = array_keys($assigned_users_to_hrm);
361 361
 $without_assigned_users = '';
362 362
 if (count($assigned_users_id) > 0) {
363
-	$without_assigned_users = " user.user_id NOT IN(".implode(',',$assigned_users_id).") AND ";
363
+	$without_assigned_users = " user.user_id NOT IN(".implode(',', $assigned_users_id).") AND ";
364 364
 }
365 365
 
366 366
 $search_user = '';
367 367
 if (!empty($firstLetterUser)) {
368 368
 	$needle = Database::escape_string($firstLetterUser);
369
-	$search_user ="AND ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%'";
369
+	$search_user = "AND ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%'";
370 370
 }
371 371
 
372 372
 $sqlConditions = null;
@@ -406,12 +406,12 @@  discard block
 block discarded – undo
406 406
 			    $sqlConditions
407 407
             ORDER BY firstname ";
408 408
 }
409
-$result	= Database::query($sql);
409
+$result = Database::query($sql);
410 410
 ?>
411
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?user=<?php echo $user_id ?>" class="form-horizontal" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
411
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?user=<?php echo $user_id ?>" class="form-horizontal" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
412 412
 <input type="hidden" name="formSent" value="1" />
413 413
 <?php
414
-if(!empty($msg)) {
414
+if (!empty($msg)) {
415 415
 	Display::display_normal_message($msg); //main API
416 416
 }
417 417
 ?>
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
                     <select id="origin" class="form-control" name="NoAssignedUsersList[]" multiple="multiple" size="15">
427 427
                         <?php   while ($enreg = Database::fetch_array($result)) {
428 428
                                 $person_name = api_get_person_name($enreg['firstname'], $enreg['lastname']); ?>
429
-                                  <option value="<?php echo $enreg['user_id']; ?>" <?php echo 'title="'.htmlspecialchars($person_name,ENT_QUOTES).'"';?>>
429
+                                  <option value="<?php echo $enreg['user_id']; ?>" <?php echo 'title="'.htmlspecialchars($person_name, ENT_QUOTES).'"'; ?>>
430 430
                             <?php echo $person_name.' ('.$enreg['username'].')'; ?>
431 431
                         </option>
432 432
                         <?php } ?>
@@ -439,8 +439,8 @@  discard block
 block discarded – undo
439 439
     </div>
440 440
     <div class="col-md-4">
441 441
         <div class="code-course">
442
-            <?php if($add_type == 'multiple') { ?>
443
-                <p><?php echo get_lang('FirstLetterUser');?></p>
442
+            <?php if ($add_type == 'multiple') { ?>
443
+                <p><?php echo get_lang('FirstLetterUser'); ?></p>
444 444
                 <select class="selectpicker show-tick form-control" name="firstLetterUser" onchange = "xajax_search_users(this.value,'multiple')">
445 445
                     <option value="%">--</option>
446 446
                     <?php echo Display::get_alphabet_options($firstLetterUser); ?>
@@ -492,10 +492,10 @@  discard block
 block discarded – undo
492 492
                 <select id='destination' class="form-control" name="UsersList[]" multiple="multiple" size="15" >
493 493
                     <?php
494 494
                     if (is_array($assigned_users_to_hrm)) {
495
-                            foreach($assigned_users_to_hrm as $enreg) {
495
+                            foreach ($assigned_users_to_hrm as $enreg) {
496 496
                                     $person_name = api_get_person_name($enreg['firstname'], $enreg['lastname']);
497 497
                     ?>
498
-                            <option value="<?php echo $enreg['user_id']; ?>" <?php echo 'title="'.htmlspecialchars($person_name,ENT_QUOTES).'"'; ?>>
498
+                            <option value="<?php echo $enreg['user_id']; ?>" <?php echo 'title="'.htmlspecialchars($person_name, ENT_QUOTES).'"'; ?>>
499 499
                         <?php echo $person_name.' ('.$enreg['username'].')'; ?>
500 500
                     </option>
501 501
                     <?php }
Please login to merge, or discard this patch.
main/admin/class_list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
 function get_class_data($from, $number_of_items, $column, $direction = 'ASC') {
36 36
     $tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER);
37 37
     $tbl_class = Database :: get_main_table(TABLE_MAIN_CLASS);
38
-    $from 				= intval($from);
39
-    $number_of_items 	= intval($number_of_items);
38
+    $from = intval($from);
39
+    $number_of_items = intval($number_of_items);
40 40
     $column 			= intval($column);
41
-    $direction 			= ($direction == 'ASC'?'ASC':'DESC');
41
+    $direction = ($direction == 'ASC' ? 'ASC' : 'DESC');
42 42
 
43 43
     $sql = "SELECT 	id AS col0, name AS col1, COUNT(user_id) AS col2, id AS col3
44 44
         FROM $tbl_class
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     }
49 49
     $sql .= " GROUP BY id,name ORDER BY col$column $direction LIMIT $from,$number_of_items";
50 50
     $res = Database::query($sql);
51
-    $classes = array ();
51
+    $classes = array();
52 52
     while ($class = Database::fetch_row($res)) {
53 53
         $classes[] = $class;
54 54
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 $tool_name = get_lang('ClassList');
71
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
71
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
72 72
 
73 73
 if (isset($_POST['action'])) {
74 74
     switch ($_POST['action']) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 // Create a search-box
101 101
 $form = new FormValidator('search_simple', 'get', '', '', null, false);
102
-$renderer =& $form->defaultRenderer();
102
+$renderer = & $form->defaultRenderer();
103 103
 $renderer->setCustomElementTemplate('<span>{element}</span> ');
104 104
 $form->addElement('text', 'keyword', get_lang('Keyword'));
105 105
 $form->addElement('button', 'submit', get_lang('Search'));
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 $table->set_header(2, get_lang('NumberOfUsers'));
114 114
 $table->set_header(3, '', false);
115 115
 $table->set_column_filter(3, 'modify_filter');
116
-$table->set_form_actions(array ('delete_classes' => get_lang('DeleteSelectedClasses')), 'class');
116
+$table->set_form_actions(array('delete_classes' => get_lang('DeleteSelectedClasses')), 'class');
117 117
 
118 118
 $content .= $table->return_table();
119 119
 
Please login to merge, or discard this patch.
main/admin/class_information.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
     api_not_allowed();
19 19
 }
20 20
 
21
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
22
-$interbreadcrumb[] = array ('url' => 'class_list.php', 'name' => get_lang('AdminClasses'));
21
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
22
+$interbreadcrumb[] = array('url' => 'class_list.php', 'name' => get_lang('AdminClasses'));
23 23
 
24 24
 $class_id = $_GET['id'];
25 25
 $class = ClassManager::get_class_info($class_id);
@@ -35,21 +35,21 @@  discard block
 block discarded – undo
35 35
 $users = ClassManager::get_users($class_id);
36 36
 if (count($users) > 0) {
37 37
     $is_western_name_order = api_is_western_name_order();
38
-    $table_header[] = array (get_lang('OfficialCode'), true);
38
+    $table_header[] = array(get_lang('OfficialCode'), true);
39 39
     if ($is_western_name_order) {
40
-        $table_header[] = array (get_lang('FirstName'), true);
41
-        $table_header[] = array (get_lang('LastName'), true);
40
+        $table_header[] = array(get_lang('FirstName'), true);
41
+        $table_header[] = array(get_lang('LastName'), true);
42 42
     } else {
43
-        $table_header[] = array (get_lang('LastName'), true);
44
-        $table_header[] = array (get_lang('FirstName'), true);
43
+        $table_header[] = array(get_lang('LastName'), true);
44
+        $table_header[] = array(get_lang('FirstName'), true);
45 45
     }
46
-    $table_header[] = array (get_lang('Email'), true);
47
-    $table_header[] = array (get_lang('Status'), true);
48
-    $table_header[] = array ('', false);
46
+    $table_header[] = array(get_lang('Email'), true);
47
+    $table_header[] = array(get_lang('Status'), true);
48
+    $table_header[] = array('', false);
49 49
     $data = array();
50
-    foreach($users as $index => $user) {
50
+    foreach ($users as $index => $user) {
51 51
         $username = api_htmlentities(sprintf(get_lang('LoginX'), $user['username']), ENT_QUOTES);
52
-        $row = array ();
52
+        $row = array();
53 53
         $row[] = $user['official_code'];
54 54
         if ($is_western_name_order) {
55 55
             $row[] = $user['firstname'];
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $row[] = '<a href="user_information.php?user_id='.$user['user_id'].'">'.Display::return_icon('synthese_view.gif', get_lang('Info')).'</a>';
64 64
         $data[] = $row;
65 65
     }
66
-    Display::display_sortable_table($table_header,$data,array(),array(),array('id'=>$_GET['id']));
66
+    Display::display_sortable_table($table_header, $data, array(), array(), array('id'=>$_GET['id']));
67 67
 } else {
68 68
     echo get_lang('NoUsersInClass');
69 69
 }
@@ -73,22 +73,22 @@  discard block
 block discarded – undo
73 73
  */
74 74
 $courses = ClassManager::get_courses($class_id);
75 75
 if (count($courses) > 0) {
76
-    $header[] = array (get_lang('Code'), true);
77
-    $header[] = array (get_lang('Title'), true);
78
-    $header[] = array ('', false);
79
-    $data = array ();
80
-    foreach( $courses as $index => $course) {
81
-        $row = array ();
76
+    $header[] = array(get_lang('Code'), true);
77
+    $header[] = array(get_lang('Title'), true);
78
+    $header[] = array('', false);
79
+    $data = array();
80
+    foreach ($courses as $index => $course) {
81
+        $row = array();
82 82
         $row[] = $course['visual_code'];
83 83
         $row[] = $course['title'];
84 84
         $row[] = '<a href="course_information.php?code='.$course['code'].'">'.Display::return_icon('info_small.gif', get_lang('Delete')).'</a>'.
85
-                    '<a href="'.api_get_path(WEB_COURSE_PATH).$course['directory'].'">'.Display::return_icon('course_home.gif', get_lang('CourseHome')).'</a>' .
85
+                    '<a href="'.api_get_path(WEB_COURSE_PATH).$course['directory'].'">'.Display::return_icon('course_home.gif', get_lang('CourseHome')).'</a>'.
86 86
                     '<a href="course_edit.php?course_code='.$course['code'].'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>';
87 87
         $data[] = $row;
88 88
     }
89 89
     echo '<p><b>'.get_lang('Courses').'</b></p>';
90 90
     echo '<blockquote>';
91
-    Display :: display_sortable_table($header, $data, array (), array (), array('id'=>$_GET['id']));
91
+    Display :: display_sortable_table($header, $data, array(), array(), array('id'=>$_GET['id']));
92 92
     echo '</blockquote>';
93 93
 } else {
94 94
     echo '<p>'.get_lang('NoCoursesForThisClass').'</p>';
Please login to merge, or discard this patch.