@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $obj->setupBreadcrumb($interbreadcrumb, $action); |
37 | 37 | |
38 | 38 | //jqgrid will use this URL to do the selects |
39 | -$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_extra_fields&type=' . $extraFieldType; |
|
39 | +$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_extra_fields&type='.$extraFieldType; |
|
40 | 40 | |
41 | 41 | //The order is important you need to check the the $column variable in the model.ajax.php file |
42 | 42 | $columns = $obj->getJqgridColumnNames(); |
@@ -64,43 +64,43 @@ discard block |
||
64 | 64 | array(), |
65 | 65 | $action_links, |
66 | 66 | true |
67 | - ). ' |
|
67 | + ).' |
|
68 | 68 | |
69 | 69 | $("#field_type").on("change", function() { |
70 | 70 | id = $(this).val(); |
71 | 71 | switch(id) { |
72 | 72 | case "1": |
73 | - $("#example").html("' . addslashes(Display::return_icon('userfield_text.png')) . '"); |
|
73 | + $("#example").html("' . addslashes(Display::return_icon('userfield_text.png')).'"); |
|
74 | 74 | break; |
75 | 75 | case "2": |
76 | - $("#example").html("' . addslashes(Display::return_icon('userfield_text_area.png')) . '"); |
|
76 | + $("#example").html("' . addslashes(Display::return_icon('userfield_text_area.png')).'"); |
|
77 | 77 | break; |
78 | 78 | case "3": |
79 | - $("#example").html("' . addslashes(Display::return_icon('add_user_field_howto.png')) . '"); |
|
79 | + $("#example").html("' . addslashes(Display::return_icon('add_user_field_howto.png')).'"); |
|
80 | 80 | break; |
81 | 81 | case "4": |
82 | - $("#example").html("' . addslashes(Display::return_icon('userfield_drop_down.png')) . '"); |
|
82 | + $("#example").html("' . addslashes(Display::return_icon('userfield_drop_down.png')).'"); |
|
83 | 83 | break; |
84 | 84 | case "5": |
85 | - $("#example").html("' . addslashes(Display::return_icon('userfield_multidropdown.png')) . '"); |
|
85 | + $("#example").html("' . addslashes(Display::return_icon('userfield_multidropdown.png')).'"); |
|
86 | 86 | break; |
87 | 87 | case "6": |
88 | - $("#example").html("' . addslashes(Display::return_icon('userfield_data.png')) . '"); |
|
88 | + $("#example").html("' . addslashes(Display::return_icon('userfield_data.png')).'"); |
|
89 | 89 | break; |
90 | 90 | case "7": |
91 | - $("#example").html("' . addslashes(Display::return_icon('userfield_date_time.png')) . '"); |
|
91 | + $("#example").html("' . addslashes(Display::return_icon('userfield_date_time.png')).'"); |
|
92 | 92 | break; |
93 | 93 | case "8": |
94 | - $("#example").html("' . addslashes(Display::return_icon('userfield_doubleselect.png')) . '"); |
|
94 | + $("#example").html("' . addslashes(Display::return_icon('userfield_doubleselect.png')).'"); |
|
95 | 95 | break; |
96 | 96 | case "9": |
97 | - $("#example").html("' . addslashes(Display::return_icon('userfield_divider.png')) . '"); |
|
97 | + $("#example").html("' . addslashes(Display::return_icon('userfield_divider.png')).'"); |
|
98 | 98 | break; |
99 | 99 | case "10": |
100 | - $("#example").html("' . addslashes(Display::return_icon('userfield_user_tag.png')) . '"); |
|
100 | + $("#example").html("' . addslashes(Display::return_icon('userfield_user_tag.png')).'"); |
|
101 | 101 | break; |
102 | 102 | case "11": |
103 | - $("#example").html("' . addslashes(Display::return_icon('userfield_data.png')) . '"); |
|
103 | + $("#example").html("' . addslashes(Display::return_icon('userfield_data.png')).'"); |
|
104 | 104 | break; |
105 | 105 | } |
106 | 106 | }); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | ) { |
120 | 120 | api_not_allowed(); |
121 | 121 | } |
122 | - $url = api_get_self() . '?type=' . $obj->type . '&action=' . Security::remove_XSS($_GET['action']); |
|
122 | + $url = api_get_self().'?type='.$obj->type.'&action='.Security::remove_XSS($_GET['action']); |
|
123 | 123 | $form = $obj->return_form($url, 'add'); |
124 | 124 | |
125 | 125 | // The validation or display |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | $obj->display(); |
136 | 136 | } else { |
137 | 137 | echo '<div class="actions">'; |
138 | - echo '<a href="' . api_get_self() . '?type=' . $obj->type . '">' . |
|
139 | - Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
138 | + echo '<a href="'.api_get_self().'?type='.$obj->type.'">'. |
|
139 | + Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
140 | 140 | echo '</div>'; |
141 | 141 | $form->addElement('hidden', 'sec_token'); |
142 | 142 | $form->setConstants(array('sec_token' => $token)); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | break; |
146 | 146 | case 'edit': |
147 | 147 | // Action handling: Editing |
148 | - $url = api_get_self() . '?type=' . $obj->type . '&action=' . Security::remove_XSS($_GET['action']) . '&id=' . intval($_GET['id']); |
|
148 | + $url = api_get_self().'?type='.$obj->type.'&action='.Security::remove_XSS($_GET['action']).'&id='.intval($_GET['id']); |
|
149 | 149 | $form = $obj->return_form($url, 'edit'); |
150 | 150 | |
151 | 151 | // The validation or display |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | $obj->display(); |
160 | 160 | } else { |
161 | 161 | echo '<div class="actions">'; |
162 | - echo '<a href="' . api_get_self() . '?type=' . $obj->type . '">' . |
|
163 | - Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
162 | + echo '<a href="'.api_get_self().'?type='.$obj->type.'">'. |
|
163 | + Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
164 | 164 | echo '</div>'; |
165 | 165 | $form->addElement('hidden', 'sec_token'); |
166 | 166 | $form->setConstants(array('sec_token' => $token)); |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
19 | 19 | |
20 | 20 | // setting breadcrumbs |
21 | -$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
22 | -$interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions')); |
|
21 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
22 | +$interbreadcrumb[] = array('url' => 'career_dashboard.php', 'name' => get_lang('CareersAndPromotions')); |
|
23 | 23 | |
24 | 24 | Display :: display_header(null); |
25 | 25 | |
26 | -$form = new FormValidator('filter_form','GET', api_get_self()); |
|
26 | +$form = new FormValidator('filter_form', 'GET', api_get_self()); |
|
27 | 27 | |
28 | 28 | $career = new Career(); |
29 | 29 | |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | // action links |
55 | 55 | echo '<div class="actions" style="margin-bottom:20px">'; |
56 | 56 | echo '<a href="../admin/index.php">'. |
57 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
57 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
58 | 58 | echo '<a href="careers.php">'. |
59 | - Display::return_icon('career.png',get_lang('Careers'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
59 | + Display::return_icon('career.png', get_lang('Careers'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
60 | 60 | echo '<a href="promotions.php">'. |
61 | - Display::return_icon('promotion.png',get_lang('Promotions'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
61 | + Display::return_icon('promotion.png', get_lang('Promotions'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
62 | 62 | echo '</div>'; |
63 | 63 | |
64 | 64 | $form->display(); |
@@ -119,22 +119,22 @@ discard block |
||
119 | 119 | foreach ($career_array as $career_id => $data) { |
120 | 120 | $career = $data['name']; |
121 | 121 | $promotions = $data['promotions']; |
122 | - $career = Display::url($career, 'careers.php?action=edit&id=' . $career_id); |
|
122 | + $career = Display::url($career, 'careers.php?action=edit&id='.$career_id); |
|
123 | 123 | $career = Display::tag('h4', $career); |
124 | - echo '<tr><td style="background-color:#ECF0F1" colspan="3">' . $career . '</td></tr>'; |
|
124 | + echo '<tr><td style="background-color:#ECF0F1" colspan="3">'.$career.'</td></tr>'; |
|
125 | 125 | if (!empty($promotions)) { |
126 | 126 | foreach ($promotions as $promotion_id => $promotion) { |
127 | 127 | $promotion_name = $promotion['name']; |
128 | - $promotion_url = Display::url($promotion_name, 'promotions.php?action=edit&id=' . $promotion_id); |
|
128 | + $promotion_url = Display::url($promotion_name, 'promotions.php?action=edit&id='.$promotion_id); |
|
129 | 129 | $sessions = $promotion['sessions']; |
130 | 130 | echo '<tr>'; |
131 | 131 | $count = count($sessions); |
132 | 132 | $rowspan = ''; |
133 | 133 | if (!empty($count)) { |
134 | 134 | $count++; |
135 | - $rowspan = 'rowspan="' . $count . '"'; |
|
135 | + $rowspan = 'rowspan="'.$count.'"'; |
|
136 | 136 | } |
137 | - echo '<td ' . $rowspan . '>'; |
|
137 | + echo '<td '.$rowspan.'>'; |
|
138 | 138 | echo Display::tag('h5', $promotion_url); |
139 | 139 | echo '</td>'; |
140 | 140 | echo '</tr>'; |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $course_list = $session['courses']; |
145 | 145 | |
146 | 146 | $url = Display::url($session['data']['name'], |
147 | - '../session/resume_session.php?id_session=' . $session['data']['id']); |
|
147 | + '../session/resume_session.php?id_session='.$session['data']['id']); |
|
148 | 148 | echo '<tr>'; |
149 | 149 | //Session name |
150 | 150 | echo Display::tag('td', $url); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | |
158 | 158 | $url = Display::url( |
159 | 159 | $course['title'], |
160 | - api_get_path(WEB_COURSE_PATH) . $course['directory'] . '/index.php?id_session=' . $session['data']['id'] |
|
160 | + api_get_path(WEB_COURSE_PATH).$course['directory'].'/index.php?id_session='.$session['data']['id'] |
|
161 | 161 | ); |
162 | 162 | echo Display::tag('td', $url); |
163 | 163 | echo '</tr>'; |
@@ -15,18 +15,18 @@ discard block |
||
15 | 15 | |
16 | 16 | $tool_name = get_lang('SessionOverview'); |
17 | 17 | |
18 | -$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
19 | -$interbreadcrumb[]=array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
18 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
19 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
20 | 20 | |
21 | 21 | // Database Table Definitions |
22 | -$tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
|
23 | -$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); |
|
22 | +$tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
|
23 | +$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); |
|
24 | 24 | $table_access_url_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
25 | 25 | $url_id = api_get_current_access_url_id(); |
26 | 26 | |
27 | 27 | $action = $_GET['action']; |
28 | 28 | |
29 | -switch($action) { |
|
29 | +switch ($action) { |
|
30 | 30 | case 'add_user_to_url': |
31 | 31 | $user_id = $_REQUEST['user_id']; |
32 | 32 | $result = UrlManager::add_user_to_url($user_id, $url_id); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | |
61 | -foreach($session_list as $session_item) { |
|
61 | +foreach ($session_list as $session_item) { |
|
62 | 62 | $session_id = $session_item['id']; |
63 | 63 | $html .= '<h3>'.$session_item['name'].'</h3>'; |
64 | 64 |
@@ -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': |
@@ -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"> |
@@ -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') { |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | require_once __DIR__.'/../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); |
@@ -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')] |
@@ -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 |
@@ -112,7 +112,7 @@ |
||
112 | 112 | <script> |
113 | 113 | $(function() { |
114 | 114 | <?php |
115 | - echo Display::grid_js('promotions', $url, $columns, $column_model, $extra_params, array(), $action_links, true); |
|
115 | + echo Display::grid_js('promotions', $url, $columns, $column_model, $extra_params, array(), $action_links, true); |
|
116 | 116 | ?> |
117 | 117 | }); |
118 | 118 | </script> |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
17 | 17 | |
18 | 18 | // setting breadcrumbs |
19 | -$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
20 | -$interbreadcrumb[] = array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions')); |
|
19 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
20 | +$interbreadcrumb[] = array('url' => 'career_dashboard.php', 'name' => get_lang('CareersAndPromotions')); |
|
21 | 21 | |
22 | 22 | $action = isset($_GET['action']) ? $_GET['action'] : null; |
23 | 23 | |
@@ -102,10 +102,10 @@ discard block |
||
102 | 102 | $extra_params['height'] = 'auto'; //use the width of the parent |
103 | 103 | //With this function we can add actions to the jgrid |
104 | 104 | $action_links = 'function action_formatter (cellvalue, options, rowObject) { |
105 | - return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'">'.Display::return_icon('session_to_promotion.png',get_lang('SubscribeSessionsToPromotions'),'',ICON_SIZE_SMALL).'</a>'. |
|
106 | - ' <a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
107 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'. |
|
108 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a> \'; |
|
105 | + return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'">'.Display::return_icon('session_to_promotion.png', get_lang('SubscribeSessionsToPromotions'), '', ICON_SIZE_SMALL).'</a>'. |
|
106 | + ' <a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'. |
|
107 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png', get_lang('Copy'), '', ICON_SIZE_SMALL).'</a>'. |
|
108 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a> \'; |
|
109 | 109 | }'; |
110 | 110 | |
111 | 111 | ?> |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $promotion->display(); |
151 | 151 | } else { |
152 | 152 | echo '<div class="actions">'; |
153 | - echo Display::url(Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM), api_get_self()); |
|
153 | + echo Display::url(Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM), api_get_self()); |
|
154 | 154 | echo '</div>'; |
155 | 155 | $form->addElement('hidden', 'sec_token'); |
156 | 156 | $form->setConstants(array('sec_token' => $token)); |
@@ -107,7 +107,7 @@ |
||
107 | 107 | <?php |
108 | 108 | echo Display :: get_alphabet_options($first_letter_course); |
109 | 109 | echo Display :: get_numeric_options(0,9,$first_letter_course); |
110 | - ?> |
|
110 | + ?> |
|
111 | 111 | </select> |
112 | 112 | </td> |
113 | 113 | <td width="20%"> </td> |
@@ -119,7 +119,10 @@ discard block |
||
119 | 119 | <td width="40%" align="center"> |
120 | 120 | <select name="course_list[]" multiple="multiple" size="20" style="width:400px;"> |
121 | 121 | <?php foreach ($db_courses as $course) { ?> |
122 | - <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>><?php echo $course['title'].' ('.$course['code'].')'; ?> |
|
122 | + <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) { |
|
123 | + echo 'selected="selected"'; |
|
124 | +} |
|
125 | +?>><?php echo $course['title'].' ('.$course['code'].')'; ?> |
|
123 | 126 | </option> |
124 | 127 | <?php } ?> |
125 | 128 | </select> |
@@ -130,7 +133,10 @@ discard block |
||
130 | 133 | <td width="40%" align="center"> |
131 | 134 | <select name="url_list[]" multiple="multiple" size="20" style="width:300px;"> |
132 | 135 | <?php foreach ($db_urls as $url_obj) { ?> |
133 | - <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) echo 'selected="selected"'; ?>><?php echo $url_obj['url']; ?> |
|
136 | + <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) { |
|
137 | + echo 'selected="selected"'; |
|
138 | +} |
|
139 | +?>><?php echo $url_obj['url']; ?> |
|
134 | 140 | </option> |
135 | 141 | <?php } ?> |
136 | 142 | </select> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $cidReset = true; |
11 | 11 | require_once __DIR__.'/../inc/global.inc.php'; |
12 | 12 | |
13 | -$this_section=SECTION_PLATFORM_ADMIN; |
|
13 | +$this_section = SECTION_PLATFORM_ADMIN; |
|
14 | 14 | |
15 | 15 | api_protect_global_admin_script(); |
16 | 16 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | $form_sent = 0; |
23 | 23 | $first_letter_course = ''; |
24 | -$courses = array (); |
|
24 | +$courses = array(); |
|
25 | 25 | $url_list = array(); |
26 | 26 | $users = array(); |
27 | 27 | |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | |
33 | 33 | /* Header */ |
34 | 34 | $tool_name = get_lang('AddCoursesToURL'); |
35 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
36 | -$interbreadcrumb[] = array ('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')); |
|
35 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
36 | +$interbreadcrumb[] = array('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')); |
|
37 | 37 | |
38 | 38 | Display :: display_header($tool_name); |
39 | 39 | |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | |
49 | 49 | if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
50 | 50 | $form_sent = $_POST['form_sent']; |
51 | - $courses = is_array($_POST['course_list']) ? $_POST['course_list'] : array() ; |
|
52 | - $url_list = is_array($_POST['url_list']) ? $_POST['url_list'] : array() ; |
|
51 | + $courses = is_array($_POST['course_list']) ? $_POST['course_list'] : array(); |
|
52 | + $url_list = is_array($_POST['url_list']) ? $_POST['url_list'] : array(); |
|
53 | 53 | $first_letter_course = $_POST['first_letter_course']; |
54 | 54 | |
55 | 55 | foreach ($users as $key => $value) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $sql = "SELECT count(*) as num_courses FROM $tbl_course"; |
71 | 71 | $result = Database::query($sql); |
72 | 72 | $num_row = Database::fetch_array($result); |
73 | - if ($num_row['num_courses']>1000) { |
|
73 | + if ($num_row['num_courses'] > 1000) { |
|
74 | 74 | //if there are too much num_courses to gracefully handle with the HTML select list, |
75 | 75 | // assign a default filter on users names |
76 | 76 | $first_letter_user = 'A'; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | <option value="">--</option> |
107 | 107 | <?php |
108 | 108 | echo Display :: get_alphabet_options($first_letter_course); |
109 | - echo Display :: get_numeric_options(0,9,$first_letter_course); |
|
109 | + echo Display :: get_numeric_options(0, 9, $first_letter_course); |
|
110 | 110 | ?> |
111 | 111 | </select> |
112 | 112 | </td> |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | <td width="40%" align="center"> |
120 | 120 | <select name="course_list[]" multiple="multiple" size="20" style="width:400px;"> |
121 | 121 | <?php foreach ($db_courses as $course) { ?> |
122 | - <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>><?php echo $course['title'].' ('.$course['code'].')'; ?> |
|
122 | + <option value="<?php echo $course['code']; ?>" <?php if (in_array($course['code'], $courses)) echo 'selected="selected"'; ?>><?php echo $course['title'].' ('.$course['code'].')'; ?> |
|
123 | 123 | </option> |
124 | 124 | <?php } ?> |
125 | 125 | </select> |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | <td width="40%" align="center"> |
131 | 131 | <select name="url_list[]" multiple="multiple" size="20" style="width:300px;"> |
132 | 132 | <?php foreach ($db_urls as $url_obj) { ?> |
133 | - <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) echo 'selected="selected"'; ?>><?php echo $url_obj['url']; ?> |
|
133 | + <option value="<?php echo $url_obj['id']; ?>" <?php if (in_array($url_obj['id'], $url_list)) echo 'selected="selected"'; ?>><?php echo $url_obj['url']; ?> |
|
134 | 134 | </option> |
135 | 135 | <?php } ?> |
136 | 136 | </select> |