@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | $session_category = ''; |
61 | 61 | |
62 | 62 | if (Database::num_rows($rs)>0) { |
63 | - $rows_session_category = Database::store_result($rs); |
|
64 | - $rows_session_category = $rows_session_category[0]; |
|
65 | - $session_category = $rows_session_category['name']; |
|
63 | + $rows_session_category = Database::store_result($rs); |
|
64 | + $rows_session_category = $rows_session_category[0]; |
|
65 | + $session_category = $rows_session_category['name']; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $action = isset($_GET['action']) ? $_GET['action'] : null; |
@@ -147,22 +147,22 @@ discard block |
||
147 | 147 | <td><?php echo get_lang('Date'); ?> :</td> |
148 | 148 | <td> |
149 | 149 | <?php |
150 | - if ($session['access_start_date'] == '00-00-0000' && $session['access_end_date']== '00-00-0000' ) { |
|
151 | - echo get_lang('NoTimeLimits'); |
|
150 | + if ($session['access_start_date'] == '00-00-0000' && $session['access_end_date']== '00-00-0000' ) { |
|
151 | + echo get_lang('NoTimeLimits'); |
|
152 | 152 | } |
153 | - else { |
|
153 | + else { |
|
154 | 154 | if ($session['access_start_date'] != '00-00-0000') { |
155 | - //$session['date_start'] = Display::tag('i', get_lang('NoTimeLimits')); |
|
155 | + //$session['date_start'] = Display::tag('i', get_lang('NoTimeLimits')); |
|
156 | 156 | $session['access_start_date'] = get_lang('From').' '.$session['access_start_date']; |
157 | 157 | } else { |
158 | - $session['access_start_date'] = ''; |
|
158 | + $session['access_start_date'] = ''; |
|
159 | 159 | } |
160 | 160 | if ($session['access_end_date'] == '00-00-0000') { |
161 | 161 | $session['access_end_date'] =''; |
162 | 162 | } else { |
163 | - $session['access_end_date'] = get_lang('Until').' '.$session['access_end_date']; |
|
163 | + $session['access_end_date'] = get_lang('Until').' '.$session['access_end_date']; |
|
164 | 164 | } |
165 | - echo $session['access_start_date'].' '.$session['access_end_date']; |
|
165 | + echo $session['access_start_date'].' '.$session['access_end_date']; |
|
166 | 166 | } |
167 | 167 | ?> |
168 | 168 | </td> |
@@ -221,22 +221,22 @@ discard block |
||
221 | 221 | </tr> |
222 | 222 | <?php |
223 | 223 | if ($session['nbr_courses'] == 0) { |
224 | - echo '<tr> |
|
224 | + echo '<tr> |
|
225 | 225 | <td colspan="4">'.get_lang('NoCoursesForThisSession').'</td> |
226 | 226 | </tr>'; |
227 | 227 | } else { |
228 | - // select the courses |
|
229 | - $sql = "SELECT c.id, code,title,visual_code, nbr_users |
|
228 | + // select the courses |
|
229 | + $sql = "SELECT c.id, code,title,visual_code, nbr_users |
|
230 | 230 | FROM $tbl_course c,$tbl_session_rel_course sc |
231 | 231 | WHERE c.id = sc.c_id |
232 | 232 | AND session_id='$id_session' |
233 | 233 | ORDER BY title"; |
234 | - $result=Database::query($sql); |
|
235 | - $courses=Database::store_result($result); |
|
236 | - foreach ($courses as $course) { |
|
237 | - //select the number of users |
|
234 | + $result=Database::query($sql); |
|
235 | + $courses=Database::store_result($result); |
|
236 | + foreach ($courses as $course) { |
|
237 | + //select the number of users |
|
238 | 238 | |
239 | - $sql = "SELECT count(*) FROM $tbl_session_rel_user sru, $tbl_session_rel_course_rel_user srcru |
|
239 | + $sql = "SELECT count(*) FROM $tbl_session_rel_user sru, $tbl_session_rel_course_rel_user srcru |
|
240 | 240 | WHERE |
241 | 241 | srcru.user_id = sru.user_id AND |
242 | 242 | srcru.session_id = sru.session_id AND |
@@ -244,49 +244,49 @@ discard block |
||
244 | 244 | sru.relation_type<>".SESSION_RELATION_TYPE_RRHH." AND |
245 | 245 | srcru.session_id = '".intval($id_session)."'"; |
246 | 246 | |
247 | - $rs = Database::query($sql); |
|
248 | - $course['nbr_users'] = Database::result($rs,0,0); |
|
247 | + $rs = Database::query($sql); |
|
248 | + $course['nbr_users'] = Database::result($rs,0,0); |
|
249 | 249 | |
250 | - // Get coachs of the courses in session |
|
250 | + // Get coachs of the courses in session |
|
251 | 251 | |
252 | - $sql = "SELECT user.lastname,user.firstname,user.username |
|
252 | + $sql = "SELECT user.lastname,user.firstname,user.username |
|
253 | 253 | FROM $tbl_session_rel_course_rel_user session_rcru, $tbl_user user |
254 | 254 | WHERE |
255 | 255 | session_rcru.user_id = user.user_id AND |
256 | 256 | session_rcru.session_id = '".intval($id_session)."' AND |
257 | 257 | session_rcru.c_id ='".Database::escape_string($course['id'])."' AND |
258 | 258 | session_rcru.status=2"; |
259 | - $rs = Database::query($sql); |
|
259 | + $rs = Database::query($sql); |
|
260 | 260 | |
261 | - $coachs = array(); |
|
262 | - if (Database::num_rows($rs) > 0) { |
|
263 | - while ($info_coach = Database::fetch_array($rs)) { |
|
261 | + $coachs = array(); |
|
262 | + if (Database::num_rows($rs) > 0) { |
|
263 | + while ($info_coach = Database::fetch_array($rs)) { |
|
264 | 264 | $coachs[] = api_get_person_name( |
265 | 265 | $info_coach['firstname'], |
266 | 266 | $info_coach['lastname'] |
267 | 267 | ).' ('.$info_coach['username'].')'; |
268 | - } |
|
269 | - } else { |
|
270 | - $coach = get_lang('None'); |
|
271 | - } |
|
272 | - |
|
273 | - if (count($coachs) > 0) { |
|
274 | - $coach = implode('<br />',$coachs); |
|
275 | - } else { |
|
276 | - $coach = get_lang('None'); |
|
277 | - } |
|
278 | - |
|
279 | - $orig_param = '&origin=resume_session'; |
|
280 | - //hide_course_breadcrumb the parameter has been added to hide the |
|
268 | + } |
|
269 | + } else { |
|
270 | + $coach = get_lang('None'); |
|
271 | + } |
|
272 | + |
|
273 | + if (count($coachs) > 0) { |
|
274 | + $coach = implode('<br />',$coachs); |
|
275 | + } else { |
|
276 | + $coach = get_lang('None'); |
|
277 | + } |
|
278 | + |
|
279 | + $orig_param = '&origin=resume_session'; |
|
280 | + //hide_course_breadcrumb the parameter has been added to hide the |
|
281 | 281 | // name of the course, that appeared in the default $interbreadcrumb |
282 | - echo ' |
|
282 | + echo ' |
|
283 | 283 | <tr> |
284 | 284 | <td>'.Display::url($course['title'].' ('.$course['visual_code'].')', api_get_path(WEB_COURSE_PATH).$course['code'].'/?id_session='.$id_session),'</td> |
285 | 285 | <td>'.$coach.'</td> |
286 | 286 | <td>'.$course['nbr_users'].'</td> |
287 | 287 | |
288 | 288 | </tr>'; |
289 | - } |
|
289 | + } |
|
290 | 290 | } |
291 | 291 | ?> |
292 | 292 | </table> |
@@ -307,11 +307,11 @@ discard block |
||
307 | 307 | <?php |
308 | 308 | |
309 | 309 | if ($session['nbr_users']==0) { |
310 | - echo '<tr> |
|
310 | + echo '<tr> |
|
311 | 311 | <td colspan="2">'.get_lang('NoUsersForThisSession').'</td> |
312 | 312 | </tr>'; |
313 | 313 | } else { |
314 | - $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; |
|
314 | + $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; |
|
315 | 315 | |
316 | 316 | if ($multiple_url_is_on) { |
317 | 317 | $sql = "SELECT u.user_id, lastname, firstname, username, access_url_id |
@@ -329,11 +329,11 @@ discard block |
||
329 | 329 | AND su.session_id = ".$id_session.$order_clause; |
330 | 330 | } |
331 | 331 | |
332 | - $result = Database::query($sql); |
|
333 | - $users = Database::store_result($result); |
|
332 | + $result = Database::query($sql); |
|
333 | + $users = Database::store_result($result); |
|
334 | 334 | // change breadcrumb in destination page |
335 | - $orig_param = '&origin=resume_session&id_session='.$id_session; |
|
336 | - foreach ($users as $user) { |
|
335 | + $orig_param = '&origin=resume_session&id_session='.$id_session; |
|
336 | + foreach ($users as $user) { |
|
337 | 337 | $user_link = ''; |
338 | 338 | if (!empty($user['user_id'])) { |
339 | 339 | $user_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_information.php?user_id='.intval($user['user_id']).'">'. |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | } |
351 | 351 | } |
352 | 352 | |
353 | - echo '<tr> |
|
353 | + echo '<tr> |
|
354 | 354 | <td width="90%"> |
355 | 355 | '.$user_link.' |
356 | 356 | </td> |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | '.$link_to_add_user_in_url.' |
362 | 362 | </td> |
363 | 363 | </tr>'; |
364 | - } |
|
364 | + } |
|
365 | 365 | } |
366 | 366 | ?> |
367 | 367 | </table> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | // setting the section (for the tabs) |
13 | 13 | $this_section = SECTION_PLATFORM_ADMIN; |
14 | -$id_session = (int)$_GET['id_session']; |
|
14 | +$id_session = (int) $_GET['id_session']; |
|
15 | 15 | SessionManager::protect_teacher_session_edit($id_session); |
16 | 16 | |
17 | 17 | $tool_name = get_lang('SessionOverview'); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $rs = Database::query($sql); |
60 | 60 | $session_category = ''; |
61 | 61 | |
62 | - if (Database::num_rows($rs)>0) { |
|
62 | + if (Database::num_rows($rs) > 0) { |
|
63 | 63 | $rows_session_category = Database::store_result($rs); |
64 | 64 | $rows_session_category = $rows_session_category[0]; |
65 | 65 | $session_category = $rows_session_category['name']; |
@@ -83,25 +83,25 @@ discard block |
||
83 | 83 | break; |
84 | 84 | case 'delete': |
85 | 85 | $idChecked = $_GET['idChecked']; |
86 | - if(is_array($idChecked)) { |
|
86 | + if (is_array($idChecked)) { |
|
87 | 87 | $my_temp = array(); |
88 | - foreach ($idChecked as $id){ |
|
88 | + foreach ($idChecked as $id) { |
|
89 | 89 | $courseInfo = api_get_course_info($id); |
90 | - $my_temp[]= $courseInfo['real_id'];// forcing the escape_string |
|
90 | + $my_temp[] = $courseInfo['real_id']; // forcing the escape_string |
|
91 | 91 | } |
92 | 92 | $idChecked = $my_temp; |
93 | 93 | $idChecked = "'".implode("','", $idChecked)."'"; |
94 | 94 | |
95 | 95 | $result = Database::query("DELETE FROM $tbl_session_rel_course WHERE session_id='$id_session' AND c_id IN($idChecked)"); |
96 | - $nbr_affected_rows=Database::affected_rows($result); |
|
96 | + $nbr_affected_rows = Database::affected_rows($result); |
|
97 | 97 | |
98 | 98 | Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE session_id='$id_session' AND c_id IN($idChecked)"); |
99 | 99 | Database::query("UPDATE $tbl_session SET nbr_courses=nbr_courses-$nbr_affected_rows WHERE id='$id_session'"); |
100 | 100 | } |
101 | 101 | |
102 | - if (!empty($_GET['class'])){ |
|
102 | + if (!empty($_GET['class'])) { |
|
103 | 103 | $result = Database::query("DELETE FROM $tbl_session_rel_class WHERE session_id='$id_session' AND class_id=".intval($_GET['class'])); |
104 | - $nbr_affected_rows=Database::affected_rows($result); |
|
104 | + $nbr_affected_rows = Database::affected_rows($result); |
|
105 | 105 | Database::query("UPDATE $tbl_session SET nbr_classes=nbr_classes-$nbr_affected_rows WHERE id='$id_session'"); |
106 | 106 | } |
107 | 107 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | Database::query("UPDATE $tbl_session SET nbr_users=nbr_users-$nbr_affected_rows WHERE id='$id_session'"); |
112 | 112 | |
113 | 113 | $result = Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE session_id ='$id_session' AND user_id=".intval($_GET['user'])); |
114 | - $nbr_affected_rows=Database::affected_rows($result); |
|
114 | + $nbr_affected_rows = Database::affected_rows($result); |
|
115 | 115 | |
116 | 116 | Database::query("UPDATE $tbl_session_rel_course SET nbr_users=nbr_users-$nbr_affected_rows WHERE session_id ='$id_session'"); |
117 | 117 | } |
@@ -137,28 +137,28 @@ discard block |
||
137 | 137 | <td><?php echo get_lang('GeneralCoach'); ?> :</td> |
138 | 138 | <td><?php echo api_get_person_name($session['firstname'], $session['lastname']).' ('.$session['username'].')' ?></td> |
139 | 139 | </tr> |
140 | - <?php if(!empty($session_category)) { ?> |
|
140 | + <?php if (!empty($session_category)) { ?> |
|
141 | 141 | <tr> |
142 | 142 | <td><?php echo get_lang('SessionCategory') ?></td> |
143 | - <td><?php echo $session_category; ?></td> |
|
143 | + <td><?php echo $session_category; ?></td> |
|
144 | 144 | </tr> |
145 | 145 | <?php } ?> |
146 | 146 | <tr> |
147 | 147 | <td><?php echo get_lang('Date'); ?> :</td> |
148 | 148 | <td> |
149 | 149 | <?php |
150 | - if ($session['access_start_date'] == '00-00-0000' && $session['access_end_date']== '00-00-0000' ) { |
|
150 | + if ($session['access_start_date'] == '00-00-0000' && $session['access_end_date'] == '00-00-0000') { |
|
151 | 151 | echo get_lang('NoTimeLimits'); |
152 | 152 | } |
153 | 153 | else { |
154 | 154 | if ($session['access_start_date'] != '00-00-0000') { |
155 | 155 | //$session['date_start'] = Display::tag('i', get_lang('NoTimeLimits')); |
156 | - $session['access_start_date'] = get_lang('From').' '.$session['access_start_date']; |
|
156 | + $session['access_start_date'] = get_lang('From').' '.$session['access_start_date']; |
|
157 | 157 | } else { |
158 | 158 | $session['access_start_date'] = ''; |
159 | 159 | } |
160 | 160 | if ($session['access_end_date'] == '00-00-0000') { |
161 | - $session['access_end_date'] =''; |
|
161 | + $session['access_end_date'] = ''; |
|
162 | 162 | } else { |
163 | 163 | $session['access_end_date'] = get_lang('Until').' '.$session['access_end_date']; |
164 | 164 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | <?php echo api_ucfirst(get_lang('SessionVisibility')) ?> : |
190 | 190 | </td> |
191 | 191 | <td> |
192 | - <?php if ($session['visibility']==1) echo get_lang('ReadOnly'); elseif($session['visibility']==2) echo get_lang('Visible');elseif($session['visibility']==3) echo api_ucfirst(get_lang('Invisible')) ?> |
|
192 | + <?php if ($session['visibility'] == 1) echo get_lang('ReadOnly'); elseif ($session['visibility'] == 2) echo get_lang('Visible'); elseif ($session['visibility'] == 3) echo api_ucfirst(get_lang('Invisible')) ?> |
|
193 | 193 | </td> |
194 | 194 | </tr> |
195 | 195 | <?php |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | echo '</td>'; |
202 | 202 | echo '<td>'; |
203 | 203 | $url_list = UrlManager::get_access_url_from_session($id_session); |
204 | - foreach($url_list as $url_data) { |
|
204 | + foreach ($url_list as $url_data) { |
|
205 | 205 | echo $url_data['url'].'<br />'; |
206 | 206 | } |
207 | 207 | echo '</td></tr>'; |
@@ -231,8 +231,8 @@ discard block |
||
231 | 231 | WHERE c.id = sc.c_id |
232 | 232 | AND session_id='$id_session' |
233 | 233 | ORDER BY title"; |
234 | - $result=Database::query($sql); |
|
235 | - $courses=Database::store_result($result); |
|
234 | + $result = Database::query($sql); |
|
235 | + $courses = Database::store_result($result); |
|
236 | 236 | foreach ($courses as $course) { |
237 | 237 | //select the number of users |
238 | 238 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | srcru.session_id = '".intval($id_session)."'"; |
246 | 246 | |
247 | 247 | $rs = Database::query($sql); |
248 | - $course['nbr_users'] = Database::result($rs,0,0); |
|
248 | + $course['nbr_users'] = Database::result($rs, 0, 0); |
|
249 | 249 | |
250 | 250 | // Get coachs of the courses in session |
251 | 251 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | if (count($coachs) > 0) { |
274 | - $coach = implode('<br />',$coachs); |
|
274 | + $coach = implode('<br />', $coachs); |
|
275 | 275 | } else { |
276 | 276 | $coach = get_lang('None'); |
277 | 277 | } |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | // name of the course, that appeared in the default $interbreadcrumb |
282 | 282 | echo ' |
283 | 283 | <tr> |
284 | - <td>'.Display::url($course['title'].' ('.$course['visual_code'].')', api_get_path(WEB_COURSE_PATH).$course['code'].'/?id_session='.$id_session),'</td> |
|
284 | + <td>'.Display::url($course['title'].' ('.$course['visual_code'].')', api_get_path(WEB_COURSE_PATH).$course['code'].'/?id_session='.$id_session), '</td> |
|
285 | 285 | <td>'.$coach.'</td> |
286 | 286 | <td>'.$course['nbr_users'].'</td> |
287 | 287 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | </tr> |
307 | 307 | <?php |
308 | 308 | |
309 | - if ($session['nbr_users']==0) { |
|
309 | + if ($session['nbr_users'] == 0) { |
|
310 | 310 | echo '<tr> |
311 | 311 | <td colspan="2">'.get_lang('NoUsersForThisSession').'</td> |
312 | 312 | </tr>'; |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $user_link = ''; |
338 | 338 | if (!empty($user['user_id'])) { |
339 | 339 | $user_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_information.php?user_id='.intval($user['user_id']).'">'. |
340 | - api_htmlentities(api_get_person_name($user['firstname'], $user['lastname']),ENT_QUOTES,$charset).' ('.$user['username'].')</a>'; |
|
340 | + api_htmlentities(api_get_person_name($user['firstname'], $user['lastname']), ENT_QUOTES, $charset).' ('.$user['username'].')</a>'; |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | $link_to_add_user_in_url = ''; |
@@ -149,8 +149,7 @@ discard block |
||
149 | 149 | <?php |
150 | 150 | if ($session['access_start_date'] == '00-00-0000' && $session['access_end_date']== '00-00-0000' ) { |
151 | 151 | echo get_lang('NoTimeLimits'); |
152 | - } |
|
153 | - else { |
|
152 | + } else { |
|
154 | 153 | if ($session['access_start_date'] != '00-00-0000') { |
155 | 154 | //$session['date_start'] = Display::tag('i', get_lang('NoTimeLimits')); |
156 | 155 | $session['access_start_date'] = get_lang('From').' '.$session['access_start_date']; |
@@ -189,12 +188,18 @@ discard block |
||
189 | 188 | <?php echo api_ucfirst(get_lang('SessionVisibility')) ?> : |
190 | 189 | </td> |
191 | 190 | <td> |
192 | - <?php if ($session['visibility']==1) echo get_lang('ReadOnly'); elseif($session['visibility']==2) echo get_lang('Visible');elseif($session['visibility']==3) echo api_ucfirst(get_lang('Invisible')) ?> |
|
191 | + <?php if ($session['visibility']==1) { |
|
192 | + echo get_lang('ReadOnly'); |
|
193 | +} elseif($session['visibility']==2) { |
|
194 | + echo get_lang('Visible'); |
|
195 | +} elseif($session['visibility']==3) { |
|
196 | + echo api_ucfirst(get_lang('Invisible')) ?> |
|
193 | 197 | </td> |
194 | 198 | </tr> |
195 | 199 | <?php |
196 | 200 | |
197 | 201 | $multiple_url_is_on = api_get_multiple_access_url(); |
202 | +} |
|
198 | 203 | if ($multiple_url_is_on) { |
199 | 204 | echo '<tr><td>'; |
200 | 205 | echo 'URL'; |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | array('name'=>'access_end_date', 'index'=>'access_end_date', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
66 | 66 | array('name'=>'coach_name', 'index'=>'coach_name', 'width'=>'80', 'align'=>'left', 'search' => 'false'), |
67 | 67 | array('name'=>'status', 'index'=>'session_active','width'=>'40', 'align'=>'left', 'search' => 'true', 'stype'=>'select', |
68 | - //for the bottom bar |
|
68 | + //for the bottom bar |
|
69 | 69 | 'searchoptions' => array( |
70 | 70 | 'defaultValue' => '1', |
71 | 71 | 'value' => '1:'.get_lang('Active').';0:'.get_lang('Inactive') |
72 | 72 | ), |
73 | - //for the top bar |
|
74 | - 'editoptions' => array('value' => ':'.get_lang('All').';1:'.get_lang('Active').';0:'.get_lang('Inactive'))), |
|
73 | + //for the top bar |
|
74 | + 'editoptions' => array('value' => ':'.get_lang('All').';1:'.get_lang('Active').';0:'.get_lang('Inactive'))), |
|
75 | 75 | array('name'=>'visibility', 'index'=>'visibility', 'width'=>'40', 'align'=>'left', 'search' => 'false'), |
76 | 76 | array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false', 'search' => 'false') |
77 | 77 | ); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | //With this function we can add actions to the jgrid (edit, delete, etc) |
87 | 87 | $action_links = 'function action_formatter(cellvalue, options, rowObject) { |
88 | 88 | return \' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png',get_lang('SubscribeUsersToSession'),'',ICON_SIZE_SMALL).'</a>'. |
89 | - '\'; |
|
89 | + '\'; |
|
90 | 90 | }'; |
91 | 91 | ?> |
92 | 92 | <script> |
@@ -56,15 +56,15 @@ discard block |
||
56 | 56 | ); |
57 | 57 | |
58 | 58 | //Column config |
59 | - $column_model = array( |
|
60 | - array('name'=>'name', 'index'=>'name', 'width'=>'160', 'align'=>'left', 'search' => 'true', 'wrap_cell' => "true"), |
|
61 | - array('name'=>'nbr_courses', 'index'=>'nbr_courses', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
62 | - array('name'=>'nbr_users', 'index'=>'nbr_users', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
63 | - array('name'=>'category_name', 'index'=>'category_name', 'width'=>'70', 'align'=>'left', 'search' => 'true'), |
|
64 | - array('name'=>'access_start_date', 'index'=>'access_start_date', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
|
65 | - array('name'=>'access_end_date', 'index'=>'access_end_date', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
|
66 | - array('name'=>'coach_name', 'index'=>'coach_name', 'width'=>'80', 'align'=>'left', 'search' => 'false'), |
|
67 | - array('name'=>'status', 'index'=>'session_active','width'=>'40', 'align'=>'left', 'search' => 'true', 'stype'=>'select', |
|
59 | + $column_model = array( |
|
60 | + array('name'=>'name', 'index'=>'name', 'width'=>'160', 'align'=>'left', 'search' => 'true', 'wrap_cell' => "true"), |
|
61 | + array('name'=>'nbr_courses', 'index'=>'nbr_courses', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
62 | + array('name'=>'nbr_users', 'index'=>'nbr_users', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
63 | + array('name'=>'category_name', 'index'=>'category_name', 'width'=>'70', 'align'=>'left', 'search' => 'true'), |
|
64 | + array('name'=>'access_start_date', 'index'=>'access_start_date', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
|
65 | + array('name'=>'access_end_date', 'index'=>'access_end_date', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
|
66 | + array('name'=>'coach_name', 'index'=>'coach_name', 'width'=>'80', 'align'=>'left', 'search' => 'false'), |
|
67 | + array('name'=>'status', 'index'=>'session_active', 'width'=>'40', 'align'=>'left', 'search' => 'true', 'stype'=>'select', |
|
68 | 68 | //for the bottom bar |
69 | 69 | 'searchoptions' => array( |
70 | 70 | 'defaultValue' => '1', |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | ), |
73 | 73 | //for the top bar |
74 | 74 | 'editoptions' => array('value' => ':'.get_lang('All').';1:'.get_lang('Active').';0:'.get_lang('Inactive'))), |
75 | - array('name'=>'visibility', 'index'=>'visibility', 'width'=>'40', 'align'=>'left', 'search' => 'false'), |
|
76 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false', 'search' => 'false') |
|
75 | + array('name'=>'visibility', 'index'=>'visibility', 'width'=>'40', 'align'=>'left', 'search' => 'false'), |
|
76 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left', 'formatter'=>'action_formatter', 'sortable'=>'false', 'search' => 'false') |
|
77 | 77 | ); |
78 | 78 | //Autowidth |
79 | 79 | $extra_params['autowidth'] = 'true'; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | //With this function we can add actions to the jgrid (edit, delete, etc) |
87 | 87 | $action_links = 'function action_formatter(cellvalue, options, rowObject) { |
88 | - return \' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png',get_lang('SubscribeUsersToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
88 | + return \' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png', get_lang('SubscribeUsersToSession'), '', ICON_SIZE_SMALL).'</a>'. |
|
89 | 89 | '\'; |
90 | 90 | }'; |
91 | 91 | ?> |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | $(function() { |
108 | 108 | <?php |
109 | - echo Display::grid_js('sessions', $url,$columns,$column_model,$extra_params, array(), $action_links,true); |
|
109 | + echo Display::grid_js('sessions', $url, $columns, $column_model, $extra_params, array(), $action_links, true); |
|
110 | 110 | ?> |
111 | 111 | |
112 | 112 | setSearchSelect("status"); |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | <?php if (api_is_platform_admin()) {?> |
149 | 149 | <div class="actions"> |
150 | 150 | <?php |
151 | - echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'.Display::return_icon('new_session.png',get_lang('AddSession'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
152 | - echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/add_many_session_to_category.php">'.Display::return_icon('session_to_category.png',get_lang('AddSessionsInCategories'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
153 | - echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_category_list.php">'.Display::return_icon('folder.png',get_lang('ListSessionCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
151 | + echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'.Display::return_icon('new_session.png', get_lang('AddSession'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
152 | + echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/add_many_session_to_category.php">'.Display::return_icon('session_to_category.png', get_lang('AddSessionsInCategories'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
153 | + echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_category_list.php">'.Display::return_icon('folder.png', get_lang('ListSessionCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
154 | 154 | echo '</div>'; |
155 | 155 | } |
156 | 156 | } else { |
@@ -146,7 +146,7 @@ |
||
146 | 146 | $(function() { |
147 | 147 | <?php |
148 | 148 | // grid definition see the $usergroup>display() function |
149 | - echo Display::grid_js('usergroups', $url, $columns, $columnModel, $extraParams, array(), '', true); |
|
149 | + echo Display::grid_js('usergroups', $url, $columns, $columnModel, $extraParams, array(), '', true); |
|
150 | 150 | ?> |
151 | 151 | }); |
152 | 152 | </script> |
@@ -12,9 +12,9 @@ |
||
12 | 12 | |
13 | 13 | $this_section = SECTION_COURSES; |
14 | 14 | |
15 | -$interbreadcrumb[]= array ('url' =>'classes.php','name' => get_lang('Classes')); |
|
15 | +$interbreadcrumb[] = array('url' =>'classes.php', 'name' => get_lang('Classes')); |
|
16 | 16 | if (isset($_GET['id'])) { |
17 | - $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Groups')); |
|
17 | + $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Groups')); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | Display :: display_header($tool_name, 'Classes'); |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | |
16 | 16 | $tool_name = get_lang('ImportUsersToACourse'); |
17 | 17 | |
18 | -$interbreadcrumb[] = array ("url" => "user.php", "name" => get_lang("Users")); |
|
19 | -$interbreadcrumb[] = array ("url" => "#", "name" => get_lang("ImportUsersToACourse")); |
|
18 | +$interbreadcrumb[] = array("url" => "user.php", "name" => get_lang("Users")); |
|
19 | +$interbreadcrumb[] = array("url" => "#", "name" => get_lang("ImportUsersToACourse")); |
|
20 | 20 | |
21 | 21 | $form = new FormValidator('user_import', 'post', 'user_import.php'); |
22 | 22 | $form->addElement('header', $tool_name); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if (isset($_FILES['import_file']['size']) && $_FILES['import_file']['size'] !== 0) { |
43 | 43 | $unsubscribe_users = isset($_POST['unsubscribe_users']) ? true : false; |
44 | 44 | //@todo : csvToArray deprecated |
45 | - $users = Import::csvToArray($_FILES['import_file']['tmp_name']); |
|
45 | + $users = Import::csvToArray($_FILES['import_file']['tmp_name']); |
|
46 | 46 | $invalid_users = array(); |
47 | 47 | $clean_users = array(); |
48 | 48 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $user_ids = array(); |
80 | 80 | foreach ($current_user_list as $user) { |
81 | 81 | if (!CourseManager::is_course_teacher($user['user_id'], $course_code)) { |
82 | - $user_ids[]= $user['user_id']; |
|
82 | + $user_ids[] = $user['user_id']; |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 | CourseManager::unsubscribe_user($user_ids, $course_code, $session_id); |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | if (empty($session_id)) { |
93 | 93 | //just to make sure |
94 | 94 | if (CourseManager :: is_user_subscribed_in_course($userId, $course_code)) { |
95 | - $user_to_show[]= $userInfo['complete_name']; |
|
95 | + $user_to_show[] = $userInfo['complete_name']; |
|
96 | 96 | } |
97 | 97 | } else { |
98 | 98 | //just to make sure |
99 | 99 | if (CourseManager::is_user_subscribed_in_course($userId, $course_code, true, $session_id)) { |
100 | - $user_to_show[]= $userInfo['complete_name']; |
|
100 | + $user_to_show[] = $userInfo['complete_name']; |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $message = get_lang('CheckUsersWithId'); |
106 | 106 | $type = 'warning'; |
107 | 107 | foreach ($invalid_users as $invalid_user) { |
108 | - $user_to_show[]= $invalid_user; |
|
108 | + $user_to_show[] = $invalid_user; |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | Display::display_warning_message($message.': <br />'.$userMessage, false); |
131 | 131 | } |
132 | 132 | } else { |
133 | - $empty_line_msg = ($empty_line == 0) ? get_lang('ErrorsWhenImportingFile'): get_lang('ErrorsWhenImportingFile').': '.get_lang('EmptyHeaderLine'); |
|
133 | + $empty_line_msg = ($empty_line == 0) ? get_lang('ErrorsWhenImportingFile') : get_lang('ErrorsWhenImportingFile').': '.get_lang('EmptyHeaderLine'); |
|
134 | 134 | Display::display_error_message($empty_line_msg); |
135 | 135 | } |
136 | 136 | } |
@@ -16,54 +16,54 @@ |
||
16 | 16 | * along with php-pens. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | */ |
18 | 18 | |
19 | - /** |
|
20 | - * PENSConfig |
|
21 | - * |
|
22 | - * Provides the PENSConfig class |
|
23 | - * |
|
24 | - * @package PENS |
|
25 | - * @author Guillaume Viguier-Just <[email protected]> |
|
26 | - * @licence http://www.gnu.org/licenses/gpl.txt |
|
27 | - */ |
|
19 | + /** |
|
20 | + * PENSConfig |
|
21 | + * |
|
22 | + * Provides the PENSConfig class |
|
23 | + * |
|
24 | + * @package PENS |
|
25 | + * @author Guillaume Viguier-Just <[email protected]> |
|
26 | + * @licence http://www.gnu.org/licenses/gpl.txt |
|
27 | + */ |
|
28 | 28 | |
29 | - /** |
|
30 | - * PENSConfig |
|
31 | - * |
|
32 | - * This class provides different static variables to configure php-pens. |
|
33 | - * |
|
34 | - * @package PENS |
|
35 | - * @author Guillaume Viguier-Just <[email protected]> |
|
36 | - * @licence http://www.gnu.org/licenses/gpl.txt |
|
37 | - */ |
|
29 | + /** |
|
30 | + * PENSConfig |
|
31 | + * |
|
32 | + * This class provides different static variables to configure php-pens. |
|
33 | + * |
|
34 | + * @package PENS |
|
35 | + * @author Guillaume Viguier-Just <[email protected]> |
|
36 | + * @licence http://www.gnu.org/licenses/gpl.txt |
|
37 | + */ |
|
38 | 38 | class PENSConfig { |
39 | 39 | |
40 | - /** |
|
41 | - * PENS version |
|
42 | - * @var string |
|
43 | - */ |
|
44 | - public static $version = "1.0.0"; |
|
40 | + /** |
|
41 | + * PENS version |
|
42 | + * @var string |
|
43 | + */ |
|
44 | + public static $version = "1.0.0"; |
|
45 | 45 | |
46 | - /** |
|
47 | - * Allowed commands |
|
48 | - * @var array |
|
49 | - */ |
|
50 | - public static $allowed_commands = array("collect", "receipt", "alert"); |
|
46 | + /** |
|
47 | + * Allowed commands |
|
48 | + * @var array |
|
49 | + */ |
|
50 | + public static $allowed_commands = array("collect", "receipt", "alert"); |
|
51 | 51 | |
52 | - /** |
|
53 | - * Allowed package types |
|
54 | - * @var array |
|
55 | - */ |
|
56 | - public static $allowed_package_types = array("aicc-pkg", "scorm-pif", "ims-qti"); |
|
52 | + /** |
|
53 | + * Allowed package types |
|
54 | + * @var array |
|
55 | + */ |
|
56 | + public static $allowed_package_types = array("aicc-pkg", "scorm-pif", "ims-qti"); |
|
57 | 57 | |
58 | - /** |
|
59 | - * Allowed package formats |
|
60 | - * @var array |
|
61 | - */ |
|
62 | - public static $allowed_package_formats = array("zip", "url", "jar", "war", "xml"); |
|
58 | + /** |
|
59 | + * Allowed package formats |
|
60 | + * @var array |
|
61 | + */ |
|
62 | + public static $allowed_package_formats = array("zip", "url", "jar", "war", "xml"); |
|
63 | 63 | |
64 | - /** |
|
65 | - * End of line as specified by the PENS specification |
|
66 | - * @var string |
|
67 | - */ |
|
68 | - public static $eol = "\r\n"; |
|
64 | + /** |
|
65 | + * End of line as specified by the PENS specification |
|
66 | + * @var string |
|
67 | + */ |
|
68 | + public static $eol = "\r\n"; |
|
69 | 69 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | if ($quota_bytes != 0) { |
88 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
88 | + $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $session[] = array(addslashes(get_lang('Teacher').': '.$user_name).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'),$user_name)), $quota_percentage); |
105 | 105 | |
106 | - } |
|
106 | + } |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | $quota_percentage = round(($total_quota_bytes - $used_quota_bytes)/$total_quota_bytes, 2)*100; |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | $session = array(); |
33 | 33 | $user_name = $user_info['complete_name']; |
34 | 34 | |
35 | -$course_list = SessionManager::get_course_list_by_session_id ($session_id); |
|
35 | +$course_list = SessionManager::get_course_list_by_session_id($session_id); |
|
36 | 36 | $session_list = SessionManager::get_session_by_course($course_id); |
37 | 37 | $total_quota_bytes = DocumentManager::get_course_quota(); |
38 | -$quota_bytes = DocumentManager::documents_total_space($course_id, 0 , 0); |
|
39 | -$quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
38 | +$quota_bytes = DocumentManager::documents_total_space($course_id, 0, 0); |
|
39 | +$quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
40 | 40 | |
41 | 41 | $session[] = array(get_lang('Course').' ('.format_file_size($quota_bytes).')', $quota_percentage); |
42 | 42 | |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | foreach ($session_list as $session_data) { |
47 | 47 | $quota_percentage = 0; |
48 | 48 | $quota_bytes = intval(DocumentManager::documents_total_space($course_id, null, $session_data['id'])); |
49 | - if (!empty($quota_bytes)) { |
|
50 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
49 | + if (!empty($quota_bytes)) { |
|
50 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
51 | 51 | } |
52 | 52 | if ($session_id == $session_data['id']) { |
53 | - $session_data['name'] = $session_data['name'] . ' * '; |
|
53 | + $session_data['name'] = $session_data['name'].' * '; |
|
54 | 54 | } |
55 | 55 | $used_quota_bytes += $quota_bytes; |
56 | 56 | $session[] = array( |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | $quota_percentage = 0; |
67 | 67 | $my_group_id = $group_data['id']; |
68 | 68 | $quota_bytes = intval(DocumentManager::documents_total_space($course_id, $my_group_id, 0)); |
69 | - if (!empty($quota_bytes)) { |
|
70 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
69 | + if (!empty($quota_bytes)) { |
|
70 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
71 | 71 | } |
72 | 72 | if ($group_id == $my_group_id) { |
73 | - $group_data['name'] = $group_data['name'] . ' * '; |
|
73 | + $group_data['name'] = $group_data['name'].' * '; |
|
74 | 74 | } |
75 | 75 | $used_quota_bytes += $quota_bytes; |
76 | 76 | $session[] = array(addslashes(get_lang('Group').': '.$group_data['name']).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | if ($quota_bytes != 0) { |
88 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
88 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $session[] = array(addslashes(get_lang('Teacher').': '.$user_name).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -100,15 +100,15 @@ discard block |
||
100 | 100 | } |
101 | 101 | } |
102 | 102 | if ($quota_bytes != 0) { |
103 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
103 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
104 | 104 | } |
105 | 105 | } |
106 | - $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'),$user_name)), $quota_percentage); |
|
106 | + $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'), $user_name)), $quota_percentage); |
|
107 | 107 | |
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
111 | -$quota_percentage = round(($total_quota_bytes - $used_quota_bytes)/$total_quota_bytes, 2)*100; |
|
111 | +$quota_percentage = round(($total_quota_bytes - $used_quota_bytes) / $total_quota_bytes, 2) * 100; |
|
112 | 112 | $session[] = array(addslashes(get_lang('ShowCourseQuotaUse')).' ('.format_file_size($total_quota_bytes - $used_quota_bytes).') ', $quota_percentage); |
113 | 113 | $quota_data = json_encode($session); |
114 | 114 |
@@ -261,7 +261,7 @@ |
||
261 | 261 | ?> |
262 | 262 | <option value="<?php echo $enreg['user_id']; ?>"><?php echo $enreg['username'].' - '.api_get_person_name($enreg['firstname'], $enreg['lastname']); ?></option> |
263 | 263 | <?php |
264 | - } |
|
264 | + } |
|
265 | 265 | unset($nosessionUsersList); |
266 | 266 | ?> |
267 | 267 | </select> |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | function send() { |
60 | 60 | if (document.formulaire.access_url_id.value!=0) { |
61 | 61 | document.formulaire.form_sent.value=0; |
62 | - document.formulaire.add_type.value=\'' . $add_type . '\'; |
|
62 | + document.formulaire.add_type.value=\'' . $add_type.'\'; |
|
63 | 63 | document.formulaire.submit(); |
64 | 64 | } |
65 | 65 | } |
@@ -95,17 +95,17 @@ discard block |
||
95 | 95 | $result = UrlManager::update_urls_rel_user($UserList, $access_url_id); |
96 | 96 | $url_info = UrlManager::get_url_data_from_id($access_url_id); |
97 | 97 | if (!empty($result)) { |
98 | - $message .= 'URL: ' . $url_info['url'] . '<br />'; |
|
98 | + $message .= 'URL: '.$url_info['url'].'<br />'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | if (!empty($result['users_added'])) { |
102 | - $message .= '<h4>' . get_lang('UsersAdded') . ':</h4>'; |
|
102 | + $message .= '<h4>'.get_lang('UsersAdded').':</h4>'; |
|
103 | 103 | $i = 1; |
104 | 104 | $user_added_list = array(); |
105 | 105 | foreach ($result['users_added'] as $user) { |
106 | 106 | $user_info = api_get_user_info($user); |
107 | 107 | if (!empty($user_info)) { |
108 | - $user_added_list[] = $i . '. ' . api_get_person_name($user_info['firstname'], $user_info['lastname'], null, null, null, null, $user_info['username']); |
|
108 | + $user_added_list[] = $i.'. '.api_get_person_name($user_info['firstname'], $user_info['lastname'], null, null, null, null, $user_info['username']); |
|
109 | 109 | $i++; |
110 | 110 | } |
111 | 111 | } |
@@ -115,13 +115,13 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | if (!empty($result['users_deleted'])) { |
118 | - $message .= '<br /><h4>' . get_lang('UsersDeleted') . ': </h4>'; |
|
118 | + $message .= '<br /><h4>'.get_lang('UsersDeleted').': </h4>'; |
|
119 | 119 | $user_deleted_list = array(); |
120 | 120 | $i = 1; |
121 | 121 | foreach ($result['users_deleted'] as $user) { |
122 | 122 | $user_info = api_get_user_info($user); |
123 | 123 | if (!empty($user_info)) { |
124 | - $user_deleted_list [] = $i . '. ' . api_get_person_name($user_info['firstname'], $user_info['lastname']); |
|
124 | + $user_deleted_list [] = $i.'. '.api_get_person_name($user_info['firstname'], $user_info['lastname']); |
|
125 | 125 | $i++; |
126 | 126 | } |
127 | 127 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | echo '<div class="actions">'; |
143 | 143 | echo Display::url( |
144 | 144 | Display::return_icon('view_more_stats.gif', get_lang('AddUserToURL'), ''), |
145 | - api_get_path(WEB_CODE_PATH) . 'admin/access_url_add_users_to_url.php' |
|
145 | + api_get_path(WEB_CODE_PATH).'admin/access_url_add_users_to_url.php' |
|
146 | 146 | ); |
147 | 147 | echo '</div>'; |
148 | 148 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | } |
168 | 168 | |
169 | 169 | $sql = "SELECT u.user_id, lastname, firstname, username |
170 | - FROM $tbl_user u WHERE status <> " . ANONYMOUS . " " . |
|
170 | + FROM $tbl_user u WHERE status <> ".ANONYMOUS." ". |
|
171 | 171 | $order_clause; |
172 | 172 | $result = Database::query($sql); |
173 | 173 | $Users = Database::store_result($result); |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | if ($add_type == 'multiple') { |
183 | - $link_add_type_unique = '<a href="' . api_get_self() . '?add_type=unique&access_url_id=' . $access_url_id . '">' . get_lang('SessionAddTypeUnique') . '</a>'; |
|
183 | + $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeUnique').'</a>'; |
|
184 | 184 | $link_add_type_multiple = get_lang('SessionAddTypeMultiple'); |
185 | 185 | } else { |
186 | 186 | $link_add_type_unique = get_lang('SessionAddTypeUnique'); |
187 | - $link_add_type_multiple = '<a href="' . api_get_self() . '?add_type=multiple&access_url_id=' . $access_url_id . '">' . get_lang('SessionAddTypeMultiple') . '</a>'; |
|
187 | + $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeMultiple').'</a>'; |
|
188 | 188 | } |
189 | 189 | $url_list = UrlManager::get_url_data(); |
190 | 190 | ?> |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>" style="margin:0px;" <?php if ($ajax_search) { |
197 | 197 | echo ' onsubmit="valide();"'; |
198 | 198 | } ?> > |
199 | - <?php echo get_lang('SelectUrl') . ' : '; ?> |
|
199 | + <?php echo get_lang('SelectUrl').' : '; ?> |
|
200 | 200 | <select name="access_url_id" onchange="javascript:send();"> |
201 | 201 | <option value="0"> <?php echo get_lang('SelectUrl') ?></option> |
202 | 202 | <?php |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | <td> |
233 | 233 | <h3> |
234 | 234 | <?php |
235 | - $total_users = count($nosessionUsersList) + count($sessionUsersList); |
|
235 | + $total_users = count($nosessionUsersList) + count($sessionUsersList); |
|
236 | 236 | echo get_lang('TotalAvailableUsers').' '.$total_users; |
237 | 237 | ?> |
238 | 238 | </h3> |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | <td align="center"><b><?php echo get_lang('UserListInPlatform') ?> : <?php echo count($nosessionUsersList); ?></b> |
243 | 243 | </td> |
244 | 244 | <td></td> |
245 | - <td align="center"><b><?php echo get_lang('UserListIn') . ' ' . $url_selected; ?> : <?php echo count($sessionUsersList); ?></b></td> |
|
245 | + <td align="center"><b><?php echo get_lang('UserListIn').' '.$url_selected; ?> : <?php echo count($sessionUsersList); ?></b></td> |
|
246 | 246 | </tr> |
247 | 247 | <tr> |
248 | 248 | <td align="center"> |
@@ -302,9 +302,9 @@ discard block |
||
302 | 302 | <br /> |
303 | 303 | <?php |
304 | 304 | if (isset($_GET['add'])) { |
305 | - echo '<button class="save" type="button" onclick="valide()" >' . get_lang('AddUsersToURL') . '</button>'; |
|
305 | + echo '<button class="save" type="button" onclick="valide()" >'.get_lang('AddUsersToURL').'</button>'; |
|
306 | 306 | } else { |
307 | - echo '<button class="save" type="button" onclick="valide()" >' . get_lang('EditUsersToURL') . '</button>'; |
|
307 | + echo '<button class="save" type="button" onclick="valide()" >'.get_lang('EditUsersToURL').'</button>'; |
|
308 | 308 | } |
309 | 309 | ?> |
310 | 310 | </td> |
@@ -15,15 +15,15 @@ |
||
15 | 15 | Display::display_header($tool_name); |
16 | 16 | //api_display_tool_title($tool_name); |
17 | 17 | if (api_get_setting('server_type') != 'test') { |
18 | - echo get_lang('DummyCourseOnlyOnTestServer'); |
|
18 | + echo get_lang('DummyCourseOnlyOnTestServer'); |
|
19 | 19 | } elseif( isset($_POST['action'])) { |
20 | - require_once('../coursecopy/classes/DummyCourseCreator.class.php'); |
|
21 | - $dcc = new DummyCourseCreator(); |
|
22 | - $dcc->create_dummy_course($_POST['course_code']); |
|
23 | - echo get_lang('Done'); |
|
20 | + require_once('../coursecopy/classes/DummyCourseCreator.class.php'); |
|
21 | + $dcc = new DummyCourseCreator(); |
|
22 | + $dcc->create_dummy_course($_POST['course_code']); |
|
23 | + echo get_lang('Done'); |
|
24 | 24 | } else { |
25 | - echo get_lang('DummyCourseDescription'); |
|
26 | - echo '<form method="post"><input type="hidden" name="course_code" value="'.Security::remove_XSS($_GET['course_code']).'"/><input type="submit" name="action" value="'.get_lang('Ok').'"/></form>'; |
|
25 | + echo get_lang('DummyCourseDescription'); |
|
26 | + echo '<form method="post"><input type="hidden" name="course_code" value="'.Security::remove_XSS($_GET['course_code']).'"/><input type="submit" name="action" value="'.get_lang('Ok').'"/></form>'; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | Display::display_footer(); |
@@ -7,16 +7,16 @@ |
||
7 | 7 | * @package chamilo.admin |
8 | 8 | */ |
9 | 9 | require_once __DIR__.'/../inc/global.inc.php'; |
10 | -$this_section=SECTION_PLATFORM_ADMIN; |
|
10 | +$this_section = SECTION_PLATFORM_ADMIN; |
|
11 | 11 | |
12 | 12 | api_protect_admin_script(); |
13 | 13 | $tool_name = get_lang('DummyCourseCreator'); |
14 | -$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin')); |
|
14 | +$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin')); |
|
15 | 15 | Display::display_header($tool_name); |
16 | 16 | //api_display_tool_title($tool_name); |
17 | 17 | if (api_get_setting('server_type') != 'test') { |
18 | 18 | echo get_lang('DummyCourseOnlyOnTestServer'); |
19 | -} elseif( isset($_POST['action'])) { |
|
19 | +} elseif (isset($_POST['action'])) { |
|
20 | 20 | require_once('../coursecopy/classes/DummyCourseCreator.class.php'); |
21 | 21 | $dcc = new DummyCourseCreator(); |
22 | 22 | $dcc->create_dummy_course($_POST['course_code']); |