Completed
Push — 1.10.x ( 501d19...0db498 )
by Yannick
89:35 queued 49:03
created
main/admin/resource_sequence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     }
23 23
 }
24 24
 
25
-$formSequence = new FormValidator('sequence_form', 'post', api_get_self(),null,null,'inline');
25
+$formSequence = new FormValidator('sequence_form', 'post', api_get_self(), null, null, 'inline');
26 26
 $formSequence->addText('name', get_lang('Sequence'), true, ['cols-size' => [3, 8, 1]]);
27 27
 $formSequence->addButtonCreate(get_lang('AddSequence'), 'submit_sequence', false, ['cols-size' => [3, 8, 1]]);
28 28
 
Please login to merge, or discard this patch.
main/admin/ldap_users_synchro.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,43 +8,43 @@  discard block
 block discarded – undo
8 8
  */
9 9
 exit(); //not yet functional, needs to be revised
10 10
 
11
-$cidReset=true;
11
+$cidReset = true;
12 12
 
13 13
 require('../inc/global.inc.php');
14 14
 $libpath = api_get_path(LIBRARY_PATH);
15 15
 require("../auth/ldap/authldap.php");
16
-$annee_base=date('Y');
16
+$annee_base = date('Y');
17 17
 // setting the section (for the tabs)
18 18
 $this_section = SECTION_PLATFORM_ADMIN;
19 19
 api_protect_admin_script();
20 20
 
21 21
 // setting breadcrumbs
22
-$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
23
-$interbreadcrumb[]=array('url' => api_get_self(),"name" => get_lang('SessionsList'));
22
+$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin'));
23
+$interbreadcrumb[] = array('url' => api_get_self(), "name" => get_lang('SessionsList'));
24 24
 
25 25
 // Database Table Definitions
26 26
 $tbl_session						= Database::get_main_table(TABLE_MAIN_SESSION);
27
-$tbl_session_rel_class				= Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
28
-$tbl_session_rel_course				= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
29
-$tbl_session_rel_course_rel_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
30
-$tbl_course							= Database::get_main_table(TABLE_MAIN_COURSE);
31
-$tbl_user							= Database::get_main_table(TABLE_MAIN_USER);
32
-$tbl_session_rel_user				= Database::get_main_table(TABLE_MAIN_SESSION_USER);
33
-$tbl_class							= Database::get_main_table(TABLE_MAIN_CLASS);
34
-$tbl_class_user						= Database::get_main_table(TABLE_MAIN_CLASS_USER);
27
+$tbl_session_rel_class = Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
28
+$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
29
+$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
30
+$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
31
+$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
32
+$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
33
+$tbl_class = Database::get_main_table(TABLE_MAIN_CLASS);
34
+$tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER);
35 35
 
36
-$tbl_session_rel_etape 				= "session_rel_etape";
36
+$tbl_session_rel_etape = "session_rel_etape";
37 37
 
38
-$id_session=intval($_GET['id_session']);
38
+$id_session = intval($_GET['id_session']);
39 39
 
40
-$formSent=0;
41
-$errorMsg=$firstLetterUser=$firstLetterSession='';
42
-$UserList=$SessionList=array();
43
-$users=$sessions=array();
44
-$noPHP_SELF=true;
40
+$formSent = 0;
41
+$errorMsg = $firstLetterUser = $firstLetterSession = '';
42
+$UserList = $SessionList = array();
43
+$users = $sessions = array();
44
+$noPHP_SELF = true;
45 45
 
46
-$page=intval($_GET['page']);
47
-$action=$_REQUEST['action'];
46
+$page = intval($_GET['page']);
47
+$action = $_REQUEST['action'];
48 48
 
49 49
 $tool_name = get_lang('Synchro LDAP : Import Etudiants/Etapes dans session');
50 50
 Display::display_header($tool_name);
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 		</form>
60 60
 
61 61
 <?php
62
-if (isset($action) && ($action=="synchro")) {
63
-	$included=true;
62
+if (isset($action) && ($action == "synchro")) {
63
+	$included = true;
64 64
 	require('ldap_synchro.php');
65
-	Display :: display_normal_message($message,false);
65
+	Display :: display_normal_message($message, false);
66 66
 }
67 67
 Display::display_footer();
68 68
 ?>
Please login to merge, or discard this patch.
main/admin/usergroup_export.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 
14 14
 $tool_name = get_lang('Export');
15 15
 
16
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
17
-$interbreadcrumb[] = array ('url' => 'usergroups.php', 'name' => get_lang('Classes'));
16
+$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
17
+$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
18 18
 
19 19
 set_time_limit(0);
20 20
 
Please login to merge, or discard this patch.
main/admin/class_add.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
 // Setting breadcrumbs.
22 22
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
23
-$interbreadcrumb[] = array ('url' => 'class_list.php', 'name' => get_lang('Classes'));
23
+$interbreadcrumb[] = array('url' => 'class_list.php', 'name' => get_lang('Classes'));
24 24
 
25 25
 // Setting the name of the tool.
26 26
 $tool_name = get_lang("AddClasses");
Please login to merge, or discard this patch.
main/admin/ldap_synchro.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -8,47 +8,47 @@  discard block
 block discarded – undo
8 8
  */
9 9
 exit(); //not yet functional, needs to be revised
10 10
 
11
-$cidReset=true;
11
+$cidReset = true;
12 12
 
13 13
 require('../inc/global.inc.php');
14 14
 $libpath = api_get_path(LIBRARY_PATH);
15 15
 require_once('../auth/ldap/authldap.php');
16
-$annee_base=date('Y');
16
+$annee_base = date('Y');
17 17
 // setting the section (for the tabs)
18 18
 $this_section = SECTION_PLATFORM_ADMIN;
19 19
 //api_protect_admin_script(); // on vire la secu... qui n'a pas lieu d'etre ici (script de synchro)
20 20
 
21 21
 // setting breadcrumbs
22
-$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
23
-$interbreadcrumb[]=array('url' => api_get_self(),"name" => "Liste des sessions");
22
+$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin'));
23
+$interbreadcrumb[] = array('url' => api_get_self(), "name" => "Liste des sessions");
24 24
 
25 25
 // Database Table Definitions
26 26
 $tbl_session						= Database::get_main_table(TABLE_MAIN_SESSION);
27
-$tbl_session_rel_class				= Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
28
-$tbl_session_rel_course				= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
29
-$tbl_session_rel_course_rel_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
30
-$tbl_course							= Database::get_main_table(TABLE_MAIN_COURSE);
31
-$tbl_user							= Database::get_main_table(TABLE_MAIN_USER);
32
-$tbl_session_rel_user				= Database::get_main_table(TABLE_MAIN_SESSION_USER);
33
-$tbl_class							= Database::get_main_table(TABLE_MAIN_CLASS);
34
-$tbl_class_user						= Database::get_main_table(TABLE_MAIN_CLASS_USER);
27
+$tbl_session_rel_class = Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
28
+$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
29
+$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
30
+$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
31
+$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
32
+$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
33
+$tbl_class = Database::get_main_table(TABLE_MAIN_CLASS);
34
+$tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER);
35 35
 
36
-$tbl_session_rel_etape 				= "session_rel_etape";
36
+$tbl_session_rel_etape = "session_rel_etape";
37 37
 
38
-$message="";
38
+$message = "";
39 39
 
40
-$result=Database::query("SELECT id, name FROM $tbl_session");
41
-$Sessions=Database::store_result($result);
40
+$result = Database::query("SELECT id, name FROM $tbl_session");
41
+$Sessions = Database::store_result($result);
42 42
 
43
-$result=Database::query($sql);
44
-$users=Database::store_result($result);
43
+$result = Database::query($sql);
44
+$users = Database::store_result($result);
45 45
 
46
-foreach($Sessions as $session){
46
+foreach ($Sessions as $session) {
47 47
 	$id_session = $session['id'];
48 48
 	$name_session = $session['name'];
49
-	$UserList=array();
50
-	$UserUpdate=array();
51
-	$UserAdd=array();
49
+	$UserList = array();
50
+	$UserUpdate = array();
51
+	$UserAdd = array();
52 52
 
53 53
 	// Parse des code etape de la session
54 54
 	/*
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 	{
66 66
 		$r = false;
67 67
 		$res = ldap_handle_bind($ds, $r);
68
-		$UserList=array();
69
-		if($result !== false)
68
+		$UserList = array();
69
+		if ($result !== false)
70 70
 		{
71 71
 			//while($row = Database::fetch_array($result))
72 72
 			//{
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 				//$sr = @ ldap_search($ds, "ou=people,$LDAPbasedn", "edupersonorgunitdn=ou=$etape,ou=$annee,ou=diploma,$LDAPbasedn");
82 82
 				$sr = @ ldap_search($ds, $ldap_basedn, '(uid=*)');
83 83
 				$info = ldap_get_entries($ds, $sr);
84
-				for ($key = 0; $key < $info["count"]; $key ++)
84
+				for ($key = 0; $key < $info["count"]; $key++)
85 85
 				{
86 86
 					echo "<pre>";
87 87
 					print_r($info[$key]);
@@ -90,28 +90,28 @@  discard block
 block discarded – undo
90 90
 					$firstname = api_utf8_decode($info[$key]["givenname"][0]);
91 91
 					$email = $info[$key]["mail"][0];
92 92
 					// Get uid from dn
93
-					$dn_array=ldap_explode_dn($info[$key]["dn"],1);
93
+					$dn_array = ldap_explode_dn($info[$key]["dn"], 1);
94 94
 					$username = $dn_array[0]; // uid is first key
95 95
 					$outab[] = $info[$key]["edupersonprimaryaffiliation"][0]; // Ici "student"
96 96
 					$val = ldap_get_values_len($ds, $sr, "userPassword");
97 97
 					$password = $val[0];
98 98
 					// Pour faciliter la gestion on ajoute le code "etape-annee"
99
-					$official_code=$etape."-".$annee;
100
-					$auth_source="ldap";
99
+					$official_code = $etape."-".$annee;
100
+					$auth_source = "ldap";
101 101
 					// Pas de date d'expiration d'etudiant (a recuperer par rapport au shadow expire LDAP)
102
-					$expiration_date='0000-00-00 00:00:00';
103
-					$active=1;
102
+					$expiration_date = '0000-00-00 00:00:00';
103
+					$active = 1;
104 104
 					// Ajout de l'utilisateur
105 105
 					if (UserManager::is_username_available($username)) {
106
-						$user_id = UserManager::create_user($firstname,$lastname,$status,$email,$username,$password,$official_code,api_get_setting('platformLanguage'),$phone,$picture_uri,$auth_source,$expiration_date,$active);
107
-						$UserAdd[]=$user_id;
106
+						$user_id = UserManager::create_user($firstname, $lastname, $status, $email, $username, $password, $official_code, api_get_setting('platformLanguage'), $phone, $picture_uri, $auth_source, $expiration_date, $active);
107
+						$UserAdd[] = $user_id;
108 108
 					} else {
109 109
 						$user = api_get_user_info_from_username($username);
110
-						$user_id=$user['user_id'];
110
+						$user_id = $user['user_id'];
111 111
 						UserManager::update_user($user_id, $firstname, $lastname, $username, null, null, $email, $status, $official_code, $phone, $picture_uri, $expiration_date, $active);
112
-						$UserUpdate[]=$user_id;
112
+						$UserUpdate[] = $user_id;
113 113
 					}
114
-					$UserList[]=$user_id;
114
+					$UserList[] = $user_id;
115 115
 				}
116 116
 			//}
117 117
 		}
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
 		}
126 126
 
127 127
 		// Une fois les utilisateurs importer dans la base des utilisateurs, on peux les affecter la session
128
-		$result=Database::query("SELECT c_id FROM $tbl_session_rel_course WHERE session_id='$id_session'");
129
-		$CourseList=array();
130
-		while($row=Database::fetch_array($result)) {
131
-			$CourseList[]= $row['c_id'];
128
+		$result = Database::query("SELECT c_id FROM $tbl_session_rel_course WHERE session_id='$id_session'");
129
+		$CourseList = array();
130
+		while ($row = Database::fetch_array($result)) {
131
+			$CourseList[] = $row['c_id'];
132 132
 		}
133 133
 
134 134
 		foreach ($CourseList as $enreg_course) {
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 						VALUES('$id_session','$enreg_course','$enreg_user')";
139 139
 				Database::query($sql);
140 140
 			}
141
-			$sql = "SELECT COUNT(user_id) as nbUsers " .
142
-					"FROM $tbl_session_rel_course_rel_user " .
141
+			$sql = "SELECT COUNT(user_id) as nbUsers ".
142
+					"FROM $tbl_session_rel_course_rel_user ".
143 143
 					"WHERE session_id='$id_session' AND c_id='$enreg_course'";
144 144
 			$rs = Database::query($sql);
145 145
 			list($nbr_users) = Database::fetch_array($rs);
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
 			Database::query($sql);
149 149
 		}
150 150
 		// On ajoute la relation entre l'utilisateur et la session
151
-		foreach($UserList as $enreg_user){
152
-			$sql = "INSERT IGNORE INTO $tbl_session_rel_user(session_id, user_id, registered_at) " .
153
-					"VALUES('$id_session','$enreg_user', '" . api_get_utc_datetime() . "')";
151
+		foreach ($UserList as $enreg_user) {
152
+			$sql = "INSERT IGNORE INTO $tbl_session_rel_user(session_id, user_id, registered_at) ".
153
+					"VALUES('$id_session','$enreg_user', '".api_get_utc_datetime()."')";
154 154
 			Database::query($sql);
155 155
 		}
156
-		$sql = "SELECT COUNT(user_id) as nbUsers " .
157
-				"FROM $tbl_session_rel_user " .
156
+		$sql = "SELECT COUNT(user_id) as nbUsers ".
157
+				"FROM $tbl_session_rel_user ".
158 158
 				"WHERE session_id='$id_session' AND relation_type<>".SESSION_RELATION_TYPE_RRHH."";
159 159
 		$rs = Database::query($sql);
160 160
 		list($nbr_users) = Database::fetch_array($rs);
Please login to merge, or discard this patch.
main/admin/class_import.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
 api_protect_admin_script();
60 60
 
61 61
 // setting breadcrumbs
62
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
63
-$interbreadcrumb[] = array ('url' => 'class_list.php', 'name' => get_lang('Classes'));
62
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
63
+$interbreadcrumb[] = array('url' => 'class_list.php', 'name' => get_lang('Classes'));
64 64
 
65 65
 // Database Table Definitions
66 66
 
Please login to merge, or discard this patch.
main/admin/skill_badge.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@
 block discarded – undo
23 23
 
24 24
 $interbreadcrumb = array(
25 25
     array(
26
-        'url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php',
26
+        'url' => api_get_path(WEB_CODE_PATH).'admin/index.php',
27 27
         'name' => get_lang('Administration')
28 28
     )
29 29
 );
30 30
 
31 31
 $toolbar = Display::toolbarButton(
32 32
     get_lang('ManageSkills'),
33
-    api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php',
33
+    api_get_path(WEB_CODE_PATH).'admin/skill_list.php',
34 34
     'list',
35 35
     'primary',
36 36
     ['title' => get_lang('ManageSkills')]
Please login to merge, or discard this patch.
main/admin/dashboard_add_sessions_to_user.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
 
23 23
 // setting breadcrumbs
24 24
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
25
-$interbreadcrumb[] = array('url' => 'user_list.php','name' => get_lang('UserList'));
25
+$interbreadcrumb[] = array('url' => 'user_list.php', 'name' => get_lang('UserList'));
26 26
 
27 27
 // Database Table Definitions
28
-$tbl_session 			= Database::get_main_table(TABLE_MAIN_SESSION);
29
-$tbl_session_rel_user 	= Database::get_main_table(TABLE_MAIN_SESSION_USER);
28
+$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
29
+$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
30 30
 $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION);
31 31
 
32 32
 // Initializing variables
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 }
47 47
 
48 48
 $add_type = 'multiple';
49
-if (isset($_GET['add_type']) && $_GET['add_type']!='') {
49
+if (isset($_GET['add_type']) && $_GET['add_type'] != '') {
50 50
     $add_type = Security::remove_XSS($_REQUEST['add_type']);
51 51
 }
52 52
 
@@ -71,20 +71,20 @@  discard block
 block discarded – undo
71 71
         }
72 72
 
73 73
         if (api_is_multiple_url_enabled()) {
74
-            $sql 	= " SELECT s.id, s.name FROM $tbl_session s
74
+            $sql = " SELECT s.id, s.name FROM $tbl_session s
75 75
                         LEFT JOIN $tbl_session_rel_access_url a ON (s.id = a.session_id)
76 76
                         WHERE  s.name LIKE '$needle%' $without_assigned_sessions AND access_url_id = ".api_get_current_access_url_id()."";
77 77
         } else {
78 78
             $sql = "SELECT s.id, s.name FROM $tbl_session s
79 79
                     WHERE  s.name LIKE '$needle%' $without_assigned_sessions ";
80 80
         }
81
-        $rs	= Database::query($sql);
81
+        $rs = Database::query($sql);
82 82
         $return .= '<select class="form-control" id="origin" name="NoAssignedSessionsList[]" multiple="multiple" size="20">';
83
-        while($session = Database :: fetch_array($rs)) {
84
-            $return .= '<option value="'.$session['id'].'" title="'.htmlspecialchars($session['name'],ENT_QUOTES).'">'.$session['name'].'</option>';
83
+        while ($session = Database :: fetch_array($rs)) {
84
+            $return .= '<option value="'.$session['id'].'" title="'.htmlspecialchars($session['name'], ENT_QUOTES).'">'.$session['name'].'</option>';
85 85
         }
86 86
         $return .= '</select>';
87
-        $xajax_response->addAssign('ajax_list_sessions_multiple','innerHTML',api_utf8_encode($return));
87
+        $xajax_response->addAssign('ajax_list_sessions_multiple', 'innerHTML', api_utf8_encode($return));
88 88
     }
89 89
 
90 90
     return $xajax_response;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 }
144 144
 </script>';
145 145
 
146
-$formSent=0;
146
+$formSent = 0;
147 147
 $firstLetterSession = isset($_POST['firstLetterSession']) ? $_POST['firstLetterSession'] : null;
148 148
 $errorMsg = '';
149 149
 $UserList = array();
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
 // actions
169 169
 
170 170
 if ($user_info['status'] != SESSIONADMIN) {
171
-    $actionsLeft = '<a href="dashboard_add_users_to_user.php?user='.$user_id.'">' . Display::return_icon('add-user.png', get_lang('AssignUsers'), null, ICON_SIZE_MEDIUM ) . '</a>';
172
-    $actionsLeft .= '<a href="dashboard_add_courses_to_user.php?user='.$user_id.'">' . Display::return_icon('course-add.png', get_lang('AssignCourses'), null, ICON_SIZE_MEDIUM) . '</a>';
171
+    $actionsLeft = '<a href="dashboard_add_users_to_user.php?user='.$user_id.'">'.Display::return_icon('add-user.png', get_lang('AssignUsers'), null, ICON_SIZE_MEDIUM).'</a>';
172
+    $actionsLeft .= '<a href="dashboard_add_courses_to_user.php?user='.$user_id.'">'.Display::return_icon('course-add.png', get_lang('AssignCourses'), null, ICON_SIZE_MEDIUM).'</a>';
173 173
 }
174 174
 
175 175
 
176
-echo Display::toolbarAction('toolbar-dashboard', array( 0 => $actionsLeft, 1 => ''));
176
+echo Display::toolbarAction('toolbar-dashboard', array(0 => $actionsLeft, 1 => ''));
177 177
 
178 178
 echo Display::page_header(sprintf(get_lang('AssignSessionsToX'), api_get_person_name($user_info['firstname'], $user_info['lastname'])), null, 'h3');
179 179
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 $without_assigned_sessions = '';
184 184
 if (count($assigned_sessions_id) > 0) {
185
-    $without_assigned_sessions = " AND s.id NOT IN (".implode(',',$assigned_sessions_id).") ";
185
+    $without_assigned_sessions = " AND s.id NOT IN (".implode(',', $assigned_sessions_id).") ";
186 186
 }
187 187
 
188 188
 $needle = '%';
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
 		    WHERE  s.name LIKE '$needle%' $without_assigned_sessions
204 204
             ORDER BY s.name";
205 205
 }
206
-$result	= Database::query($sql);
206
+$result = Database::query($sql);
207 207
 ?>
208
-    <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?user=<?php echo $user_id ?>" style="margin:0px;" <?php if($ajax_search){ echo ' onsubmit="valide();"';}?>>
208
+    <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?user=<?php echo $user_id ?>" style="margin:0px;" <?php if ($ajax_search) { echo ' onsubmit="valide();"'; }?>>
209 209
         <input type="hidden" name="formSent" value="1" />
210 210
         
211 211
         <div class="row">
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                         <?php
218 218
                         while ($enreg = Database::fetch_array($result)) {
219 219
                         ?>
220
-                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"';?>>
220
+                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'], ENT_QUOTES).'"'; ?>>
221 221
                                 <?php echo $enreg['name']; ?>
222 222
                             </option>
223 223
                         <?php } ?>
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             <div class="col-md-4">
228 228
                 <div class="code-course">
229 229
                     <?php if ($add_type == 'multiple') { ?>
230
-                    <p><?php echo get_lang('FirstLetterSession');?> :</p>
230
+                    <p><?php echo get_lang('FirstLetterSession'); ?> :</p>
231 231
                     <select class="selectpicker form-control" name="firstLetterSession" onchange = "xajax_search_sessions(this.value, 'multiple')">
232 232
                         <option value="%">--</option>
233 233
                             <?php  echo Display :: get_alphabet_options($firstLetterSession); ?>
@@ -282,9 +282,9 @@  discard block
 block discarded – undo
282 282
                  <select id='destination' name="SessionsList[]" multiple="multiple" size="20" style="width:320px;">
283 283
                         <?php
284 284
                         if (is_array($assigned_sessions_to_hrm)) {
285
-                            foreach($assigned_sessions_to_hrm as $enreg) {
285
+                            foreach ($assigned_sessions_to_hrm as $enreg) {
286 286
                                 ?>
287
-                                <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; ?>>
287
+                                <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'], ENT_QUOTES).'"'; ?>>
288 288
                                     <?php echo $enreg['name'] ?>
289 289
                                 </option>
290 290
                             <?php }
Please login to merge, or discard this patch.
main/admin/filler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $nameTools = get_lang('PlatformAdmin');
23 23
 
24 24
 // setting breadcrumbs
25
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => $nameTools);
25
+$interbreadcrumb[] = array("url" => 'index.php', "name" => $nameTools);
26 26
 
27 27
 // setting the name of the tool
28 28
 $nameTools = get_lang('DataFiller');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 Display::display_header($nameTools);
48 48
 
49 49
 $result = '';
50
-if (count($output)>0) {
50
+if (count($output) > 0) {
51 51
     $result = '<div class="filler-report">'."\n";
52 52
     $result .= '<h3>'.$output[0]['title'].'</h3>'."\n";
53 53
     $result .= '<table>';
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
     }
59 59
     $result .= '</table>';
60 60
     $result .= '</div>';
61
-    Display::display_normal_message($result,false);
61
+    Display::display_normal_message($result, false);
62 62
 }
63 63
 ?>
64 64
 <div id="datafiller" class="actions">
65
-  <h4><?php echo Display::return_icon('bug.png',get_lang('DataFiller'),null,ICON_SIZE_MEDIUM).' '.get_lang('DataFiller')?></h4>
66
-  <div class="description"><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls');?></div>
65
+  <h4><?php echo Display::return_icon('bug.png', get_lang('DataFiller'), null, ICON_SIZE_MEDIUM).' '.get_lang('DataFiller')?></h4>
66
+  <div class="description"><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls'); ?></div>
67 67
   <ul class="fillers">
68
-    <li><a href="filler.php?fill=users"><?php echo Display::return_icon('user.png',get_lang('FillUsers'),null,ICON_SIZE_SMALL).' '.get_lang('FillUsers');?></a></li>
69
-    <li><a href="filler.php?fill=courses"><?php echo Display::return_icon('new-course.png',get_lang('FillCourses'),null,ICON_SIZE_SMALL).' '.get_lang('FillCourses');?></a></li>
68
+    <li><a href="filler.php?fill=users"><?php echo Display::return_icon('user.png', get_lang('FillUsers'), null, ICON_SIZE_SMALL).' '.get_lang('FillUsers'); ?></a></li>
69
+    <li><a href="filler.php?fill=courses"><?php echo Display::return_icon('new-course.png', get_lang('FillCourses'), null, ICON_SIZE_SMALL).' '.get_lang('FillCourses'); ?></a></li>
70 70
   </ul>
71 71
 </div>
72 72
 <?php
Please login to merge, or discard this patch.