@@ -295,7 +295,7 @@ |
||
295 | 295 | if (isset($_GET['export'])) { |
296 | 296 | $dataToExport = $timeReport->prepareDataToExport($withFilter); |
297 | 297 | |
298 | - $fileName = get_lang('TeacherTimeReport') . ' ' . api_get_local_time(); |
|
298 | + $fileName = get_lang('TeacherTimeReport').' '.api_get_local_time(); |
|
299 | 299 | |
300 | 300 | switch ($_GET['export']) { |
301 | 301 | case 'pdf': |
@@ -50,7 +50,7 @@ |
||
50 | 50 | array('name'=>'certificate', 'index'=>'certificate', 'width'=>'25', 'align'=>'left', 'sortable'=>'false'), |
51 | 51 | array('name'=>'skills', 'index'=>'skills', 'width'=>'300', 'align'=>'left', 'sortable'=>'false'), |
52 | 52 | array('name'=>'actions', 'index'=>'actions', 'width'=>'30', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false') |
53 | - ); |
|
53 | + ); |
|
54 | 54 | //Autowidth |
55 | 55 | $extra_params['autowidth'] = 'true'; |
56 | 56 | //height auto |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | // setting breadcrumbs |
26 | 26 | |
27 | 27 | $tool_name = get_lang('SkillsAndGradebooks'); |
28 | -$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
28 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
29 | 29 | if ($action == 'add_skill') { |
30 | - $interbreadcrumb[]=array('url' => 'skills_gradebook.php','name' => get_lang('SkillsAndGradebooks')); |
|
30 | + $interbreadcrumb[] = array('url' => 'skills_gradebook.php', 'name' => get_lang('SkillsAndGradebooks')); |
|
31 | 31 | $tool_name = get_lang('Add'); |
32 | 32 | } |
33 | 33 | |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | |
47 | 47 | //Column config |
48 | 48 | $column_model = array( |
49 | - array('name'=>'name', 'index'=>'name', 'width'=>'150', 'align'=>'left'), |
|
50 | - array('name'=>'certificate', 'index'=>'certificate', 'width'=>'25', 'align'=>'left', 'sortable'=>'false'), |
|
51 | - array('name'=>'skills', 'index'=>'skills', 'width'=>'300', 'align'=>'left', 'sortable'=>'false'), |
|
52 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'30', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false') |
|
49 | + array('name'=>'name', 'index'=>'name', 'width'=>'150', 'align'=>'left'), |
|
50 | + array('name'=>'certificate', 'index'=>'certificate', 'width'=>'25', 'align'=>'left', 'sortable'=>'false'), |
|
51 | + array('name'=>'skills', 'index'=>'skills', 'width'=>'300', 'align'=>'left', 'sortable'=>'false'), |
|
52 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'30', 'align'=>'left', 'formatter'=>'action_formatter', 'sortable'=>'false') |
|
53 | 53 | ); |
54 | 54 | //Autowidth |
55 | 55 | $extra_params['autowidth'] = 'true'; |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | $action_links = 'function action_formatter(cellvalue, options, rowObject) { |
61 | 61 | //certificates |
62 | 62 | if (rowObject[4] == 1) { |
63 | - return \'<a href="?action=add_skill&id=\'+options.rowId+\'">'.Display::return_icon('add.png', get_lang('AddSkill'),'',ICON_SIZE_SMALL).'</a>'.'\'; |
|
63 | + return \'<a href="?action=add_skill&id=\'+options.rowId+\'">'.Display::return_icon('add.png', get_lang('AddSkill'), '', ICON_SIZE_SMALL).'</a>'.'\'; |
|
64 | 64 | } else { |
65 | - return \''.Display::return_icon('add_na.png', get_lang('YourGradebookFirstNeedsACertificateInOrderToBeLinkedToASkill'),'',ICON_SIZE_SMALL).''.'\'; |
|
65 | + return \''.Display::return_icon('add_na.png', get_lang('YourGradebookFirstNeedsACertificateInOrderToBeLinkedToASkill'), '', ICON_SIZE_SMALL).''.'\'; |
|
66 | 66 | } |
67 | 67 | }'; |
68 | 68 | ?> |
@@ -70,14 +70,14 @@ discard block |
||
70 | 70 | $(function() { |
71 | 71 | <?php |
72 | 72 | // grid definition see the $career->display() function |
73 | - echo Display::grid_js('gradebooks', $url, $columns, $column_model, $extra_params, array(), $action_links,true); |
|
73 | + echo Display::grid_js('gradebooks', $url, $columns, $column_model, $extra_params, array(), $action_links, true); |
|
74 | 74 | ?> |
75 | 75 | }); |
76 | 76 | </script> |
77 | 77 | <?php |
78 | 78 | $gradebook = new Gradebook(); |
79 | 79 | |
80 | -switch($action) { |
|
80 | +switch ($action) { |
|
81 | 81 | case 'display': |
82 | 82 | $gradebook->display(); |
83 | 83 | break; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null; |
86 | 86 | $gradebook_info = $gradebook->get($id); |
87 | 87 | $url = api_get_self().'?action='.$action.'&id='.$id; |
88 | - $form = $gradebook->show_skill_form($id, $url, $gradebook_info['name']); |
|
88 | + $form = $gradebook->show_skill_form($id, $url, $gradebook_info['name']); |
|
89 | 89 | if ($form->validate()) { |
90 | 90 | $values = $form->exportValues(); |
91 | 91 | $res = $gradebook->update_skills_to_gradebook($values['id'], $values['skill']); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | <option value = "%">--</option> |
198 | 198 | <?php |
199 | 199 | echo Display :: get_alphabet_options(); |
200 | - ?> |
|
200 | + ?> |
|
201 | 201 | </select> |
202 | 202 | </td> |
203 | 203 | <td align="center"> </td> |
@@ -207,31 +207,31 @@ discard block |
||
207 | 207 | <td align="center"> |
208 | 208 | <div id="content_source"> |
209 | 209 | <?php |
210 | - if (!($add_type=='multiple')) { |
|
210 | + if (!($add_type=='multiple')) { |
|
211 | 211 | ?> |
212 | 212 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" /> |
213 | 213 | <div id="ajax_list_users_single"></div> |
214 | 214 | <?php |
215 | - } else { |
|
216 | - ?> |
|
215 | + } else { |
|
216 | + ?> |
|
217 | 217 | <div id="ajax_list_multiple"> |
218 | 218 | <?php echo Display::select('session_not_in_promotion_name',$session_not_in_promotion, '',array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'session_not_in_promotion','size'=>'15px'),false); ?> |
219 | 219 | </div> |
220 | 220 | <?php |
221 | - } |
|
222 | - ?> |
|
221 | + } |
|
222 | + ?> |
|
223 | 223 | </div> |
224 | 224 | </td> |
225 | 225 | <td width="10%" valign="middle" align="center"> |
226 | 226 | <?php |
227 | - if ($ajax_search) { |
|
228 | - ?> |
|
227 | + if ($ajax_search) { |
|
228 | + ?> |
|
229 | 229 | <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('session_in_promotion'))" > |
230 | 230 | <em class="fa fa-arrow-left"></em> |
231 | 231 | </button> |
232 | 232 | <?php |
233 | - } else { |
|
234 | - ?> |
|
233 | + } else { |
|
234 | + ?> |
|
235 | 235 | <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('session_not_in_promotion'), document.getElementById('session_in_promotion'))" onclick="moveItem(document.getElementById('session_not_in_promotion'), document.getElementById('session_in_promotion'))"> |
236 | 236 | <em class="fa fa-arrow-right"></em> |
237 | 237 | </button> |
@@ -240,8 +240,8 @@ discard block |
||
240 | 240 | <em class="fa fa-arrow-left"></em> |
241 | 241 | </button> |
242 | 242 | <?php |
243 | - } |
|
244 | - ?> |
|
243 | + } |
|
244 | + ?> |
|
245 | 245 | <br /><br /><br /><br /><br /><br /> |
246 | 246 | </td> |
247 | 247 | <td align="center"> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | require_once '../inc/global.inc.php'; |
11 | 11 | |
12 | 12 | $xajax = new xajax(); |
13 | -$xajax->registerFunction ('search_sessions'); |
|
13 | +$xajax->registerFunction('search_sessions'); |
|
14 | 14 | |
15 | 15 | // setting the section (for the tabs) |
16 | 16 | $this_section = SECTION_PLATFORM_ADMIN; |
@@ -19,13 +19,13 @@ discard block |
||
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' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions')); |
|
22 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
23 | +$interbreadcrumb[] = array('url' => 'career_dashboard.php', 'name' => get_lang('CareersAndPromotions')); |
|
24 | 24 | |
25 | 25 | // Setting the name of the tool |
26 | 26 | $tool_name = get_lang('SubscribeSessionsToPromotions'); |
27 | 27 | $add_type = 'multiple'; |
28 | -if (isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){ |
|
28 | +if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { |
|
29 | 29 | $add_type = Security::remove_XSS($_REQUEST['add_type']); |
30 | 30 | } |
31 | 31 | |
@@ -67,14 +67,14 @@ discard block |
||
67 | 67 | |
68 | 68 | $form_sent = 0; |
69 | 69 | $errorMsg = ''; |
70 | -$users =$sessions=array(); |
|
70 | +$users = $sessions = array(); |
|
71 | 71 | $promotion = new Promotion(); |
72 | 72 | $id = intval($_GET['id']); |
73 | 73 | if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
74 | 74 | $form_sent = $_POST['form_sent']; |
75 | 75 | $session_in_promotion_posted = $_POST['session_in_promotion_name']; |
76 | 76 | if (!is_array($session_in_promotion_posted)) { |
77 | - $session_in_promotion_posted=array(); |
|
77 | + $session_in_promotion_posted = array(); |
|
78 | 78 | } |
79 | 79 | if ($form_sent == 1) { |
80 | 80 | // Added a parameter to send emails when registering a user |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | $promotion_data = $promotion->get($id); |
88 | 88 | $session_list = SessionManager::get_sessions_list(array(), array('name')); |
89 | -$session_not_in_promotion = $session_in_promotion= array(); |
|
89 | +$session_not_in_promotion = $session_in_promotion = array(); |
|
90 | 90 | |
91 | 91 | if (!empty($session_list)) { |
92 | 92 | foreach ($session_list as $session) { |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | } |
124 | 124 | $return .= '</select>'; |
125 | - $xajax_response -> addAssign('ajax_list_multiple','innerHTML',api_utf8_encode($return)); |
|
125 | + $xajax_response -> addAssign('ajax_list_multiple', 'innerHTML', api_utf8_encode($return)); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | return $xajax_response; |
@@ -140,14 +140,14 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | echo '<div class="actions">'; |
143 | -echo '<a href="promotions.php">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
143 | +echo '<a href="promotions.php">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
144 | 144 | echo '</div>'; |
145 | 145 | ?> |
146 | 146 | |
147 | -<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();"';}?>> |
|
147 | +<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();"'; }?>> |
|
148 | 148 | <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>'; |
149 | 149 | |
150 | -if ($add_type=='multiple') { |
|
150 | +if ($add_type == 'multiple') { |
|
151 | 151 | if (is_array($extra_field_list)) { |
152 | 152 | if (is_array($new_field_list) && count($new_field_list) > 0) { |
153 | 153 | echo '<h3>'.get_lang('FilterUsers').'</h3>'; |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | echo ' <select name="'.$varname.'">'; |
158 | 158 | echo '<option value="0">--'.get_lang('Select').'--</option>'; |
159 | 159 | foreach ($new_field['data'] as $option) { |
160 | - $checked=''; |
|
160 | + $checked = ''; |
|
161 | 161 | if (isset($_POST[$varname])) { |
162 | - if ($_POST[$varname]==$option[1]) { |
|
162 | + if ($_POST[$varname] == $option[1]) { |
|
163 | 163 | $checked = 'selected="true"'; |
164 | 164 | } |
165 | 165 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | <td align="center"><b><?php echo get_lang('SessionsInPromotion') ?> :</b></td> |
190 | 190 | </tr> |
191 | 191 | |
192 | -<?php if ($add_type=='multiple') { ?> |
|
192 | +<?php if ($add_type == 'multiple') { ?> |
|
193 | 193 | <tr> |
194 | 194 | <td align="center"> |
195 | 195 | <?php echo get_lang('FirstLetterSessions'); ?> : |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | <td align="center"> |
208 | 208 | <div id="content_source"> |
209 | 209 | <?php |
210 | - if (!($add_type=='multiple')) { |
|
210 | + if (!($add_type == 'multiple')) { |
|
211 | 211 | ?> |
212 | 212 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" /> |
213 | 213 | <div id="ajax_list_users_single"></div> |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } else { |
216 | 216 | ?> |
217 | 217 | <div id="ajax_list_multiple"> |
218 | - <?php echo Display::select('session_not_in_promotion_name',$session_not_in_promotion, '',array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'session_not_in_promotion','size'=>'15px'),false); ?> |
|
218 | + <?php echo Display::select('session_not_in_promotion_name', $session_not_in_promotion, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'session_not_in_promotion', 'size'=>'15px'), false); ?> |
|
219 | 219 | </div> |
220 | 220 | <?php |
221 | 221 | } |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | 'session_in_promotion_name[]', |
251 | 251 | $session_in_promotion, |
252 | 252 | '', |
253 | - array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'session_in_promotion','size'=>'15px'), |
|
253 | + array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'session_in_promotion', 'size'=>'15px'), |
|
254 | 254 | false |
255 | 255 | ); |
256 | 256 | unset($sessionUsersList); |
@@ -144,7 +144,10 @@ |
||
144 | 144 | echo '</div>'; |
145 | 145 | ?> |
146 | 146 | |
147 | -<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();"';}?>> |
|
147 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
148 | + echo '&add=true' ; |
|
149 | +} |
|
150 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
148 | 151 | <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>'; |
149 | 152 | |
150 | 153 | if ($add_type=='multiple') { |
@@ -29,18 +29,18 @@ |
||
29 | 29 | |
30 | 30 | $interbreadcrumb = array( |
31 | 31 | array( |
32 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php', |
|
32 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/index.php', |
|
33 | 33 | 'name' => get_lang('Administration') |
34 | 34 | ), |
35 | 35 | array( |
36 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php', |
|
36 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php', |
|
37 | 37 | 'name' => get_lang('Badges') |
38 | 38 | ) |
39 | 39 | ); |
40 | 40 | |
41 | 41 | $toolbar = Display::toolbarButton( |
42 | 42 | get_lang('ManageSkills'), |
43 | - api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php', |
|
43 | + api_get_path(WEB_CODE_PATH).'admin/skill_list.php', |
|
44 | 44 | 'list', |
45 | 45 | 'primary', |
46 | 46 | ['title' => get_lang('ManageSkills')] |
@@ -36,20 +36,20 @@ discard block |
||
36 | 36 | |
37 | 37 | // setting the name of the tool |
38 | 38 | if (UserManager::is_admin($user_id)) { |
39 | - $tool_name= get_lang('AssignCoursesToPlatformAdministrator'); |
|
39 | + $tool_name= get_lang('AssignCoursesToPlatformAdministrator'); |
|
40 | 40 | } else if ($user_info['status'] == SESSIONADMIN) { |
41 | - $tool_name= get_lang('AssignCoursesToSessionsAdministrator'); |
|
41 | + $tool_name= get_lang('AssignCoursesToSessionsAdministrator'); |
|
42 | 42 | } else { |
43 | - $tool_name= get_lang('AssignCoursesToHumanResourcesManager'); |
|
43 | + $tool_name= get_lang('AssignCoursesToHumanResourcesManager'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $add_type = 'multiple'; |
47 | 47 | if(isset($_GET['add_type']) && $_GET['add_type']!='') { |
48 | - $add_type = Security::remove_XSS($_REQUEST['add_type']); |
|
48 | + $add_type = Security::remove_XSS($_REQUEST['add_type']); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if (!api_is_platform_admin()) { |
52 | - api_not_allowed(true); |
|
52 | + api_not_allowed(true); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | function search_courses($needle, $type) |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $return = ''; |
61 | 61 | if (!empty($needle) && !empty($type)) { |
62 | 62 | // xajax send utf8 datas... datas in db can be non-utf8 datas |
63 | - $needle = Database::escape_string($needle); |
|
63 | + $needle = Database::escape_string($needle); |
|
64 | 64 | |
65 | 65 | $assigned_courses_to_hrm = CourseManager::get_courses_followed_by_drh($user_id); |
66 | 66 | $assigned_courses_code = array_keys($assigned_courses_to_hrm); |
@@ -88,16 +88,16 @@ discard block |
||
88 | 88 | $without_assigned_courses "; |
89 | 89 | } |
90 | 90 | |
91 | - $rs = Database::query($sql); |
|
91 | + $rs = Database::query($sql); |
|
92 | 92 | |
93 | - $return .= '<select id="origin" name="NoAssignedCoursesList[]" multiple="multiple" size="20" >'; |
|
94 | - while($course = Database :: fetch_array($rs)) { |
|
95 | - $return .= '<option value="'.$course['code'].'" title="'.htmlspecialchars($course['title'],ENT_QUOTES).'">'.$course['title'].' ('.$course['code'].')</option>'; |
|
96 | - } |
|
97 | - $return .= '</select>'; |
|
98 | - $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return)); |
|
99 | - } |
|
100 | - return $xajax_response; |
|
93 | + $return .= '<select id="origin" name="NoAssignedCoursesList[]" multiple="multiple" size="20" >'; |
|
94 | + while($course = Database :: fetch_array($rs)) { |
|
95 | + $return .= '<option value="'.$course['code'].'" title="'.htmlspecialchars($course['title'],ENT_QUOTES).'">'.$course['title'].' ('.$course['code'].')</option>'; |
|
96 | + } |
|
97 | + $return .= '</select>'; |
|
98 | + $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return)); |
|
99 | + } |
|
100 | + return $xajax_response; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $xajax->processRequests(); |
@@ -181,23 +181,23 @@ discard block |
||
181 | 181 | $assigned_courses_to_hrm = CourseManager::get_courses_followed_by_drh($user_id); |
182 | 182 | $assigned_courses_code = array_keys($assigned_courses_to_hrm); |
183 | 183 | foreach ($assigned_courses_code as &$value) { |
184 | - $value = "'".$value."'"; |
|
184 | + $value = "'".$value."'"; |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | $without_assigned_courses = ''; |
188 | 188 | if (count($assigned_courses_code) > 0) { |
189 | - $without_assigned_courses = " AND c.code NOT IN(".implode(',',$assigned_courses_code).")"; |
|
189 | + $without_assigned_courses = " AND c.code NOT IN(".implode(',',$assigned_courses_code).")"; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | $needle = '%'; |
193 | 193 | $firstLetter = null; |
194 | 194 | if (isset($_POST['firstLetterCourse'])) { |
195 | - $firstLetter = $_POST['firstLetterCourse']; |
|
196 | - $needle = Database::escape_string($firstLetter.'%'); |
|
195 | + $firstLetter = $_POST['firstLetterCourse']; |
|
196 | + $needle = Database::escape_string($firstLetter.'%'); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | if (api_is_multiple_url_enabled()) { |
200 | - $sql = " SELECT c.code, c.title |
|
200 | + $sql = " SELECT c.code, c.title |
|
201 | 201 | FROM $tbl_course c |
202 | 202 | LEFT JOIN $tbl_course_rel_access_url a |
203 | 203 | ON (a.c_id = c.id) |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | ORDER BY c.title"; |
208 | 208 | |
209 | 209 | } else { |
210 | - $sql= " SELECT c.code, c.title |
|
210 | + $sql= " SELECT c.code, c.title |
|
211 | 211 | FROM $tbl_course c |
212 | 212 | WHERE c.code LIKE '$needle' $without_assigned_courses |
213 | 213 | ORDER BY c.title"; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | <input type="hidden" name="formSent" value="1" /> |
222 | 222 | <?php |
223 | 223 | if(!empty($msg)) { |
224 | - Display::display_normal_message($msg); //main API |
|
224 | + Display::display_normal_message($msg); //main API |
|
225 | 225 | } |
226 | 226 | ?> |
227 | 227 | |
@@ -269,13 +269,13 @@ discard block |
||
269 | 269 | </div> |
270 | 270 | <div class="col-md-4"> |
271 | 271 | <h5><?php |
272 | - if (UserManager::is_admin($user_id)) { |
|
273 | - echo get_lang('AssignedCoursesListToPlatformAdministrator'); |
|
274 | - } else if ($user_info['status'] == SESSIONADMIN) { |
|
275 | - echo get_lang('AssignedCoursesListToSessionsAdministrator'); |
|
276 | - } else { |
|
277 | - echo get_lang('AssignedCoursesListToHumanResourcesManager'); |
|
278 | - } |
|
272 | + if (UserManager::is_admin($user_id)) { |
|
273 | + echo get_lang('AssignedCoursesListToPlatformAdministrator'); |
|
274 | + } else if ($user_info['status'] == SESSIONADMIN) { |
|
275 | + echo get_lang('AssignedCoursesListToSessionsAdministrator'); |
|
276 | + } else { |
|
277 | + echo get_lang('AssignedCoursesListToHumanResourcesManager'); |
|
278 | + } |
|
279 | 279 | ?>: </h5> |
280 | 280 | |
281 | 281 | <select id='destination' name="CoursesList[]" multiple="multiple" size="20" style="width:320px;"> |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | // setting breadcrumbs |
23 | 23 | $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
24 | -$interbreadcrumb[] = array('url' => 'user_list.php','name' => get_lang('UserList')); |
|
24 | +$interbreadcrumb[] = array('url' => 'user_list.php', 'name' => get_lang('UserList')); |
|
25 | 25 | |
26 | 26 | // Database Table Definitions |
27 | 27 | $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | |
37 | 37 | // setting the name of the tool |
38 | 38 | if (UserManager::is_admin($user_id)) { |
39 | - $tool_name= get_lang('AssignCoursesToPlatformAdministrator'); |
|
39 | + $tool_name = get_lang('AssignCoursesToPlatformAdministrator'); |
|
40 | 40 | } else if ($user_info['status'] == SESSIONADMIN) { |
41 | - $tool_name= get_lang('AssignCoursesToSessionsAdministrator'); |
|
41 | + $tool_name = get_lang('AssignCoursesToSessionsAdministrator'); |
|
42 | 42 | } else { |
43 | - $tool_name= get_lang('AssignCoursesToHumanResourcesManager'); |
|
43 | + $tool_name = get_lang('AssignCoursesToHumanResourcesManager'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $add_type = 'multiple'; |
47 | -if(isset($_GET['add_type']) && $_GET['add_type']!='') { |
|
47 | +if (isset($_GET['add_type']) && $_GET['add_type'] != '') { |
|
48 | 48 | $add_type = Security::remove_XSS($_REQUEST['add_type']); |
49 | 49 | } |
50 | 50 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | function search_courses($needle, $type) |
56 | 56 | { |
57 | - global $tbl_course, $tbl_course_rel_access_url,$user_id; |
|
57 | + global $tbl_course, $tbl_course_rel_access_url, $user_id; |
|
58 | 58 | |
59 | 59 | $xajax_response = new xajaxResponse(); |
60 | 60 | $return = ''; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | $without_assigned_courses = ''; |
71 | 71 | if (count($assigned_courses_code) > 0) { |
72 | - $without_assigned_courses = " AND c.code NOT IN(".implode(',',$assigned_courses_code).")"; |
|
72 | + $without_assigned_courses = " AND c.code NOT IN(".implode(',', $assigned_courses_code).")"; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | if (api_is_multiple_url_enabled()) { |
@@ -88,14 +88,14 @@ discard block |
||
88 | 88 | $without_assigned_courses "; |
89 | 89 | } |
90 | 90 | |
91 | - $rs = Database::query($sql); |
|
91 | + $rs = Database::query($sql); |
|
92 | 92 | |
93 | 93 | $return .= '<select id="origin" name="NoAssignedCoursesList[]" multiple="multiple" size="20" >'; |
94 | - while($course = Database :: fetch_array($rs)) { |
|
95 | - $return .= '<option value="'.$course['code'].'" title="'.htmlspecialchars($course['title'],ENT_QUOTES).'">'.$course['title'].' ('.$course['code'].')</option>'; |
|
94 | + while ($course = Database :: fetch_array($rs)) { |
|
95 | + $return .= '<option value="'.$course['code'].'" title="'.htmlspecialchars($course['title'], ENT_QUOTES).'">'.$course['title'].' ('.$course['code'].')</option>'; |
|
96 | 96 | } |
97 | 97 | $return .= '</select>'; |
98 | - $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return)); |
|
98 | + $xajax_response -> addAssign('ajax_list_courses_multiple', 'innerHTML', api_utf8_encode($return)); |
|
99 | 99 | } |
100 | 100 | return $xajax_response; |
101 | 101 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } |
154 | 154 | </script>'; |
155 | 155 | |
156 | -$formSent=0; |
|
156 | +$formSent = 0; |
|
157 | 157 | $errorMsg = $firstLetterCourse = ''; |
158 | 158 | $UserList = array(); |
159 | 159 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | if (isset($_POST['formSent']) && intval($_POST['formSent']) == 1) { |
162 | 162 | $courses_list = $_POST['CoursesList']; |
163 | 163 | $affected_rows = CourseManager::subscribeCoursesToDrhManager($user_id, $courses_list); |
164 | - if ($affected_rows) { |
|
164 | + if ($affected_rows) { |
|
165 | 165 | $msg = get_lang('AssignedCoursesHaveBeenUpdatedSuccessfully'); |
166 | 166 | } |
167 | 167 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | $without_assigned_courses = ''; |
188 | 188 | if (count($assigned_courses_code) > 0) { |
189 | - $without_assigned_courses = " AND c.code NOT IN(".implode(',',$assigned_courses_code).")"; |
|
189 | + $without_assigned_courses = " AND c.code NOT IN(".implode(',', $assigned_courses_code).")"; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | $needle = '%'; |
@@ -207,20 +207,20 @@ discard block |
||
207 | 207 | ORDER BY c.title"; |
208 | 208 | |
209 | 209 | } else { |
210 | - $sql= " SELECT c.code, c.title |
|
210 | + $sql = " SELECT c.code, c.title |
|
211 | 211 | FROM $tbl_course c |
212 | 212 | WHERE c.code LIKE '$needle' $without_assigned_courses |
213 | 213 | ORDER BY c.title"; |
214 | 214 | } |
215 | 215 | |
216 | 216 | |
217 | -$result = Database::query($sql); |
|
217 | +$result = Database::query($sql); |
|
218 | 218 | |
219 | 219 | ?> |
220 | 220 | <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?user=<?php echo $user_id ?>" style="margin:0px;"> |
221 | 221 | <input type="hidden" name="formSent" value="1" /> |
222 | 222 | <?php |
223 | -if(!empty($msg)) { |
|
223 | +if (!empty($msg)) { |
|
224 | 224 | Display::display_normal_message($msg); //main API |
225 | 225 | } |
226 | 226 | ?> |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | <div id="ajax_list_courses_multiple"> |
233 | 233 | <select id="origin" name="NoAssignedCoursesList[]" multiple="multiple" size="20" style="width:340px;"> |
234 | 234 | <?php while ($enreg = Database::fetch_array($result)) { ?> |
235 | - <option value="<?php echo $enreg['code']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'],ENT_QUOTES).'"';?>><?php echo $enreg['title'].' ('.$enreg['code'].')'; ?></option> |
|
235 | + <option value="<?php echo $enreg['code']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'], ENT_QUOTES).'"'; ?>><?php echo $enreg['title'].' ('.$enreg['code'].')'; ?></option> |
|
236 | 236 | <?php } ?> |
237 | 237 | </select> |
238 | 238 | </div> |
@@ -240,8 +240,8 @@ discard block |
||
240 | 240 | </div> |
241 | 241 | <div class="col-md-4"> |
242 | 242 | <div class="code-course"> |
243 | - <?php if($add_type == 'multiple') { ?> |
|
244 | - <p><?php echo get_lang('FirstLetterCourse');?> :</p> |
|
243 | + <?php if ($add_type == 'multiple') { ?> |
|
244 | + <p><?php echo get_lang('FirstLetterCourse'); ?> :</p> |
|
245 | 245 | <select name="firstLetterCourse" class="selectpicker form-control" onchange = "xajax_search_courses(this.value,'multiple')"> |
246 | 246 | <option value="%">--</option> |
247 | 247 | <?php echo Display :: get_alphabet_options($firstLetter); ?> |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | if (is_array($assigned_courses_to_hrm)) { |
284 | 284 | foreach ($assigned_courses_to_hrm as $enreg) { |
285 | 285 | ?> |
286 | - <option value="<?php echo $enreg['code']; ?>" <?php echo 'title="' . htmlspecialchars($enreg['title'], ENT_QUOTES) . '"'; ?>><?php echo $enreg['title'] . ' (' . $enreg['code'] . ')'; ?></option> |
|
286 | + <option value="<?php echo $enreg['code']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'], ENT_QUOTES).'"'; ?>><?php echo $enreg['title'].' ('.$enreg['code'].')'; ?></option> |
|
287 | 287 | <?php |
288 | 288 | } |
289 | 289 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $userGroupList[$item['id']] = $item; |
122 | 122 | } |
123 | 123 | } else { |
124 | - $userGroups = UrlManager::get_url_rel_usergroup_data(); |
|
124 | + $userGroups = UrlManager::get_url_rel_usergroup_data(); |
|
125 | 125 | |
126 | 126 | foreach ($userGroups as $item) { |
127 | 127 | if ($item['access_url_id'] == $access_url_id) { |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | } |
133 | 133 | |
134 | 134 | if ($add_type == 'multiple') { |
135 | - $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeUnique').'</a>'; |
|
136 | - $link_add_type_multiple = get_lang('SessionAddTypeMultiple'); |
|
135 | + $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeUnique').'</a>'; |
|
136 | + $link_add_type_multiple = get_lang('SessionAddTypeMultiple'); |
|
137 | 137 | } else { |
138 | - $link_add_type_unique = get_lang('SessionAddTypeUnique'); |
|
139 | - $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeMultiple').'</a>'; |
|
138 | + $link_add_type_unique = get_lang('SessionAddTypeUnique'); |
|
139 | + $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeMultiple').'</a>'; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | $url_list = UrlManager::get_url_data(); |
@@ -200,30 +200,30 @@ discard block |
||
200 | 200 | <?php } else { ?> |
201 | 201 | <select id="origin_users" name="no_course_list[]" multiple="multiple" size="15" style="width:380px;"> |
202 | 202 | <?php |
203 | - foreach ($noUserGroupList as $noItem) { |
|
204 | - ?> |
|
203 | + foreach ($noUserGroupList as $noItem) { |
|
204 | + ?> |
|
205 | 205 | <option value="<?php echo $noItem['id']; ?>"> |
206 | 206 | <?php echo $noItem['name']; ?> |
207 | 207 | </option> |
208 | 208 | <?php |
209 | - } |
|
210 | - ?> |
|
209 | + } |
|
210 | + ?> |
|
211 | 211 | </select> |
212 | 212 | <?php |
213 | - } |
|
214 | - ?> |
|
213 | + } |
|
214 | + ?> |
|
215 | 215 | </div> |
216 | 216 | </td> |
217 | 217 | <td width="10%" valign="middle" align="center"> |
218 | 218 | <?php |
219 | - if ($ajax_search) { |
|
220 | - ?> |
|
219 | + if ($ajax_search) { |
|
220 | + ?> |
|
221 | 221 | <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('destination_users'))" > |
222 | 222 | <em class="fa fa-arrow-left"></em> |
223 | 223 | </button> |
224 | 224 | <?php |
225 | - } else { |
|
226 | - ?> |
|
225 | + } else { |
|
226 | + ?> |
|
227 | 227 | <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('origin_users'), document.getElementById('destination_users'))" > |
228 | 228 | <em class="fa fa-arrow-right"></em> |
229 | 229 | </button> |
@@ -232,8 +232,8 @@ discard block |
||
232 | 232 | <em class="fa fa-arrow-left"></em> |
233 | 233 | </button> |
234 | 234 | <?php |
235 | - } |
|
236 | - ?> |
|
235 | + } |
|
236 | + ?> |
|
237 | 237 | <br /><br /><br /><br /><br /><br /> |
238 | 238 | </td> |
239 | 239 | <td align="center"> |
@@ -254,11 +254,11 @@ discard block |
||
254 | 254 | <td colspan="3" align="center"> |
255 | 255 | <br /> |
256 | 256 | <?php |
257 | - if(isset($_GET['add'])) |
|
258 | - echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
|
259 | - else |
|
260 | - echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
|
261 | - ?> |
|
257 | + if(isset($_GET['add'])) |
|
258 | + echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
|
259 | + else |
|
260 | + echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
|
261 | + ?> |
|
262 | 262 | </td> |
263 | 263 | </tr> |
264 | 264 | </table> |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | |
26 | 26 | // setting breadcrumbs |
27 | 27 | $tool_name = get_lang('EditUserGroupToURL'); |
28 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
29 | -$interbreadcrumb[] = array ('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')); |
|
28 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
29 | +$interbreadcrumb[] = array('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')); |
|
30 | 30 | |
31 | 31 | $add_type = 'multiple'; |
32 | 32 | if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | } |
74 | 74 | </script>'; |
75 | 75 | |
76 | -$form_sent=0; |
|
77 | -$errorMsg=''; |
|
78 | -$UserList=$SessionList=array(); |
|
79 | -$users=$sessions=array(); |
|
76 | +$form_sent = 0; |
|
77 | +$errorMsg = ''; |
|
78 | +$UserList = $SessionList = array(); |
|
79 | +$users = $sessions = array(); |
|
80 | 80 | |
81 | 81 | if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
82 | 82 | $form_sent = $_POST['form_sent']; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | foreach ($userGroups as $item) { |
127 | 127 | if ($item['access_url_id'] == $access_url_id) { |
128 | - $userGroupList[$item['id']] = $item ; |
|
128 | + $userGroupList[$item['id']] = $item; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | $noUserGroupList = $userGroup->getUserGroupNotInList(array_keys($userGroupList)); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | name="formulaire" |
150 | 150 | method="post" |
151 | 151 | action="<?php echo api_get_self(); ?>" |
152 | - style="margin:0px;" <?php if ($ajax_search){ echo ' onsubmit="valide();"'; } ?> |
|
152 | + style="margin:0px;" <?php if ($ajax_search) { echo ' onsubmit="valide();"'; } ?> |
|
153 | 153 | > |
154 | 154 | <?php echo get_lang('SelectUrl').' : '; ?> |
155 | 155 | <select name="access_url_id" onchange="javascript:send();"> |
@@ -161,11 +161,11 @@ discard block |
||
161 | 161 | if (!empty($access_url_id)) { |
162 | 162 | if ($url_obj[0] == $access_url_id) { |
163 | 163 | $checked = 'selected=true'; |
164 | - $url_selected=$url_obj[1]; |
|
164 | + $url_selected = $url_obj[1]; |
|
165 | 165 | } |
166 | 166 | } |
167 | - if ($url_obj['active']==1) { ?> |
|
168 | - <option <?php echo $checked;?> value="<?php echo $url_obj[0]; ?>"> <?php echo $url_obj[1]; ?> |
|
167 | + if ($url_obj['active'] == 1) { ?> |
|
168 | + <option <?php echo $checked; ?> value="<?php echo $url_obj[0]; ?>"> <?php echo $url_obj[1]; ?> |
|
169 | 169 | </option> |
170 | 170 | <?php |
171 | 171 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | <td align="center"><b><?php echo get_lang('UserGroupListInPlatform') ?> :</b> |
189 | 189 | </td> |
190 | 190 | <td></td> |
191 | - <td align="center"><b><?php printf(get_lang('UserGroupListInX'),$url_selected); ?></b></td> |
|
191 | + <td align="center"><b><?php printf(get_lang('UserGroupListInX'), $url_selected); ?></b></td> |
|
192 | 192 | </tr> |
193 | 193 | |
194 | 194 | <tr> |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | <td align="center"> |
240 | 240 | <select id="destination_users" name="course_list[]" multiple="multiple" size="15" style="width:380px;"> |
241 | 241 | <?php |
242 | -foreach($userGroupList as $item) { |
|
242 | +foreach ($userGroupList as $item) { |
|
243 | 243 | ?> |
244 | 244 | <option value="<?php echo $item['id']; ?>"> |
245 | 245 | <?php echo $item['name']; ?> |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | <td colspan="3" align="center"> |
255 | 255 | <br /> |
256 | 256 | <?php |
257 | - if(isset($_GET['add'])) |
|
257 | + if (isset($_GET['add'])) |
|
258 | 258 | echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
259 | 259 | else |
260 | 260 | echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
@@ -254,10 +254,11 @@ |
||
254 | 254 | <td colspan="3" align="center"> |
255 | 255 | <br /> |
256 | 256 | <?php |
257 | - if(isset($_GET['add'])) |
|
258 | - echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
|
259 | - else |
|
260 | - echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
|
257 | + if(isset($_GET['add'])) { |
|
258 | + echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
|
259 | + } else { |
|
260 | + echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
|
261 | + } |
|
261 | 262 | ?> |
262 | 263 | </td> |
263 | 264 | </tr> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | api_protect_admin_script(); |
16 | 16 | |
17 | 17 | // setting breadcrumbs |
18 | -$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
18 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
19 | 19 | |
20 | 20 | $tool_name = null; |
21 | 21 | |
@@ -36,35 +36,35 @@ discard block |
||
36 | 36 | $token = Security::get_token(); |
37 | 37 | |
38 | 38 | if ($action == 'add') { |
39 | - $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extraField->type,'name' => $extraField->pageName); |
|
40 | - $interbreadcrumb[]=array( |
|
39 | + $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extraField->type, 'name' => $extraField->pageName); |
|
40 | + $interbreadcrumb[] = array( |
|
41 | 41 | 'url' => 'extra_fields.php?type='.$extraField->type.'&action=edit&id='.$extraFieldInfo['id'], |
42 | 42 | 'name' => $extraFieldInfo['display_text'] |
43 | 43 | ); |
44 | - $interbreadcrumb[]=array( |
|
44 | + $interbreadcrumb[] = array( |
|
45 | 45 | 'url' => 'extra_field_options.php?type='.$extraField->type.'&field_id='.$extraFieldInfo['id'], |
46 | 46 | 'name' => get_lang('EditExtraFieldOptions') |
47 | 47 | ); |
48 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('Add')); |
|
48 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add')); |
|
49 | 49 | } elseif ($action == 'edit') { |
50 | - $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extraField->type,'name' => $extraField->pageName); |
|
51 | - $interbreadcrumb[]=array( |
|
50 | + $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extraField->type, 'name' => $extraField->pageName); |
|
51 | + $interbreadcrumb[] = array( |
|
52 | 52 | 'url' => 'extra_fields.php?type='.$extraField->type.'&action=edit&id='.$extraFieldInfo['id'], |
53 | 53 | 'name' => $extraFieldInfo['display_text'] |
54 | 54 | ); |
55 | - $interbreadcrumb[]=array( |
|
55 | + $interbreadcrumb[] = array( |
|
56 | 56 | 'url' => 'extra_field_options.php?type='.$extraField->type.'&field_id='.$extraFieldInfo['id'], |
57 | 57 | 'name' => get_lang('EditExtraFieldOptions') |
58 | 58 | ); |
59 | 59 | |
60 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit')); |
|
60 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit')); |
|
61 | 61 | } else { |
62 | - $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extraField->type,'name' => $extraField->pageName); |
|
63 | - $interbreadcrumb[]=array( |
|
62 | + $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extraField->type, 'name' => $extraField->pageName); |
|
63 | + $interbreadcrumb[] = array( |
|
64 | 64 | 'url' => 'extra_fields.php?type='.$extraField->type.'&action=edit&id='.$extraFieldInfo['id'], |
65 | 65 | 'name' => $extraFieldInfo['display_text'] |
66 | 66 | ); |
67 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('EditExtraFieldOptions')); |
|
67 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditExtraFieldOptions')); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $roleId = isset($_REQUEST['roleId']) ? $_REQUEST['roleId'] : null; |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | $paramsNoRole = 'field_id='.$field_id.'&type='.$extraField->type; |
75 | 75 | |
76 | 76 | //The order is important you need to check the the $column variable in the model.ajax.php file |
77 | -$columns = array(get_lang('Name'), get_lang('Value'), get_lang('Order'), get_lang('Actions')); |
|
77 | +$columns = array(get_lang('Name'), get_lang('Value'), get_lang('Order'), get_lang('Actions')); |
|
78 | 78 | |
79 | -$htmlHeadXtra[]='<script> |
|
79 | +$htmlHeadXtra[] = '<script> |
|
80 | 80 | |
81 | 81 | function setHidden(obj) { |
82 | 82 | var name = $(obj).attr("name"); |
@@ -177,9 +177,9 @@ discard block |
||
177 | 177 | if (!empty($roleId)) { |
178 | 178 | $form->addElement('html', $table->toHtml()); |
179 | 179 | $group = array(); |
180 | - $group[]= $form->createElement('button', 'submit', get_lang('Save')); |
|
181 | - $group[]= $form->createElement('button', 'select_all', get_lang('SelectAll'), array('class' => 'btn select_all')); |
|
182 | - $group[]= $form->createElement('button', 'unselect_all', get_lang('UnSelectAll'), array('class' => 'btn unselect_all')); |
|
180 | + $group[] = $form->createElement('button', 'submit', get_lang('Save')); |
|
181 | + $group[] = $form->createElement('button', 'select_all', get_lang('SelectAll'), array('class' => 'btn select_all')); |
|
182 | + $group[] = $form->createElement('button', 'unselect_all', get_lang('UnSelectAll'), array('class' => 'btn unselect_all')); |
|
183 | 183 | $form->addGroup($group, '', null, ' '); |
184 | 184 | |
185 | 185 | $form->setDefaults(array('status' => $roleId)); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$load_user"; |
38 | 38 | $tpl->assign('wheel_url', $url); |
39 | 39 | |
40 | -$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1'; |
|
40 | +$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1'; |
|
41 | 41 | $tpl->assign('url', $url); |
42 | 42 | $tpl->assign('isAdministration', true); |
43 | 43 |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | // 2. Check whether class doesn't exist yet. |
24 | 24 | if ($usergroup->usergroup_exists($class['name'])) { |
25 | 25 | $class['line'] = $index + 2; |
26 | - $class['error'] = get_lang('ClassNameExists') . |
|
27 | - ': <strong>' .$class['name'] . '</strong>'; |
|
26 | + $class['error'] = get_lang('ClassNameExists'). |
|
27 | + ': <strong>'.$class['name'].'</strong>'; |
|
28 | 28 | $errors[] = $class; |
29 | 29 | } |
30 | 30 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $form = new FormValidator('import_classes'); |
99 | 99 | $form->addElement('file', 'import_file', get_lang('ImportCSVFileLocation')); |
100 | 100 | $group = array(); |
101 | -$group[] = $form->createElement('radio', 'file_type', '', 'CSV (<a href="example_class.csv" target="_blank">' . get_lang('ExampleCSVFile') . '</a>)', 'csv'); |
|
101 | +$group[] = $form->createElement('radio', 'file_type', '', 'CSV (<a href="example_class.csv" target="_blank">'.get_lang('ExampleCSVFile').'</a>)', 'csv'); |
|
102 | 102 | $form->addGroup($group, '', get_lang('FileType'), '<br/>'); |
103 | 103 | $form->addButtonImport(get_lang('Import')); |
104 | 104 | |
@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | $errors = validate_data($classes); |
108 | 108 | if (count($errors) == 0) { |
109 | 109 | $number_of_added_classes = save_data($classes); |
110 | - Display::display_normal_message($number_of_added_classes . ' ' . get_lang('Added')); |
|
110 | + Display::display_normal_message($number_of_added_classes.' '.get_lang('Added')); |
|
111 | 111 | } else { |
112 | 112 | $error_message = get_lang('ErrorsWhenImportingFile'); |
113 | 113 | $error_message .= '<ul>'; |
114 | 114 | foreach ($errors as $index => $error_class) { |
115 | - $error_message .= '<li>' . $error_class['error'] . ' (' . get_lang('Line') . ' ' . $error_class['line'] . ')'; |
|
115 | + $error_message .= '<li>'.$error_class['error'].' ('.get_lang('Line').' '.$error_class['line'].')'; |
|
116 | 116 | $error_message .= '</li>'; |
117 | 117 | } |
118 | 118 | $error_message .= '</ul>'; |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | $form->display(); |
125 | 125 | ?> |
126 | -<p><?php echo get_lang('CSVMustLookLike') . ' (' . get_lang('MandatoryFields') . ')'; ?> :</p> |
|
126 | +<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p> |
|
127 | 127 | |
128 | 128 | <pre> |
129 | 129 | <b>name;description;</b>users |