@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | |
234 | 234 | //If session is not active we stop de script |
235 | 235 | if (!api_is_allowed_to_session_edit()) { |
236 | - api_not_allowed(); |
|
236 | + api_not_allowed(); |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | $entityManager = Database::getManager(); |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | if ($exercise_info->start_time != '0000-00-00 00:00:00') { |
354 | 354 | $allowed_time = api_strtotime($exercise_info->start_time, 'UTC'); |
355 | 355 | if ($now < $allowed_time) { |
356 | - continue; |
|
356 | + continue; |
|
357 | 357 | } |
358 | 358 | } |
359 | 359 | $exercise_info->exercise = Display::url( |
@@ -583,11 +583,11 @@ discard block |
||
583 | 583 | window.location.href=ui.tab; |
584 | 584 | }); |
585 | 585 | <?php |
586 | - //Displays js code to use a jqgrid |
|
587 | - echo Display::grid_js('courses', '', $columns_courses, $column_model_courses, $extra_params_courses, $new_course_list); |
|
588 | - echo Display::grid_js('list_default', $url, $columns, $column_model,$extra_params,array(), ''); |
|
589 | - echo Display::grid_js('list_course', $url_by_course, $columns, $column_model,$extra_params_course,array(),''); |
|
590 | - echo Display::grid_js('list_week', $url_week, $column_week, $column_week_model, $extra_params_week,array(),''); |
|
586 | + //Displays js code to use a jqgrid |
|
587 | + echo Display::grid_js('courses', '', $columns_courses, $column_model_courses, $extra_params_courses, $new_course_list); |
|
588 | + echo Display::grid_js('list_default', $url, $columns, $column_model,$extra_params,array(), ''); |
|
589 | + echo Display::grid_js('list_course', $url_by_course, $columns, $column_model,$extra_params_course,array(),''); |
|
590 | + echo Display::grid_js('list_week', $url_week, $column_week, $column_week_model, $extra_params_week,array(),''); |
|
591 | 591 | |
592 | 592 | if (!api_is_anonymous()) { |
593 | 593 | echo Display::grid_js('exercises', '', $column_exercise, $column_exercise_model, $extra_params_exercise, $my_real_array); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | api_not_allowed(); |
17 | 17 | } |
18 | 18 | |
19 | -$session_id = isset($_GET['session_id']) ? intval($_GET['session_id']): null; |
|
19 | +$session_id = isset($_GET['session_id']) ? intval($_GET['session_id']) : null; |
|
20 | 20 | |
21 | 21 | $sessionField = new ExtraFieldValue('session'); |
22 | 22 | $valueAllowVisitors = $sessionField->get_values_by_handler_and_field_variable($session_id, 'allow_visitors'); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $this_section = SECTION_COURSES; |
32 | 32 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
33 | 33 | |
34 | -$course_id = isset($_GET['course_id']) ? intval($_GET['course_id']) : null; |
|
34 | +$course_id = isset($_GET['course_id']) ? intval($_GET['course_id']) : null; |
|
35 | 35 | |
36 | 36 | $_SESSION['id_session'] = $session_id; |
37 | 37 | |
@@ -245,12 +245,12 @@ discard block |
||
245 | 245 | $sessionCourses = $session->getCourses(); |
246 | 246 | $sessionCourse = $sessionCourses[0]->getCourse(); |
247 | 247 | |
248 | - $courseUrl = $sessionCourse->getDirectory() . '/index.php?'; |
|
248 | + $courseUrl = $sessionCourse->getDirectory().'/index.php?'; |
|
249 | 249 | $courseUrl .= http_build_query([ |
250 | 250 | 'id_session' => $session->getId() |
251 | 251 | ]); |
252 | 252 | |
253 | - header('Location: ' . api_get_path(WEB_COURSE_PATH) . $courseUrl); |
|
253 | + header('Location: '.api_get_path(WEB_COURSE_PATH).$courseUrl); |
|
254 | 254 | exit; |
255 | 255 | } |
256 | 256 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | |
259 | 259 | $session_select = array(); |
260 | 260 | foreach ($session_list as $item) { |
261 | - $session_select[$item['id']] = $item['name']; |
|
261 | + $session_select[$item['id']] = $item['name']; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | // Session list form |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $my_real_array = $new_exercises = array(); |
281 | 281 | $now = time(); |
282 | 282 | foreach ($final_array as $session_data) { |
283 | - $my_course_list = isset($session_data['data']) ? $session_data['data']: array(); |
|
283 | + $my_course_list = isset($session_data['data']) ? $session_data['data'] : array(); |
|
284 | 284 | if (!empty($my_course_list)) { |
285 | 285 | foreach ($my_course_list as $my_course_code=>$course_data) { |
286 | 286 | $courseInfo = api_get_course_info($my_course_code); |
@@ -318,8 +318,8 @@ discard block |
||
318 | 318 | foreach ($result_list as $exercise_result) { |
319 | 319 | $platform_score = ExerciseLib::show_score($exercise_result['exe_result'], $exercise_result['exe_weighting']); |
320 | 320 | $my_score = 0; |
321 | - if(!empty($exercise_result['exe_weighting']) && intval($exercise_result['exe_weighting']) != 0) { |
|
322 | - $my_score = $exercise_result['exe_result']/$exercise_result['exe_weighting']; |
|
321 | + if (!empty($exercise_result['exe_weighting']) && intval($exercise_result['exe_weighting']) != 0) { |
|
322 | + $my_score = $exercise_result['exe_result'] / $exercise_result['exe_weighting']; |
|
323 | 323 | } |
324 | 324 | $position = ExerciseLib::get_exercise_result_ranking( |
325 | 325 | $my_score, |
@@ -333,11 +333,11 @@ discard block |
||
333 | 333 | $exercise_info->exercise = Display::url( |
334 | 334 | $exercise_info->exercise, |
335 | 335 | api_get_path(WEB_CODE_PATH)."exercice/result.php?cidReq=$my_course_code&id={$exercise_result['exe_id']}&id_session=$session_id&show_headers=1", |
336 | - array('target'=>SESSION_LINK_TARGET,'class'=>'exercise-result-link') |
|
336 | + array('target'=>SESSION_LINK_TARGET, 'class'=>'exercise-result-link') |
|
337 | 337 | ); |
338 | 338 | |
339 | - $my_real_array[]= array( |
|
340 | - 'status' => Display::return_icon('quiz.gif', get_lang('Attempted'),'', ICON_SIZE_SMALL), |
|
339 | + $my_real_array[] = array( |
|
340 | + 'status' => Display::return_icon('quiz.gif', get_lang('Attempted'), '', ICON_SIZE_SMALL), |
|
341 | 341 | 'date' => $start_date, |
342 | 342 | 'course' => $course_data['name'], |
343 | 343 | 'exercise' => $exercise_info->exercise, |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | array('target'=>SESSION_LINK_TARGET) |
363 | 363 | ); |
364 | 364 | |
365 | - $new_exercises[]= array( |
|
365 | + $new_exercises[] = array( |
|
366 | 366 | 'status' => Display::return_icon('star.png', get_lang('New'), array('width'=>ICON_SIZE_SMALL)), |
367 | 367 | 'date' => $start_date, |
368 | 368 | 'course' => $course_data['name'], |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $my_real_array = array_merge($new_exercises, $my_real_array); |
387 | 387 | } |
388 | 388 | |
389 | -$start = $end = $start_only = $end_only =''; |
|
389 | +$start = $end = $start_only = $end_only = ''; |
|
390 | 390 | |
391 | 391 | if (!empty($session_info['access_start_date']) && $session_info['access_start_date'] != '0000-00-00') { |
392 | 392 | $start = api_convert_and_format_date($session_info['access_start_date'], DATE_FORMAT_SHORT); |
@@ -424,11 +424,11 @@ discard block |
||
424 | 424 | get_lang('Title'), get_lang('NumberOfPublishedExercises'), get_lang('NumberOfPublishedLps') |
425 | 425 | ); |
426 | 426 | $column_model_courses = array( |
427 | - array('name'=>'title', 'index'=>'title', 'width'=>'400px', 'align'=>'left', 'sortable'=>'true'), |
|
427 | + array('name'=>'title', 'index'=>'title', 'width'=>'400px', 'align'=>'left', 'sortable'=>'true'), |
|
428 | 428 | //array('name'=>'recent_lps', 'index'=>'recent_lps', 'width'=>'10px', 'align'=>'left', 'sortable'=>'false'), |
429 | 429 | // array('name'=>'max_mutation_date', 'index'=>'max_mutation_date', 'width'=>'120px', 'align'=>'left', 'sortable'=>'true'), |
430 | - array('name'=>'exercise_count', 'index'=>'exercise_count', 'width'=>'180px', 'align'=>'left', 'sortable'=>'true'), |
|
431 | - array('name'=>'lp_count', 'index'=>'lp_count', 'width'=>'180px', 'align'=>'left', 'sortable'=>'true') |
|
430 | + array('name'=>'exercise_count', 'index'=>'exercise_count', 'width'=>'180px', 'align'=>'left', 'sortable'=>'true'), |
|
431 | + array('name'=>'lp_count', 'index'=>'lp_count', 'width'=>'180px', 'align'=>'left', 'sortable'=>'true') |
|
432 | 432 | ); |
433 | 433 | |
434 | 434 | $extra_params_courses['height'] = '100%'; |
@@ -452,10 +452,10 @@ discard block |
||
452 | 452 | get_lang('LearningPaths') |
453 | 453 | ); |
454 | 454 | |
455 | -$column_model = array( |
|
456 | - array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'true'), |
|
455 | +$column_model = array( |
|
456 | + array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'true'), |
|
457 | 457 | array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'), |
458 | - array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true') |
|
458 | + array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true') |
|
459 | 459 | ); |
460 | 460 | |
461 | 461 | $extra_params = array(); |
@@ -501,11 +501,11 @@ discard block |
||
501 | 501 | get_lang('LearningPaths') |
502 | 502 | ); |
503 | 503 | |
504 | -$column_week_model = array( |
|
505 | - array('name'=>'week', 'index'=>'week', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'), |
|
506 | - array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'false'), |
|
507 | - array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'), |
|
508 | - array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true') |
|
504 | +$column_week_model = array( |
|
505 | + array('name'=>'week', 'index'=>'week', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'), |
|
506 | + array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'false'), |
|
507 | + array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'), |
|
508 | + array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true') |
|
509 | 509 | ); |
510 | 510 | |
511 | 511 | $extra_params_week = array(); |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | 'groupField' => array('week'), |
518 | 518 | 'groupOrder' => array('desc'), |
519 | 519 | 'groupColumnShow' => 'false', |
520 | - 'groupText' => array('<b>' . get_lang('PeriodWeek') . ' {0}</b>') |
|
520 | + 'groupText' => array('<b>'.get_lang('PeriodWeek').' {0}</b>') |
|
521 | 521 | ); |
522 | 522 | $extra_params_week['autowidth'] = 'true'; //use the width of the parent |
523 | 523 | $extra_params_week['height'] = '100%'; |
@@ -534,15 +534,15 @@ discard block |
||
534 | 534 | get_lang('BestResultInCourse'), |
535 | 535 | get_lang('Ranking') |
536 | 536 | ); |
537 | - $column_exercise_model = array( |
|
538 | - array('name'=>'status', 'index'=>'status', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'), |
|
539 | - array('name'=>'date', 'index'=>'date', 'width'=>'130','align'=>'left', 'sortable'=>'true'), |
|
540 | - array('name'=>'course', 'index'=>'course', 'width'=>'200','align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'), |
|
541 | - array('name'=>'exercise', 'index'=>'exercise', 'width'=>'200','align'=>'left', 'sortable'=>'false'), |
|
542 | - array('name'=>'attempt', 'index'=>'attempt', 'width'=>'60', 'align'=>'center', 'sortable'=>'true'), |
|
543 | - array('name'=>'result', 'index'=>'result', 'width'=>'120','align'=>'center', 'sortable'=>'true'), |
|
544 | - array('name'=>'best_result','index'=>'best_result','width'=>'140','align'=>'center', 'sortable'=>'true'), |
|
545 | - array('name'=>'position', 'index'=>'position', 'width'=>'55', 'align'=>'center', 'sortable'=>'true') |
|
537 | + $column_exercise_model = array( |
|
538 | + array('name'=>'status', 'index'=>'status', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'), |
|
539 | + array('name'=>'date', 'index'=>'date', 'width'=>'130', 'align'=>'left', 'sortable'=>'true'), |
|
540 | + array('name'=>'course', 'index'=>'course', 'width'=>'200', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'), |
|
541 | + array('name'=>'exercise', 'index'=>'exercise', 'width'=>'200', 'align'=>'left', 'sortable'=>'false'), |
|
542 | + array('name'=>'attempt', 'index'=>'attempt', 'width'=>'60', 'align'=>'center', 'sortable'=>'true'), |
|
543 | + array('name'=>'result', 'index'=>'result', 'width'=>'120', 'align'=>'center', 'sortable'=>'true'), |
|
544 | + array('name'=>'best_result', 'index'=>'best_result', 'width'=>'140', 'align'=>'center', 'sortable'=>'true'), |
|
545 | + array('name'=>'position', 'index'=>'position', 'width'=>'55', 'align'=>'center', 'sortable'=>'true') |
|
546 | 546 | ); |
547 | 547 | $extra_params_exercise['height'] = '100%'; |
548 | 548 | $extra_params_exercise['autowidth'] = 'true'; |
@@ -584,10 +584,10 @@ discard block |
||
584 | 584 | }); |
585 | 585 | <?php |
586 | 586 | //Displays js code to use a jqgrid |
587 | - echo Display::grid_js('courses', '', $columns_courses, $column_model_courses, $extra_params_courses, $new_course_list); |
|
588 | - echo Display::grid_js('list_default', $url, $columns, $column_model,$extra_params,array(), ''); |
|
589 | - echo Display::grid_js('list_course', $url_by_course, $columns, $column_model,$extra_params_course,array(),''); |
|
590 | - echo Display::grid_js('list_week', $url_week, $column_week, $column_week_model, $extra_params_week,array(),''); |
|
587 | + echo Display::grid_js('courses', '', $columns_courses, $column_model_courses, $extra_params_courses, $new_course_list); |
|
588 | + echo Display::grid_js('list_default', $url, $columns, $column_model, $extra_params, array(), ''); |
|
589 | + echo Display::grid_js('list_course', $url_by_course, $columns, $column_model, $extra_params_course, array(), ''); |
|
590 | + echo Display::grid_js('list_week', $url_week, $column_week, $column_week_model, $extra_params_week, array(), ''); |
|
591 | 591 | |
592 | 592 | if (!api_is_anonymous()) { |
593 | 593 | echo Display::grid_js('exercises', '', $column_exercise, $column_exercise_model, $extra_params_exercise, $my_real_array); |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | false, |
609 | 609 | false |
610 | 610 | ); |
611 | - if (!empty($reportingTab)) { |
|
611 | + if (!empty($reportingTab)) { |
|
612 | 612 | $reportingTab .= '<br />'.Tracking::show_course_detail( |
613 | 613 | api_get_user_id(), |
614 | 614 | $courseCode, |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | ); |
617 | 617 | } |
618 | 618 | if (empty($reportingTab)) { |
619 | - $reportingTab = Display::return_message(get_lang('NoDataAvailable'), 'warning'); |
|
619 | + $reportingTab = Display::return_message(get_lang('NoDataAvailable'), 'warning'); |
|
620 | 620 | } |
621 | 621 | } |
622 | 622 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $tool_name = get_lang('ImportSessionDrhList'); |
17 | 17 | |
18 | 18 | //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
19 | -$interbreadcrumb[]=array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
19 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
20 | 20 | |
21 | 21 | set_time_limit(0); |
22 | 22 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | echo '<div class="actions">'; |
29 | 29 | echo '<a href="../session/session_list.php">'. |
30 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
30 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
31 | 31 | echo '</div>'; |
32 | 32 | |
33 | 33 | if (!empty($error_message)) { |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $sessionRepository = Database::getManager()->getRepository('ChamiloCoreBundle:Session'); |
156 | 156 | $courses = $sessionRepository->getCoursesOrderedByPosition($session); |
157 | 157 | |
158 | - foreach ($courses as $course) { |
|
158 | + foreach ($courses as $course) { |
|
159 | 159 | //select the number of users |
160 | 160 | $sql = "SELECT count(*) |
161 | 161 | FROM $tbl_session_rel_user sru, |
@@ -167,37 +167,37 @@ discard block |
||
167 | 167 | sru.relation_type <> ".SESSION_RELATION_TYPE_RRHH." AND |
168 | 168 | srcru.session_id = '".intval($sessionId)."'"; |
169 | 169 | |
170 | - $rs = Database::query($sql); |
|
170 | + $rs = Database::query($sql); |
|
171 | 171 | $numberOfUsers = Database::result($rs, 0, 0); |
172 | 172 | |
173 | - // Get coachs of the courses in session |
|
173 | + // Get coachs of the courses in session |
|
174 | 174 | |
175 | - $sql = "SELECT user.lastname, user.firstname, user.username |
|
175 | + $sql = "SELECT user.lastname, user.firstname, user.username |
|
176 | 176 | FROM $tbl_session_rel_course_rel_user session_rcru, $tbl_user user |
177 | 177 | WHERE |
178 | 178 | session_rcru.user_id = user.user_id AND |
179 | 179 | session_rcru.session_id = '".intval($sessionId)."' AND |
180 | 180 | session_rcru.c_id ='".intval($course->getId())."' AND |
181 | 181 | session_rcru.status=2"; |
182 | - $rs = Database::query($sql); |
|
182 | + $rs = Database::query($sql); |
|
183 | 183 | |
184 | - $coachs = array(); |
|
185 | - if (Database::num_rows($rs) > 0) { |
|
186 | - while($info_coach = Database::fetch_array($rs)) { |
|
184 | + $coachs = array(); |
|
185 | + if (Database::num_rows($rs) > 0) { |
|
186 | + while($info_coach = Database::fetch_array($rs)) { |
|
187 | 187 | $coachs[] = api_get_person_name( |
188 | 188 | $info_coach['firstname'], |
189 | 189 | $info_coach['lastname'] |
190 | 190 | ).' ('.$info_coach['username'].')'; |
191 | - } |
|
192 | - } else { |
|
193 | - $coach = get_lang('None'); |
|
194 | - } |
|
191 | + } |
|
192 | + } else { |
|
193 | + $coach = get_lang('None'); |
|
194 | + } |
|
195 | 195 | |
196 | - if (count($coachs) > 0) { |
|
197 | - $coach = implode('<br />',$coachs); |
|
198 | - } else { |
|
199 | - $coach = get_lang('None'); |
|
200 | - } |
|
196 | + if (count($coachs) > 0) { |
|
197 | + $coach = implode('<br />',$coachs); |
|
198 | + } else { |
|
199 | + $coach = get_lang('None'); |
|
200 | + } |
|
201 | 201 | |
202 | 202 | $orderButtons = null; |
203 | 203 | |
@@ -233,8 +233,8 @@ discard block |
||
233 | 233 | |
234 | 234 | $courseUrl = api_get_course_url($course->getCode(), $sessionId); |
235 | 235 | |
236 | - // hide_course_breadcrumb the parameter has been added to hide the name |
|
237 | - // of the course, that appeared in the default $interbreadcrumb |
|
236 | + // hide_course_breadcrumb the parameter has been added to hide the name |
|
237 | + // of the course, that appeared in the default $interbreadcrumb |
|
238 | 238 | $courseItem .= ' |
239 | 239 | <tr> |
240 | 240 | <td class="title">'.Display::url( |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | </td> |
261 | 261 | </tr>'; |
262 | 262 | $count++; |
263 | - } |
|
263 | + } |
|
264 | 264 | $courseListToShow .= $courseItem; |
265 | 265 | } |
266 | 266 | $courseListToShow .= '</table><br />'; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $tool_name = get_lang('SessionOverview'); |
30 | 30 | |
31 | 31 | //$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
32 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
32 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
33 | 33 | |
34 | 34 | $orig_param = '&origin=resume_session'; |
35 | 35 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | $coachs = array(); |
185 | 185 | if (Database::num_rows($rs) > 0) { |
186 | - while($info_coach = Database::fetch_array($rs)) { |
|
186 | + while ($info_coach = Database::fetch_array($rs)) { |
|
187 | 187 | $coachs[] = api_get_person_name( |
188 | 188 | $info_coach['firstname'], |
189 | 189 | $info_coach['lastname'] |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | } |
195 | 195 | |
196 | 196 | if (count($coachs) > 0) { |
197 | - $coach = implode('<br />',$coachs); |
|
197 | + $coach = implode('<br />', $coachs); |
|
198 | 198 | } else { |
199 | 199 | $coach = get_lang('None'); |
200 | 200 | } |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $downIcon = 'down.png'; |
218 | 218 | $downUrl = api_get_self().'?id_session='.$sessionId.'&course_id='.$course->getId().'&action=move_down'; |
219 | 219 | |
220 | - if ($count +1 == count($courses)) { |
|
220 | + if ($count + 1 == count($courses)) { |
|
221 | 221 | $downIcon = 'down_na.png'; |
222 | 222 | $downUrl = '#'; |
223 | 223 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | <td>'.$coach.'</td> |
245 | 245 | <td>'.$numberOfUsers.'</td> |
246 | 246 | <td> |
247 | - <a href="'. $courseUrl . '">'. |
|
247 | + <a href="'. $courseUrl.'">'. |
|
248 | 248 | Display::return_icon('course_home.gif', get_lang('Course')).'</a> |
249 | 249 | '.$orderButtons.' |
250 | 250 | <a href="session_course_user_list.php?id_session='.$sessionId.'&course_code='.$course->getCode().'">'. |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | array('onclick' => "javascript:if(!confirm('".get_lang('ConfirmYourChoice')."')) return false;") |
310 | 310 | ); |
311 | 311 | |
312 | - $addUserToUrlLink= ''; |
|
312 | + $addUserToUrlLink = ''; |
|
313 | 313 | if ($multiple_url_is_on) { |
314 | 314 | if ($user['access_url_id'] != $url_id) { |
315 | 315 | $userLink .= ' '.Display::return_icon( |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $add_type = 'unique'; |
39 | 39 | |
40 | 40 | if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { |
41 | - $add_type = Security::remove_XSS($_REQUEST['add_type']); |
|
41 | + $add_type = Security::remove_XSS($_REQUEST['add_type']); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $page = isset($_GET['page']) ? Security::remove_XSS($_GET['page']) : null; |
@@ -408,8 +408,8 @@ discard block |
||
408 | 408 | |
409 | 409 | if ($use_extra_fields) { |
410 | 410 | $final_result = array(); |
411 | - if (count($extra_field_result)>1) { |
|
412 | - for($i=0;$i<count($extra_field_result)-1;$i++) { |
|
411 | + if (count($extra_field_result)>1) { |
|
412 | + for($i=0;$i<count($extra_field_result)-1;$i++) { |
|
413 | 413 | if (is_array($extra_field_result[$i+1])) { |
414 | 414 | $final_result = array_intersect($extra_field_result[$i],$extra_field_result[$i+1]); |
415 | 415 | } |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | 'official_code' => $user['official_code'] |
486 | 486 | ) ; |
487 | 487 | unset($users[$uid]); |
488 | - } |
|
488 | + } |
|
489 | 489 | } |
490 | 490 | unset($users); //clean to free memory |
491 | 491 | |
@@ -529,12 +529,12 @@ discard block |
||
529 | 529 | } |
530 | 530 | |
531 | 531 | if ($add_type == 'multiple') { |
532 | - $link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=unique">'. |
|
532 | + $link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=unique">'. |
|
533 | 533 | Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>'; |
534 | - $link_add_type_multiple = Display::url(Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple'), ''); |
|
534 | + $link_add_type_multiple = Display::url(Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple'), ''); |
|
535 | 535 | } else { |
536 | - $link_add_type_unique = Display::url(Display::return_icon('single.gif').get_lang('SessionAddTypeUnique'), ''); |
|
537 | - $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>'; |
|
536 | + $link_add_type_unique = Display::url(Display::return_icon('single.gif').get_lang('SessionAddTypeUnique'), ''); |
|
537 | + $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>'; |
|
538 | 538 | } |
539 | 539 | $link_add_group = Display::url( |
540 | 540 | Display::return_icon('multiple.gif',get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups'), |
@@ -562,30 +562,30 @@ discard block |
||
562 | 562 | <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?> |
563 | 563 | <?php |
564 | 564 | if ($add_type=='multiple') { |
565 | - if (is_array($extra_field_list)) { |
|
566 | - if (is_array($new_field_list) && count($new_field_list)>0 ) { |
|
567 | - echo '<h3>'.get_lang('FilterUsers').'</h3>'; |
|
568 | - foreach ($new_field_list as $new_field) { |
|
569 | - echo $new_field['name']; |
|
570 | - $varname = 'field_'.$new_field['variable']; |
|
571 | - echo ' <select name="'.$varname.'">'; |
|
572 | - echo '<option value="0">--'.get_lang('Select').'--</option>'; |
|
573 | - foreach ($new_field['data'] as $option) { |
|
574 | - $checked=''; |
|
575 | - if (isset($_POST[$varname])) { |
|
576 | - if ($_POST[$varname]==$option[1]) { |
|
577 | - $checked = 'selected="true"'; |
|
578 | - } |
|
579 | - } |
|
580 | - echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>'; |
|
581 | - } |
|
582 | - echo '</select>'; |
|
583 | - echo ' '; |
|
584 | - } |
|
585 | - echo '<input type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" />'; |
|
586 | - echo '<br /><br />'; |
|
587 | - } |
|
588 | - } |
|
565 | + if (is_array($extra_field_list)) { |
|
566 | + if (is_array($new_field_list) && count($new_field_list)>0 ) { |
|
567 | + echo '<h3>'.get_lang('FilterUsers').'</h3>'; |
|
568 | + foreach ($new_field_list as $new_field) { |
|
569 | + echo $new_field['name']; |
|
570 | + $varname = 'field_'.$new_field['variable']; |
|
571 | + echo ' <select name="'.$varname.'">'; |
|
572 | + echo '<option value="0">--'.get_lang('Select').'--</option>'; |
|
573 | + foreach ($new_field['data'] as $option) { |
|
574 | + $checked=''; |
|
575 | + if (isset($_POST[$varname])) { |
|
576 | + if ($_POST[$varname]==$option[1]) { |
|
577 | + $checked = 'selected="true"'; |
|
578 | + } |
|
579 | + } |
|
580 | + echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>'; |
|
581 | + } |
|
582 | + echo '</select>'; |
|
583 | + echo ' '; |
|
584 | + } |
|
585 | + echo '<input type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" />'; |
|
586 | + echo '<br /><br />'; |
|
587 | + } |
|
588 | + } |
|
589 | 589 | } |
590 | 590 | ?> |
591 | 591 | <input type="hidden" name="form_sent" value="1" /> |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | |
594 | 594 | <?php |
595 | 595 | if (!empty($errorMsg)) { |
596 | - Display::display_normal_message($errorMsg); //main API |
|
596 | + Display::display_normal_message($errorMsg); //main API |
|
597 | 597 | } |
598 | 598 | ?> |
599 | 599 | <div id="multiple-add-session" class="row"> |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | <label><?php echo get_lang('UserListInPlatform') ?> </label> |
603 | 603 | <?php |
604 | 604 | if (!($add_type=='multiple')) { |
605 | - ?> |
|
605 | + ?> |
|
606 | 606 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" class="form-control" /> |
607 | 607 | <div id="ajax_list_users_single" class="select-list-ajax"></div> |
608 | 608 | <?php |
@@ -611,21 +611,21 @@ discard block |
||
611 | 611 | <div id="ajax_list_users_multiple"> |
612 | 612 | <select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" class="form-control"> |
613 | 613 | <?php |
614 | - foreach ($nosessionUsersList as $uid => $enreg) { |
|
615 | - ?> |
|
614 | + foreach ($nosessionUsersList as $uid => $enreg) { |
|
615 | + ?> |
|
616 | 616 | <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>> |
617 | 617 | <?php |
618 | - $personName = api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].') '.$enreg['official_code']; |
|
619 | - if ($showOfficialCode) { |
|
620 | - $officialCode = !empty($enreg['official_code']) ? $enreg['official_code'].' - ' : '? - '; |
|
621 | - $personName = $officialCode.api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; |
|
622 | - } |
|
623 | - echo $personName; |
|
624 | - ?> |
|
618 | + $personName = api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].') '.$enreg['official_code']; |
|
619 | + if ($showOfficialCode) { |
|
620 | + $officialCode = !empty($enreg['official_code']) ? $enreg['official_code'].' - ' : '? - '; |
|
621 | + $personName = $officialCode.api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; |
|
622 | + } |
|
623 | + echo $personName; |
|
624 | + ?> |
|
625 | 625 | </option> |
626 | 626 | <?php |
627 | - } |
|
628 | - ?> |
|
627 | + } |
|
628 | + ?> |
|
629 | 629 | </select> |
630 | 630 | </div> |
631 | 631 | <input type="checkbox" onchange="checked_in_no_session(this.checked);" name="user_with_any_session" id="user_with_any_session_id"> |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | <?php |
634 | 634 | } |
635 | 635 | unset($nosessionUsersList); |
636 | - ?> |
|
636 | + ?> |
|
637 | 637 | </div> |
638 | 638 | </div> |
639 | 639 | |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | <?php |
678 | 678 | } |
679 | 679 | if (!empty($addProcess)) { |
680 | - echo '<button class="btn btn-success" type="button" value="" onclick="valide()" >'.get_lang('FinishSessionCreation').'</button>'; |
|
680 | + echo '<button class="btn btn-success" type="button" value="" onclick="valide()" >'.get_lang('FinishSessionCreation').'</button>'; |
|
681 | 681 | } else { |
682 | 682 | echo '<button class="btn btn-success" type="button" value="" onclick="valide()" >'.get_lang('SubscribeUsersToSession').'</button>'; |
683 | 683 | } |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | |
25 | 25 | // setting breadcrumbs |
26 | 26 | //$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
27 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
28 | -$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id_session,"name" => get_lang('SessionOverview')); |
|
27 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
28 | +$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id_session, "name" => get_lang('SessionOverview')); |
|
29 | 29 | |
30 | 30 | // Database Table Definitions |
31 | 31 | $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (is_array($extra_field_list)) { |
52 | 52 | foreach ($extra_field_list as $extra_field) { |
53 | 53 | //if is enabled to filter and is a "<select>" field type |
54 | - if ($extra_field[8]==1 && $extra_field[2]==4) { |
|
54 | + if ($extra_field[8] == 1 && $extra_field[2] == 4) { |
|
55 | 55 | $new_field_list[] = array( |
56 | 56 | 'name'=> $extra_field[3], |
57 | 57 | 'variable'=>$extra_field[1], |
@@ -92,13 +92,13 @@ discard block |
||
92 | 92 | if (api_is_session_admin() && |
93 | 93 | api_get_setting('prevent_session_admins_to_manage_all_users') === 'true' |
94 | 94 | ) { |
95 | - $order_clause = " AND user.creator_id = " . api_get_user_id() . $order_clause; |
|
95 | + $order_clause = " AND user.creator_id = ".api_get_user_id().$order_clause; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | $cond_user_id = ''; |
99 | 99 | |
100 | 100 | // Only for single & multiple |
101 | - if (in_array($type, array('single','multiple'))) |
|
101 | + if (in_array($type, array('single', 'multiple'))) |
|
102 | 102 | if (!empty($id_session)) { |
103 | 103 | $id_session = intval($id_session); |
104 | 104 | // check id_user from session_rel_user table |
@@ -108,11 +108,11 @@ discard block |
||
108 | 108 | $user_ids = array(); |
109 | 109 | if (Database::num_rows($res) > 0) { |
110 | 110 | while ($row = Database::fetch_row($res)) { |
111 | - $user_ids[] = (int)$row[0]; |
|
111 | + $user_ids[] = (int) $row[0]; |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 | if (count($user_ids) > 0) { |
115 | - $cond_user_id = ' AND user.id NOT IN('.implode(",",$user_ids).')'; |
|
115 | + $cond_user_id = ' AND user.id NOT IN('.implode(",", $user_ids).')'; |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | if (api_is_multiple_url_enabled()) { |
157 | - $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
157 | + $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
158 | 158 | $access_url_id = api_get_current_access_url_id(); |
159 | 159 | if ($access_url_id != -1) { |
160 | 160 | switch ($type) { |
@@ -205,10 +205,10 @@ discard block |
||
205 | 205 | |
206 | 206 | $rs = Database::query($sql); |
207 | 207 | $i = 0; |
208 | - if ($type=='single') { |
|
208 | + if ($type == 'single') { |
|
209 | 209 | while ($user = Database :: fetch_array($rs)) { |
210 | 210 | $i++; |
211 | - if ($i<=10) { |
|
211 | + if ($i <= 10) { |
|
212 | 212 | $person_name = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') '.$user['official_code']; |
213 | 213 | if ($showOfficialCode) { |
214 | 214 | $officialCode = !empty($user['official_code']) ? $user['official_code'].' - ' : '? - '; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | } |
222 | 222 | } |
223 | 223 | |
224 | - $xajax_response -> addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return)); |
|
224 | + $xajax_response -> addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return)); |
|
225 | 225 | } else { |
226 | 226 | global $nosessionUsersList; |
227 | 227 | $return .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;">'; |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $return .= '<option value="'.$user['id'].'">'.$person_name.' </option>'; |
235 | 235 | } |
236 | 236 | $return .= '</select>'; |
237 | - $xajax_response -> addAssign('ajax_list_users_multiple','innerHTML',api_utf8_encode($return)); |
|
237 | + $xajax_response -> addAssign('ajax_list_users_multiple', 'innerHTML', api_utf8_encode($return)); |
|
238 | 238 | } |
239 | 239 | } |
240 | 240 | |
@@ -346,10 +346,10 @@ discard block |
||
346 | 346 | $order_clause"; |
347 | 347 | |
348 | 348 | if (api_is_multiple_url_enabled()) { |
349 | - $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
349 | + $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
350 | 350 | $access_url_id = api_get_current_access_url_id(); |
351 | 351 | if ($access_url_id != -1) { |
352 | - $sql="SELECT u.id, lastname, firstname, username, session_id, official_code |
|
352 | + $sql = "SELECT u.id, lastname, firstname, username, session_id, official_code |
|
353 | 353 | FROM $tbl_user u |
354 | 354 | INNER JOIN $tbl_session_rel_user |
355 | 355 | ON $tbl_session_rel_user.user_id = u.id AND |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | $result = Database::query($sql); |
364 | 364 | $users = Database::store_result($result); |
365 | 365 | foreach ($users as $user) { |
366 | - $sessionUsersList[$user['id']] = $user ; |
|
366 | + $sessionUsersList[$user['id']] = $user; |
|
367 | 367 | } |
368 | 368 | |
369 | 369 | $sessionUserInfo = SessionManager::getTotalUserCoursesInSession($id_session); |
@@ -389,12 +389,12 @@ discard block |
||
389 | 389 | //Filter by Extra Fields |
390 | 390 | $use_extra_fields = false; |
391 | 391 | if (is_array($extra_field_list)) { |
392 | - if (is_array($new_field_list) && count($new_field_list)>0 ) { |
|
393 | - $result_list=array(); |
|
392 | + if (is_array($new_field_list) && count($new_field_list) > 0) { |
|
393 | + $result_list = array(); |
|
394 | 394 | foreach ($new_field_list as $new_field) { |
395 | 395 | $varname = 'field_'.$new_field['variable']; |
396 | 396 | if (UserManager::is_extra_field_available($new_field['variable'])) { |
397 | - if (isset($_POST[$varname]) && $_POST[$varname]!='0') { |
|
397 | + if (isset($_POST[$varname]) && $_POST[$varname] != '0') { |
|
398 | 398 | $use_extra_fields = true; |
399 | 399 | $extra_field_result[] = UserManager::get_extra_user_data_by_value( |
400 | 400 | $new_field['variable'], |
@@ -408,10 +408,10 @@ discard block |
||
408 | 408 | |
409 | 409 | if ($use_extra_fields) { |
410 | 410 | $final_result = array(); |
411 | - if (count($extra_field_result)>1) { |
|
412 | - for($i=0;$i<count($extra_field_result)-1;$i++) { |
|
413 | - if (is_array($extra_field_result[$i+1])) { |
|
414 | - $final_result = array_intersect($extra_field_result[$i],$extra_field_result[$i+1]); |
|
411 | + if (count($extra_field_result) > 1) { |
|
412 | + for ($i = 0; $i < count($extra_field_result) - 1; $i++) { |
|
413 | + if (is_array($extra_field_result[$i + 1])) { |
|
414 | + $final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i + 1]); |
|
415 | 415 | } |
416 | 416 | } |
417 | 417 | } else { |
@@ -419,14 +419,14 @@ discard block |
||
419 | 419 | } |
420 | 420 | |
421 | 421 | if (api_is_multiple_url_enabled()) { |
422 | - if (is_array($final_result) && count($final_result)>0) { |
|
423 | - $where_filter = " AND u.id IN ('".implode("','",$final_result)."') "; |
|
422 | + if (is_array($final_result) && count($final_result) > 0) { |
|
423 | + $where_filter = " AND u.id IN ('".implode("','", $final_result)."') "; |
|
424 | 424 | } else { |
425 | 425 | //no results |
426 | 426 | $where_filter = " AND u.id = -1"; |
427 | 427 | } |
428 | 428 | } else { |
429 | - if (is_array($final_result) && count($final_result)>0) { |
|
429 | + if (is_array($final_result) && count($final_result) > 0) { |
|
430 | 430 | $where_filter = " WHERE u.id IN ('".implode("','", $final_result)."') "; |
431 | 431 | } else { |
432 | 432 | //no results |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | } |
436 | 436 | } |
437 | 437 | if (api_is_session_admin() && api_get_setting('prevent_session_admins_to_manage_all_users') === 'true') { |
438 | - $order_clause = " AND u.creator_id = " . api_get_user_id() . $order_clause; |
|
438 | + $order_clause = " AND u.creator_id = ".api_get_user_id().$order_clause; |
|
439 | 439 | } |
440 | 440 | if ($use_extra_fields) { |
441 | 441 | $sql = "SELECT u.id, lastname, firstname, username, session_id, official_code |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | $order_clause"; |
458 | 458 | } |
459 | 459 | if (api_is_multiple_url_enabled()) { |
460 | - $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
460 | + $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
461 | 461 | $access_url_id = api_get_current_access_url_id(); |
462 | 462 | if ($access_url_id != -1) { |
463 | 463 | $sql = "SELECT u.id, lastname, firstname, username, session_id, official_code |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | } |
475 | 475 | |
476 | 476 | $result = Database::query($sql); |
477 | - $users = Database::store_result($result,'ASSOC'); |
|
477 | + $users = Database::store_result($result, 'ASSOC'); |
|
478 | 478 | |
479 | 479 | foreach ($users as $uid => $user) { |
480 | 480 | if ($user['session_id'] != $id_session) { |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | 'ln' => $user['lastname'], |
484 | 484 | 'un' => $user['username'], |
485 | 485 | 'official_code' => $user['official_code'] |
486 | - ) ; |
|
486 | + ); |
|
487 | 487 | unset($users[$uid]); |
488 | 488 | } |
489 | 489 | } |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | WHERE u.status<>".DRH." AND u.status<>6 $order_clause"; |
500 | 500 | |
501 | 501 | if (api_is_multiple_url_enabled()) { |
502 | - $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
502 | + $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
503 | 503 | $access_url_id = api_get_current_access_url_id(); |
504 | 504 | if ($access_url_id != -1) { |
505 | 505 | $sql = "SELECT u.id, lastname, firstname, username, session_id, official_code |
@@ -515,11 +515,11 @@ discard block |
||
515 | 515 | } |
516 | 516 | |
517 | 517 | $result = Database::query($sql); |
518 | - $users = Database::store_result($result,'ASSOC'); |
|
518 | + $users = Database::store_result($result, 'ASSOC'); |
|
519 | 519 | foreach ($users as $uid => $user) { |
520 | 520 | if ($user['session_id'] == $id_session) { |
521 | 521 | $sessionUsersList[$user['id']] = $user; |
522 | - if (array_key_exists($user['id'],$nosessionUsersList)) { |
|
522 | + if (array_key_exists($user['id'], $nosessionUsersList)) { |
|
523 | 523 | unset($nosessionUsersList[$user['id']]); |
524 | 524 | } |
525 | 525 | } |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>'; |
538 | 538 | } |
539 | 539 | $link_add_group = Display::url( |
540 | - Display::return_icon('multiple.gif',get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups'), |
|
540 | + Display::return_icon('multiple.gif', get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups'), |
|
541 | 541 | api_get_path(WEB_CODE_PATH).'admin/usergroups.php' |
542 | 542 | ); |
543 | 543 | |
@@ -558,22 +558,22 @@ discard block |
||
558 | 558 | echo $newLinks; |
559 | 559 | ?> |
560 | 560 | </div> |
561 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($addProcess)) echo '&add=true' ; ?>" <?php if ($ajax_search) { echo ' onsubmit="valide();"';}?>> |
|
561 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if (!empty($addProcess)) echo '&add=true'; ?>" <?php if ($ajax_search) { echo ' onsubmit="valide();"'; }?>> |
|
562 | 562 | <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?> |
563 | 563 | <?php |
564 | -if ($add_type=='multiple') { |
|
564 | +if ($add_type == 'multiple') { |
|
565 | 565 | if (is_array($extra_field_list)) { |
566 | - if (is_array($new_field_list) && count($new_field_list)>0 ) { |
|
566 | + if (is_array($new_field_list) && count($new_field_list) > 0) { |
|
567 | 567 | echo '<h3>'.get_lang('FilterUsers').'</h3>'; |
568 | 568 | foreach ($new_field_list as $new_field) { |
569 | 569 | echo $new_field['name']; |
570 | 570 | $varname = 'field_'.$new_field['variable']; |
571 | 571 | echo ' <select name="'.$varname.'">'; |
572 | 572 | echo '<option value="0">--'.get_lang('Select').'--</option>'; |
573 | - foreach ($new_field['data'] as $option) { |
|
574 | - $checked=''; |
|
573 | + foreach ($new_field['data'] as $option) { |
|
574 | + $checked = ''; |
|
575 | 575 | if (isset($_POST[$varname])) { |
576 | - if ($_POST[$varname]==$option[1]) { |
|
576 | + if ($_POST[$varname] == $option[1]) { |
|
577 | 577 | $checked = 'selected="true"'; |
578 | 578 | } |
579 | 579 | } |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | <div class="form-group"> |
602 | 602 | <label><?php echo get_lang('UserListInPlatform') ?> </label> |
603 | 603 | <?php |
604 | - if (!($add_type=='multiple')) { |
|
604 | + if (!($add_type == 'multiple')) { |
|
605 | 605 | ?> |
606 | 606 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" class="form-control" /> |
607 | 607 | <div id="ajax_list_users_single" class="select-list-ajax"></div> |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | <?php |
614 | 614 | foreach ($nosessionUsersList as $uid => $enreg) { |
615 | 615 | ?> |
616 | - <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>> |
|
616 | + <option value="<?php echo $uid; ?>" <?php if (in_array($uid, $UserList)) echo 'selected="selected"'; ?>> |
|
617 | 617 | <?php |
618 | 618 | $personName = api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].') '.$enreg['official_code']; |
619 | 619 | if ($showOfficialCode) { |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | </div> |
639 | 639 | |
640 | 640 | <div class="col-md-4"> |
641 | - <?php if ($add_type=='multiple') { ?> |
|
641 | + <?php if ($add_type == 'multiple') { ?> |
|
642 | 642 | <?php echo get_lang('FirstLetterUser'); ?> : |
643 | 643 | |
644 | 644 | <select id="first_letter_user" name="firstLetterUser" onchange = "change_select(this.value);" > |
@@ -98,9 +98,10 @@ discard block |
||
98 | 98 | $cond_user_id = ''; |
99 | 99 | |
100 | 100 | // Only for single & multiple |
101 | - if (in_array($type, array('single','multiple'))) |
|
102 | - if (!empty($id_session)) { |
|
101 | + if (in_array($type, array('single','multiple'))) { |
|
102 | + if (!empty($id_session)) { |
|
103 | 103 | $id_session = intval($id_session); |
104 | + } |
|
104 | 105 | // check id_user from session_rel_user table |
105 | 106 | $sql = 'SELECT user_id FROM '.$tbl_session_rel_user.' |
106 | 107 | WHERE session_id = "'.$id_session.'" AND relation_type<>'.SESSION_RELATION_TYPE_RRHH.' '; |
@@ -558,7 +559,10 @@ discard block |
||
558 | 559 | echo $newLinks; |
559 | 560 | ?> |
560 | 561 | </div> |
561 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($addProcess)) echo '&add=true' ; ?>" <?php if ($ajax_search) { echo ' onsubmit="valide();"';}?>> |
|
562 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($addProcess)) { |
|
563 | + echo '&add=true' ; |
|
564 | +} |
|
565 | +?>" <?php if ($ajax_search) { echo ' onsubmit="valide();"';}?>> |
|
562 | 566 | <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?> |
563 | 567 | <?php |
564 | 568 | if ($add_type=='multiple') { |
@@ -613,7 +617,10 @@ discard block |
||
613 | 617 | <?php |
614 | 618 | foreach ($nosessionUsersList as $uid => $enreg) { |
615 | 619 | ?> |
616 | - <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>> |
|
620 | + <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) { |
|
621 | + echo 'selected="selected"'; |
|
622 | +} |
|
623 | +?>> |
|
617 | 624 | <?php |
618 | 625 | $personName = api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].') '.$enreg['official_code']; |
619 | 626 | if ($showOfficialCode) { |
@@ -70,13 +70,13 @@ |
||
70 | 70 | <tr> |
71 | 71 | <td align="center"> |
72 | 72 | <?php |
73 | - echo Display::select( |
|
74 | - 'sessions[]', |
|
75 | - $sessionList, |
|
76 | - '', |
|
77 | - array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'sessions', 'size'=>'15px'), |
|
78 | - false |
|
79 | - ); |
|
73 | + echo Display::select( |
|
74 | + 'sessions[]', |
|
75 | + $sessionList, |
|
76 | + '', |
|
77 | + array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'sessions', 'size'=>'15px'), |
|
78 | + false |
|
79 | + ); |
|
80 | 80 | ?> |
81 | 81 | </td> |
82 | 82 | <td align="center"> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | // setting breadcrumbs |
16 | 16 | //$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
17 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
17 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
18 | 18 | |
19 | 19 | // Setting the name of the tool |
20 | 20 | $tool_name = get_lang('EnrollTrainersFromExistingSessions'); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | 'sessions[]', |
75 | 75 | $sessionList, |
76 | 76 | '', |
77 | - array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'sessions', 'size'=>'15px'), |
|
77 | + array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'sessions', 'size'=>'15px'), |
|
78 | 78 | false |
79 | 79 | ); |
80 | 80 | ?> |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | 'course_name', |
53 | 53 | get_lang('SearchCourse'), |
54 | 54 | null, |
55 | - array('url' => api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_course') |
|
55 | + array('url' => api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_course') |
|
56 | 56 | ); |
57 | 57 | |
58 | 58 | if (!empty($courseId)) { |
59 | 59 | $courseInfo = api_get_course_info_by_id($courseId); |
60 | 60 | $parents = getParentsToString($courseInfo['categoryCode']); |
61 | 61 | |
62 | - $courseSelect->addOption($parents . $courseInfo['title'], $courseInfo['code'], ['selected' => 'selected']); |
|
62 | + $courseSelect->addOption($parents.$courseInfo['title'], $courseInfo['code'], ['selected' => 'selected']); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | $url = api_get_self(); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | // height auto |
112 | 112 | $extra_params['height'] = 'auto'; |
113 | 113 | |
114 | -$extra_params['postData'] =array( |
|
114 | +$extra_params['postData'] = array( |
|
115 | 115 | 'filters' => array( |
116 | 116 | "groupOp" => "AND", |
117 | 117 | "rules" => $result['rules'], |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | |
126 | 126 | //With this function we can add actions to the jgrid (edit, delete, etc) |
127 | 127 | $action_links = 'function action_formatter(cellvalue, options, rowObject) { |
128 | - return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
129 | - ' <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>'. |
|
130 | - ' <a href="add_courses_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('courses_to_session.png',get_lang('SubscribeCoursesToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
131 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=copy&idChecked=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'. |
|
132 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=delete&idChecked=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'. |
|
128 | + return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'. |
|
129 | + ' <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>'. |
|
130 | + ' <a href="add_courses_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('courses_to_session.png', get_lang('SubscribeCoursesToSession'), '', ICON_SIZE_SMALL).'</a>'. |
|
131 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=copy&idChecked=\'+options.rowId+\'">'.Display::return_icon('copy.png', get_lang('Copy'), '', ICON_SIZE_SMALL).'</a>'. |
|
132 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=delete&idChecked=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'. |
|
133 | 133 | '\'; |
134 | 134 | }'; |
135 | 135 | |
@@ -298,18 +298,18 @@ discard block |
||
298 | 298 | <?php |
299 | 299 | |
300 | 300 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'. |
301 | - Display::return_icon('new_session.png',get_lang('AddSession'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
301 | + Display::return_icon('new_session.png', get_lang('AddSession'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
302 | 302 | if (api_is_platform_admin()) { |
303 | 303 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/add_many_session_to_category.php">'. |
304 | - Display::return_icon('session_to_category.png',get_lang('AddSessionsInCategories'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
304 | + Display::return_icon('session_to_category.png', get_lang('AddSessionsInCategories'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
305 | 305 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_category_list.php">'. |
306 | - Display::return_icon('folder.png',get_lang('ListSessionCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
306 | + Display::return_icon('folder.png', get_lang('ListSessionCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | if ($list_type == 'complete') { |
310 | - echo '<a href="'.api_get_self().'?list_type=simple">'.Display::return_icon('view_remove.png',get_lang('Simple'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
310 | + echo '<a href="'.api_get_self().'?list_type=simple">'.Display::return_icon('view_remove.png', get_lang('Simple'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
311 | 311 | } else { |
312 | - echo '<a href="'.api_get_self().'?list_type=complete">'.Display::return_icon('view_text.png',get_lang('Complete'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
312 | + echo '<a href="'.api_get_self().'?list_type=complete">'.Display::return_icon('view_text.png', get_lang('Complete'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | echo $actions; |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | $sql = "SELECT * FROM $tbl_session_category WHERE id='".$id."' ORDER BY name"; |
30 | 30 | $result = Database::query($sql); |
31 | 31 | if (!$infos = Database::fetch_array($result)) { |
32 | - header('Location: session_list.php'); |
|
33 | - exit(); |
|
32 | + header('Location: session_list.php'); |
|
33 | + exit(); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | list($year_start,$month_start,$day_start)=explode('-',$infos['date_start']); |
37 | 37 | list($year_end,$month_end,$day_end)=explode('-',$infos['date_end']); |
38 | 38 | |
39 | 39 | if (!api_is_platform_admin() && $infos['session_admin_id']!=$_user['user_id'] && !api_is_session_admin()) { |
40 | - api_not_allowed(true); |
|
40 | + api_not_allowed(true); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | if (isset($_POST['formSent']) && $_POST['formSent']) { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $day_end |
61 | 61 | ); |
62 | 62 | if ($return == strval(intval($return))) { |
63 | - Display::addFlash(Display::return_message(get_lang('SessionCategoryUpdate'))); |
|
63 | + Display::addFlash(Display::return_message(get_lang('SessionCategoryUpdate'))); |
|
64 | 64 | header('Location: session_category_list.php'); |
65 | 65 | exit(); |
66 | 66 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | // display the header |
74 | 74 | Display::display_header($tool_name); |
75 | 75 | if (!empty($return)) { |
76 | - Display::display_error_message($return,false); |
|
76 | + Display::display_error_message($return,false); |
|
77 | 77 | } |
78 | 78 | ?> |
79 | 79 | <div class="row"> |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | exit(); |
34 | 34 | } |
35 | 35 | |
36 | -list($year_start,$month_start,$day_start)=explode('-',$infos['date_start']); |
|
37 | -list($year_end,$month_end,$day_end)=explode('-',$infos['date_end']); |
|
36 | +list($year_start, $month_start, $day_start) = explode('-', $infos['date_start']); |
|
37 | +list($year_end, $month_end, $day_end) = explode('-', $infos['date_end']); |
|
38 | 38 | |
39 | -if (!api_is_platform_admin() && $infos['session_admin_id']!=$_user['user_id'] && !api_is_session_admin()) { |
|
39 | +if (!api_is_platform_admin() && $infos['session_admin_id'] != $_user['user_id'] && !api_is_session_admin()) { |
|
40 | 40 | api_not_allowed(true); |
41 | 41 | } |
42 | 42 | |
@@ -73,85 +73,85 @@ discard block |
||
73 | 73 | // display the header |
74 | 74 | Display::display_header($tool_name); |
75 | 75 | if (!empty($return)) { |
76 | - Display::display_error_message($return,false); |
|
76 | + Display::display_error_message($return, false); |
|
77 | 77 | } |
78 | 78 | ?> |
79 | 79 | <div class="row"> |
80 | 80 | <div class="col-md-12"> |
81 | 81 | <form method="post" name="form" action="<?php echo api_get_self(); ?>?id=<?php echo $id; ?>" class="form-horizontal"> |
82 | 82 | <input type="hidden" name="formSent" value="1"> |
83 | - <legend><?php echo $tool_name;?> </legend> |
|
83 | + <legend><?php echo $tool_name; ?> </legend> |
|
84 | 84 | <div class="form-group"> |
85 | 85 | <label class="col-sm-3 control-label"><?php echo get_lang('SessionName') ?></label> |
86 | 86 | <div class="col-sm-6"> |
87 | - <input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); else echo api_htmlentities($infos['name'],ENT_QUOTES,$charset); ?>"> |
|
87 | + <input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if ($formSent) echo api_htmlentities($name, ENT_QUOTES, $charset); else echo api_htmlentities($infos['name'], ENT_QUOTES, $charset); ?>"> |
|
88 | 88 | </div> |
89 | 89 | <div class="col-sm-3"></div> |
90 | 90 | </div> |
91 | 91 | <div class="form-group"> |
92 | 92 | <div class="col-sm-offset-3 col-sm-6"> |
93 | - <?php echo get_lang('TheTimeLimitsAreReferential');?> |
|
93 | + <?php echo get_lang('TheTimeLimitsAreReferential'); ?> |
|
94 | 94 | <a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('EditTimeLimit') ?></a> |
95 | 95 | </div> |
96 | 96 | </div> |
97 | - <div style="display: <?php if($formSent && ($coachAccessStartDate!='0000-00-00 00:00:00' || $coachAccessEndDate!='0000-00-00 00:00:00')) echo 'block'; else echo 'none'; ?>;" id="options"> |
|
97 | + <div style="display: <?php if ($formSent && ($coachAccessStartDate != '0000-00-00 00:00:00' || $coachAccessEndDate != '0000-00-00 00:00:00')) echo 'block'; else echo 'none'; ?>;" id="options"> |
|
98 | 98 | <div class="form-group"> |
99 | 99 | <label class="col-sm-3 control-label"><?php echo get_lang('DateStart') ?></label> |
100 | 100 | <div class="col-sm-6"> |
101 | 101 | <select name="day_start"> |
102 | 102 | <option value="1">01</option> |
103 | - <option value="2" <?php if($day_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
104 | - <option value="3" <?php if($day_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
105 | - <option value="4" <?php if($day_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
106 | - <option value="5" <?php if($day_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
107 | - <option value="6" <?php if($day_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
108 | - <option value="7" <?php if($day_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
109 | - <option value="8" <?php if($day_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
110 | - <option value="9" <?php if($day_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
111 | - <option value="10" <?php if($day_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
112 | - <option value="11" <?php if($day_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
113 | - <option value="12" <?php if($day_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
114 | - <option value="13" <?php if($day_start == 13) echo 'selected="selected"'; ?> >13</option> |
|
115 | - <option value="14" <?php if($day_start == 14) echo 'selected="selected"'; ?> >14</option> |
|
116 | - <option value="15" <?php if($day_start == 15) echo 'selected="selected"'; ?> >15</option> |
|
117 | - <option value="16" <?php if($day_start == 16) echo 'selected="selected"'; ?> >16</option> |
|
118 | - <option value="17" <?php if($day_start == 17) echo 'selected="selected"'; ?> >17</option> |
|
119 | - <option value="18" <?php if($day_start == 18) echo 'selected="selected"'; ?> >18</option> |
|
120 | - <option value="19" <?php if($day_start == 19) echo 'selected="selected"'; ?> >19</option> |
|
121 | - <option value="20" <?php if($day_start == 20) echo 'selected="selected"'; ?> >20</option> |
|
122 | - <option value="21" <?php if($day_start == 21) echo 'selected="selected"'; ?> >21</option> |
|
123 | - <option value="22" <?php if($day_start == 22) echo 'selected="selected"'; ?> >22</option> |
|
124 | - <option value="23" <?php if($day_start == 23) echo 'selected="selected"'; ?> >23</option> |
|
125 | - <option value="24" <?php if($day_start == 24) echo 'selected="selected"'; ?> >24</option> |
|
126 | - <option value="25" <?php if($day_start == 25) echo 'selected="selected"'; ?> >25</option> |
|
127 | - <option value="26" <?php if($day_start == 26) echo 'selected="selected"'; ?> >26</option> |
|
128 | - <option value="27" <?php if($day_start == 27) echo 'selected="selected"'; ?> >27</option> |
|
129 | - <option value="28" <?php if($day_start == 28) echo 'selected="selected"'; ?> >28</option> |
|
130 | - <option value="29" <?php if($day_start == 29) echo 'selected="selected"'; ?> >29</option> |
|
131 | - <option value="30" <?php if($day_start == 30) echo 'selected="selected"'; ?> >30</option> |
|
132 | - <option value="31" <?php if($day_start == 31) echo 'selected="selected"'; ?> >31</option> |
|
103 | + <option value="2" <?php if ($day_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
104 | + <option value="3" <?php if ($day_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
105 | + <option value="4" <?php if ($day_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
106 | + <option value="5" <?php if ($day_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
107 | + <option value="6" <?php if ($day_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
108 | + <option value="7" <?php if ($day_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
109 | + <option value="8" <?php if ($day_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
110 | + <option value="9" <?php if ($day_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
111 | + <option value="10" <?php if ($day_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
112 | + <option value="11" <?php if ($day_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
113 | + <option value="12" <?php if ($day_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
114 | + <option value="13" <?php if ($day_start == 13) echo 'selected="selected"'; ?> >13</option> |
|
115 | + <option value="14" <?php if ($day_start == 14) echo 'selected="selected"'; ?> >14</option> |
|
116 | + <option value="15" <?php if ($day_start == 15) echo 'selected="selected"'; ?> >15</option> |
|
117 | + <option value="16" <?php if ($day_start == 16) echo 'selected="selected"'; ?> >16</option> |
|
118 | + <option value="17" <?php if ($day_start == 17) echo 'selected="selected"'; ?> >17</option> |
|
119 | + <option value="18" <?php if ($day_start == 18) echo 'selected="selected"'; ?> >18</option> |
|
120 | + <option value="19" <?php if ($day_start == 19) echo 'selected="selected"'; ?> >19</option> |
|
121 | + <option value="20" <?php if ($day_start == 20) echo 'selected="selected"'; ?> >20</option> |
|
122 | + <option value="21" <?php if ($day_start == 21) echo 'selected="selected"'; ?> >21</option> |
|
123 | + <option value="22" <?php if ($day_start == 22) echo 'selected="selected"'; ?> >22</option> |
|
124 | + <option value="23" <?php if ($day_start == 23) echo 'selected="selected"'; ?> >23</option> |
|
125 | + <option value="24" <?php if ($day_start == 24) echo 'selected="selected"'; ?> >24</option> |
|
126 | + <option value="25" <?php if ($day_start == 25) echo 'selected="selected"'; ?> >25</option> |
|
127 | + <option value="26" <?php if ($day_start == 26) echo 'selected="selected"'; ?> >26</option> |
|
128 | + <option value="27" <?php if ($day_start == 27) echo 'selected="selected"'; ?> >27</option> |
|
129 | + <option value="28" <?php if ($day_start == 28) echo 'selected="selected"'; ?> >28</option> |
|
130 | + <option value="29" <?php if ($day_start == 29) echo 'selected="selected"'; ?> >29</option> |
|
131 | + <option value="30" <?php if ($day_start == 30) echo 'selected="selected"'; ?> >30</option> |
|
132 | + <option value="31" <?php if ($day_start == 31) echo 'selected="selected"'; ?> >31</option> |
|
133 | 133 | </select> |
134 | 134 | / |
135 | 135 | <select name="month_start"> |
136 | 136 | <option value="1">01</option> |
137 | - <option value="2" <?php if($month_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
138 | - <option value="3" <?php if($month_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
139 | - <option value="4" <?php if($month_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
140 | - <option value="5" <?php if($month_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
141 | - <option value="6" <?php if($month_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
142 | - <option value="7" <?php if($month_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
143 | - <option value="8" <?php if($month_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
144 | - <option value="9" <?php if($month_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
145 | - <option value="10" <?php if($month_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
146 | - <option value="11" <?php if($month_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
147 | - <option value="12" <?php if($month_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
137 | + <option value="2" <?php if ($month_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
138 | + <option value="3" <?php if ($month_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
139 | + <option value="4" <?php if ($month_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
140 | + <option value="5" <?php if ($month_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
141 | + <option value="6" <?php if ($month_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
142 | + <option value="7" <?php if ($month_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
143 | + <option value="8" <?php if ($month_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
144 | + <option value="9" <?php if ($month_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
145 | + <option value="10" <?php if ($month_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
146 | + <option value="11" <?php if ($month_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
147 | + <option value="12" <?php if ($month_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
148 | 148 | </select> |
149 | 149 | / |
150 | 150 | <select name="year_start"> |
151 | 151 | <?php |
152 | - for($i=$thisYear-5;$i <= ($thisYear+5);$i++) |
|
152 | + for ($i = $thisYear - 5; $i <= ($thisYear + 5); $i++) |
|
153 | 153 | { ?> |
154 | - <option value="<?php echo $i; ?>" <?php if($year_start == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
154 | + <option value="<?php echo $i; ?>" <?php if ($year_start == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
155 | 155 | <?php |
156 | 156 | } ?> |
157 | 157 | </select> |
@@ -163,61 +163,61 @@ discard block |
||
163 | 163 | <div class="col-sm-6"> |
164 | 164 | <select name="day_end"> |
165 | 165 | <option value="0">--</option> |
166 | - <option value="1" <?php if($day_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
167 | - <option value="2" <?php if($day_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
168 | - <option value="3" <?php if($day_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
169 | - <option value="4" <?php if($day_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
170 | - <option value="5" <?php if($day_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
171 | - <option value="6" <?php if($day_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
172 | - <option value="7" <?php if($day_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
173 | - <option value="8" <?php if($day_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
174 | - <option value="9" <?php if($day_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
175 | - <option value="10" <?php if($day_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
176 | - <option value="11" <?php if($day_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
177 | - <option value="12" <?php if($day_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
178 | - <option value="13" <?php if($day_end == 13) echo 'selected="selected"'; ?> >13</option> |
|
179 | - <option value="14" <?php if($day_end == 14) echo 'selected="selected"'; ?> >14</option> |
|
180 | - <option value="15" <?php if($day_end == 15) echo 'selected="selected"'; ?> >15</option> |
|
181 | - <option value="16" <?php if($day_end == 16) echo 'selected="selected"'; ?> >16</option> |
|
182 | - <option value="17" <?php if($day_end == 17) echo 'selected="selected"'; ?> >17</option> |
|
183 | - <option value="18" <?php if($day_end == 18) echo 'selected="selected"'; ?> >18</option> |
|
184 | - <option value="19" <?php if($day_end == 19) echo 'selected="selected"'; ?> >19</option> |
|
185 | - <option value="20" <?php if($day_end == 20) echo 'selected="selected"'; ?> >20</option> |
|
186 | - <option value="21" <?php if($day_end == 21) echo 'selected="selected"'; ?> >21</option> |
|
187 | - <option value="22" <?php if($day_end == 22) echo 'selected="selected"'; ?> >22</option> |
|
188 | - <option value="23" <?php if($day_end == 23) echo 'selected="selected"'; ?> >23</option> |
|
189 | - <option value="24" <?php if($day_end == 24) echo 'selected="selected"'; ?> >24</option> |
|
190 | - <option value="25" <?php if($day_end == 25) echo 'selected="selected"'; ?> >25</option> |
|
191 | - <option value="26" <?php if($day_end == 26) echo 'selected="selected"'; ?> >26</option> |
|
192 | - <option value="27" <?php if($day_end == 27) echo 'selected="selected"'; ?> >27</option> |
|
193 | - <option value="28" <?php if($day_end == 28) echo 'selected="selected"'; ?> >28</option> |
|
194 | - <option value="29" <?php if($day_end == 29) echo 'selected="selected"'; ?> >29</option> |
|
195 | - <option value="30" <?php if($day_end == 30) echo 'selected="selected"'; ?> >30</option> |
|
196 | - <option value="31" <?php if($day_end == 31) echo 'selected="selected"'; ?> >31</option> |
|
166 | + <option value="1" <?php if ($day_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
167 | + <option value="2" <?php if ($day_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
168 | + <option value="3" <?php if ($day_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
169 | + <option value="4" <?php if ($day_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
170 | + <option value="5" <?php if ($day_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
171 | + <option value="6" <?php if ($day_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
172 | + <option value="7" <?php if ($day_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
173 | + <option value="8" <?php if ($day_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
174 | + <option value="9" <?php if ($day_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
175 | + <option value="10" <?php if ($day_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
176 | + <option value="11" <?php if ($day_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
177 | + <option value="12" <?php if ($day_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
178 | + <option value="13" <?php if ($day_end == 13) echo 'selected="selected"'; ?> >13</option> |
|
179 | + <option value="14" <?php if ($day_end == 14) echo 'selected="selected"'; ?> >14</option> |
|
180 | + <option value="15" <?php if ($day_end == 15) echo 'selected="selected"'; ?> >15</option> |
|
181 | + <option value="16" <?php if ($day_end == 16) echo 'selected="selected"'; ?> >16</option> |
|
182 | + <option value="17" <?php if ($day_end == 17) echo 'selected="selected"'; ?> >17</option> |
|
183 | + <option value="18" <?php if ($day_end == 18) echo 'selected="selected"'; ?> >18</option> |
|
184 | + <option value="19" <?php if ($day_end == 19) echo 'selected="selected"'; ?> >19</option> |
|
185 | + <option value="20" <?php if ($day_end == 20) echo 'selected="selected"'; ?> >20</option> |
|
186 | + <option value="21" <?php if ($day_end == 21) echo 'selected="selected"'; ?> >21</option> |
|
187 | + <option value="22" <?php if ($day_end == 22) echo 'selected="selected"'; ?> >22</option> |
|
188 | + <option value="23" <?php if ($day_end == 23) echo 'selected="selected"'; ?> >23</option> |
|
189 | + <option value="24" <?php if ($day_end == 24) echo 'selected="selected"'; ?> >24</option> |
|
190 | + <option value="25" <?php if ($day_end == 25) echo 'selected="selected"'; ?> >25</option> |
|
191 | + <option value="26" <?php if ($day_end == 26) echo 'selected="selected"'; ?> >26</option> |
|
192 | + <option value="27" <?php if ($day_end == 27) echo 'selected="selected"'; ?> >27</option> |
|
193 | + <option value="28" <?php if ($day_end == 28) echo 'selected="selected"'; ?> >28</option> |
|
194 | + <option value="29" <?php if ($day_end == 29) echo 'selected="selected"'; ?> >29</option> |
|
195 | + <option value="30" <?php if ($day_end == 30) echo 'selected="selected"'; ?> >30</option> |
|
196 | + <option value="31" <?php if ($day_end == 31) echo 'selected="selected"'; ?> >31</option> |
|
197 | 197 | </select> |
198 | 198 | / |
199 | 199 | <select name="month_end"> |
200 | 200 | <option value="0">--</option> |
201 | - <option value="1" <?php if($month_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
202 | - <option value="2" <?php if($month_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
203 | - <option value="3" <?php if($month_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
204 | - <option value="4" <?php if($month_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
205 | - <option value="5" <?php if($month_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
206 | - <option value="6" <?php if($month_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
207 | - <option value="7" <?php if($month_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
208 | - <option value="8" <?php if($month_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
209 | - <option value="9" <?php if($month_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
210 | - <option value="10" <?php if($month_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
211 | - <option value="11" <?php if($month_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
212 | - <option value="12" <?php if($month_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
201 | + <option value="1" <?php if ($month_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
202 | + <option value="2" <?php if ($month_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
203 | + <option value="3" <?php if ($month_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
204 | + <option value="4" <?php if ($month_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
205 | + <option value="5" <?php if ($month_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
206 | + <option value="6" <?php if ($month_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
207 | + <option value="7" <?php if ($month_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
208 | + <option value="8" <?php if ($month_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
209 | + <option value="9" <?php if ($month_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
210 | + <option value="10" <?php if ($month_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
211 | + <option value="11" <?php if ($month_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
212 | + <option value="12" <?php if ($month_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
213 | 213 | </select> |
214 | 214 | / |
215 | 215 | <select name="year_end"> |
216 | 216 | <option value="0">----</option> |
217 | 217 | <?php |
218 | - for($i=$thisYear-5;$i <= ($thisYear+5);$i++) |
|
218 | + for ($i = $thisYear - 5; $i <= ($thisYear + 5); $i++) |
|
219 | 219 | { ?> |
220 | - <option value="<?php echo $i; ?>" <?php if($year_end == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
220 | + <option value="<?php echo $i; ?>" <?php if ($year_end == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
221 | 221 | <?php |
222 | 222 | } ?> |
223 | 223 | </select> |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | |
240 | 240 | <script> |
241 | -<?php if($year_start=="0000") echo "setDisable(document.form.nolimit);\r\n"; ?> |
|
241 | +<?php if ($year_start == "0000") echo "setDisable(document.form.nolimit);\r\n"; ?> |
|
242 | 242 | function setDisable(select){ |
243 | 243 | document.form.day_start.disabled = (select.checked) ? true : false; |
244 | 244 | document.form.month_start.disabled = (select.checked) ? true : false; |
@@ -84,7 +84,12 @@ discard block |
||
84 | 84 | <div class="form-group"> |
85 | 85 | <label class="col-sm-3 control-label"><?php echo get_lang('SessionName') ?></label> |
86 | 86 | <div class="col-sm-6"> |
87 | - <input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); else echo api_htmlentities($infos['name'],ENT_QUOTES,$charset); ?>"> |
|
87 | + <input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) { |
|
88 | + echo api_htmlentities($name,ENT_QUOTES,$charset); |
|
89 | +} else { |
|
90 | + echo api_htmlentities($infos['name'],ENT_QUOTES,$charset); |
|
91 | +} |
|
92 | +?>"> |
|
88 | 93 | </div> |
89 | 94 | <div class="col-sm-3"></div> |
90 | 95 | </div> |
@@ -94,64 +99,195 @@ discard block |
||
94 | 99 | <a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('EditTimeLimit') ?></a> |
95 | 100 | </div> |
96 | 101 | </div> |
97 | - <div style="display: <?php if($formSent && ($coachAccessStartDate!='0000-00-00 00:00:00' || $coachAccessEndDate!='0000-00-00 00:00:00')) echo 'block'; else echo 'none'; ?>;" id="options"> |
|
102 | + <div style="display: <?php if($formSent && ($coachAccessStartDate!='0000-00-00 00:00:00' || $coachAccessEndDate!='0000-00-00 00:00:00')) { |
|
103 | + echo 'block'; |
|
104 | +} else { |
|
105 | + echo 'none'; |
|
106 | +} |
|
107 | +?>;" id="options"> |
|
98 | 108 | <div class="form-group"> |
99 | 109 | <label class="col-sm-3 control-label"><?php echo get_lang('DateStart') ?></label> |
100 | 110 | <div class="col-sm-6"> |
101 | 111 | <select name="day_start"> |
102 | 112 | <option value="1">01</option> |
103 | - <option value="2" <?php if($day_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
104 | - <option value="3" <?php if($day_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
105 | - <option value="4" <?php if($day_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
106 | - <option value="5" <?php if($day_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
107 | - <option value="6" <?php if($day_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
108 | - <option value="7" <?php if($day_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
109 | - <option value="8" <?php if($day_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
110 | - <option value="9" <?php if($day_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
111 | - <option value="10" <?php if($day_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
112 | - <option value="11" <?php if($day_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
113 | - <option value="12" <?php if($day_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
114 | - <option value="13" <?php if($day_start == 13) echo 'selected="selected"'; ?> >13</option> |
|
115 | - <option value="14" <?php if($day_start == 14) echo 'selected="selected"'; ?> >14</option> |
|
116 | - <option value="15" <?php if($day_start == 15) echo 'selected="selected"'; ?> >15</option> |
|
117 | - <option value="16" <?php if($day_start == 16) echo 'selected="selected"'; ?> >16</option> |
|
118 | - <option value="17" <?php if($day_start == 17) echo 'selected="selected"'; ?> >17</option> |
|
119 | - <option value="18" <?php if($day_start == 18) echo 'selected="selected"'; ?> >18</option> |
|
120 | - <option value="19" <?php if($day_start == 19) echo 'selected="selected"'; ?> >19</option> |
|
121 | - <option value="20" <?php if($day_start == 20) echo 'selected="selected"'; ?> >20</option> |
|
122 | - <option value="21" <?php if($day_start == 21) echo 'selected="selected"'; ?> >21</option> |
|
123 | - <option value="22" <?php if($day_start == 22) echo 'selected="selected"'; ?> >22</option> |
|
124 | - <option value="23" <?php if($day_start == 23) echo 'selected="selected"'; ?> >23</option> |
|
125 | - <option value="24" <?php if($day_start == 24) echo 'selected="selected"'; ?> >24</option> |
|
126 | - <option value="25" <?php if($day_start == 25) echo 'selected="selected"'; ?> >25</option> |
|
127 | - <option value="26" <?php if($day_start == 26) echo 'selected="selected"'; ?> >26</option> |
|
128 | - <option value="27" <?php if($day_start == 27) echo 'selected="selected"'; ?> >27</option> |
|
129 | - <option value="28" <?php if($day_start == 28) echo 'selected="selected"'; ?> >28</option> |
|
130 | - <option value="29" <?php if($day_start == 29) echo 'selected="selected"'; ?> >29</option> |
|
131 | - <option value="30" <?php if($day_start == 30) echo 'selected="selected"'; ?> >30</option> |
|
132 | - <option value="31" <?php if($day_start == 31) echo 'selected="selected"'; ?> >31</option> |
|
113 | + <option value="2" <?php if($day_start == 2) { |
|
114 | + echo 'selected="selected"'; |
|
115 | +} |
|
116 | +?> >02</option> |
|
117 | + <option value="3" <?php if($day_start == 3) { |
|
118 | + echo 'selected="selected"'; |
|
119 | +} |
|
120 | +?> >03</option> |
|
121 | + <option value="4" <?php if($day_start == 4) { |
|
122 | + echo 'selected="selected"'; |
|
123 | +} |
|
124 | +?> >04</option> |
|
125 | + <option value="5" <?php if($day_start == 5) { |
|
126 | + echo 'selected="selected"'; |
|
127 | +} |
|
128 | +?> >05</option> |
|
129 | + <option value="6" <?php if($day_start == 6) { |
|
130 | + echo 'selected="selected"'; |
|
131 | +} |
|
132 | +?> >06</option> |
|
133 | + <option value="7" <?php if($day_start == 7) { |
|
134 | + echo 'selected="selected"'; |
|
135 | +} |
|
136 | +?> >07</option> |
|
137 | + <option value="8" <?php if($day_start == 8) { |
|
138 | + echo 'selected="selected"'; |
|
139 | +} |
|
140 | +?> >08</option> |
|
141 | + <option value="9" <?php if($day_start == 9) { |
|
142 | + echo 'selected="selected"'; |
|
143 | +} |
|
144 | +?> >09</option> |
|
145 | + <option value="10" <?php if($day_start == 10) { |
|
146 | + echo 'selected="selected"'; |
|
147 | +} |
|
148 | +?> >10</option> |
|
149 | + <option value="11" <?php if($day_start == 11) { |
|
150 | + echo 'selected="selected"'; |
|
151 | +} |
|
152 | +?> >11</option> |
|
153 | + <option value="12" <?php if($day_start == 12) { |
|
154 | + echo 'selected="selected"'; |
|
155 | +} |
|
156 | +?> >12</option> |
|
157 | + <option value="13" <?php if($day_start == 13) { |
|
158 | + echo 'selected="selected"'; |
|
159 | +} |
|
160 | +?> >13</option> |
|
161 | + <option value="14" <?php if($day_start == 14) { |
|
162 | + echo 'selected="selected"'; |
|
163 | +} |
|
164 | +?> >14</option> |
|
165 | + <option value="15" <?php if($day_start == 15) { |
|
166 | + echo 'selected="selected"'; |
|
167 | +} |
|
168 | +?> >15</option> |
|
169 | + <option value="16" <?php if($day_start == 16) { |
|
170 | + echo 'selected="selected"'; |
|
171 | +} |
|
172 | +?> >16</option> |
|
173 | + <option value="17" <?php if($day_start == 17) { |
|
174 | + echo 'selected="selected"'; |
|
175 | +} |
|
176 | +?> >17</option> |
|
177 | + <option value="18" <?php if($day_start == 18) { |
|
178 | + echo 'selected="selected"'; |
|
179 | +} |
|
180 | +?> >18</option> |
|
181 | + <option value="19" <?php if($day_start == 19) { |
|
182 | + echo 'selected="selected"'; |
|
183 | +} |
|
184 | +?> >19</option> |
|
185 | + <option value="20" <?php if($day_start == 20) { |
|
186 | + echo 'selected="selected"'; |
|
187 | +} |
|
188 | +?> >20</option> |
|
189 | + <option value="21" <?php if($day_start == 21) { |
|
190 | + echo 'selected="selected"'; |
|
191 | +} |
|
192 | +?> >21</option> |
|
193 | + <option value="22" <?php if($day_start == 22) { |
|
194 | + echo 'selected="selected"'; |
|
195 | +} |
|
196 | +?> >22</option> |
|
197 | + <option value="23" <?php if($day_start == 23) { |
|
198 | + echo 'selected="selected"'; |
|
199 | +} |
|
200 | +?> >23</option> |
|
201 | + <option value="24" <?php if($day_start == 24) { |
|
202 | + echo 'selected="selected"'; |
|
203 | +} |
|
204 | +?> >24</option> |
|
205 | + <option value="25" <?php if($day_start == 25) { |
|
206 | + echo 'selected="selected"'; |
|
207 | +} |
|
208 | +?> >25</option> |
|
209 | + <option value="26" <?php if($day_start == 26) { |
|
210 | + echo 'selected="selected"'; |
|
211 | +} |
|
212 | +?> >26</option> |
|
213 | + <option value="27" <?php if($day_start == 27) { |
|
214 | + echo 'selected="selected"'; |
|
215 | +} |
|
216 | +?> >27</option> |
|
217 | + <option value="28" <?php if($day_start == 28) { |
|
218 | + echo 'selected="selected"'; |
|
219 | +} |
|
220 | +?> >28</option> |
|
221 | + <option value="29" <?php if($day_start == 29) { |
|
222 | + echo 'selected="selected"'; |
|
223 | +} |
|
224 | +?> >29</option> |
|
225 | + <option value="30" <?php if($day_start == 30) { |
|
226 | + echo 'selected="selected"'; |
|
227 | +} |
|
228 | +?> >30</option> |
|
229 | + <option value="31" <?php if($day_start == 31) { |
|
230 | + echo 'selected="selected"'; |
|
231 | +} |
|
232 | +?> >31</option> |
|
133 | 233 | </select> |
134 | 234 | / |
135 | 235 | <select name="month_start"> |
136 | 236 | <option value="1">01</option> |
137 | - <option value="2" <?php if($month_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
138 | - <option value="3" <?php if($month_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
139 | - <option value="4" <?php if($month_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
140 | - <option value="5" <?php if($month_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
141 | - <option value="6" <?php if($month_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
142 | - <option value="7" <?php if($month_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
143 | - <option value="8" <?php if($month_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
144 | - <option value="9" <?php if($month_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
145 | - <option value="10" <?php if($month_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
146 | - <option value="11" <?php if($month_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
147 | - <option value="12" <?php if($month_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
237 | + <option value="2" <?php if($month_start == 2) { |
|
238 | + echo 'selected="selected"'; |
|
239 | +} |
|
240 | +?> >02</option> |
|
241 | + <option value="3" <?php if($month_start == 3) { |
|
242 | + echo 'selected="selected"'; |
|
243 | +} |
|
244 | +?> >03</option> |
|
245 | + <option value="4" <?php if($month_start == 4) { |
|
246 | + echo 'selected="selected"'; |
|
247 | +} |
|
248 | +?> >04</option> |
|
249 | + <option value="5" <?php if($month_start == 5) { |
|
250 | + echo 'selected="selected"'; |
|
251 | +} |
|
252 | +?> >05</option> |
|
253 | + <option value="6" <?php if($month_start == 6) { |
|
254 | + echo 'selected="selected"'; |
|
255 | +} |
|
256 | +?> >06</option> |
|
257 | + <option value="7" <?php if($month_start == 7) { |
|
258 | + echo 'selected="selected"'; |
|
259 | +} |
|
260 | +?> >07</option> |
|
261 | + <option value="8" <?php if($month_start == 8) { |
|
262 | + echo 'selected="selected"'; |
|
263 | +} |
|
264 | +?> >08</option> |
|
265 | + <option value="9" <?php if($month_start == 9) { |
|
266 | + echo 'selected="selected"'; |
|
267 | +} |
|
268 | +?> >09</option> |
|
269 | + <option value="10" <?php if($month_start == 10) { |
|
270 | + echo 'selected="selected"'; |
|
271 | +} |
|
272 | +?> >10</option> |
|
273 | + <option value="11" <?php if($month_start == 11) { |
|
274 | + echo 'selected="selected"'; |
|
275 | +} |
|
276 | +?> >11</option> |
|
277 | + <option value="12" <?php if($month_start == 12) { |
|
278 | + echo 'selected="selected"'; |
|
279 | +} |
|
280 | +?> >12</option> |
|
148 | 281 | </select> |
149 | 282 | / |
150 | 283 | <select name="year_start"> |
151 | 284 | <?php |
152 | 285 | for($i=$thisYear-5;$i <= ($thisYear+5);$i++) |
153 | 286 | { ?> |
154 | - <option value="<?php echo $i; ?>" <?php if($year_start == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
287 | + <option value="<?php echo $i; ?>" <?php if($year_start == $i) { |
|
288 | + echo 'selected="selected"'; |
|
289 | +} |
|
290 | +?> ><?php echo $i; ?></option> |
|
155 | 291 | <?php |
156 | 292 | } ?> |
157 | 293 | </select> |
@@ -163,53 +299,182 @@ discard block |
||
163 | 299 | <div class="col-sm-6"> |
164 | 300 | <select name="day_end"> |
165 | 301 | <option value="0">--</option> |
166 | - <option value="1" <?php if($day_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
167 | - <option value="2" <?php if($day_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
168 | - <option value="3" <?php if($day_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
169 | - <option value="4" <?php if($day_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
170 | - <option value="5" <?php if($day_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
171 | - <option value="6" <?php if($day_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
172 | - <option value="7" <?php if($day_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
173 | - <option value="8" <?php if($day_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
174 | - <option value="9" <?php if($day_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
175 | - <option value="10" <?php if($day_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
176 | - <option value="11" <?php if($day_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
177 | - <option value="12" <?php if($day_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
178 | - <option value="13" <?php if($day_end == 13) echo 'selected="selected"'; ?> >13</option> |
|
179 | - <option value="14" <?php if($day_end == 14) echo 'selected="selected"'; ?> >14</option> |
|
180 | - <option value="15" <?php if($day_end == 15) echo 'selected="selected"'; ?> >15</option> |
|
181 | - <option value="16" <?php if($day_end == 16) echo 'selected="selected"'; ?> >16</option> |
|
182 | - <option value="17" <?php if($day_end == 17) echo 'selected="selected"'; ?> >17</option> |
|
183 | - <option value="18" <?php if($day_end == 18) echo 'selected="selected"'; ?> >18</option> |
|
184 | - <option value="19" <?php if($day_end == 19) echo 'selected="selected"'; ?> >19</option> |
|
185 | - <option value="20" <?php if($day_end == 20) echo 'selected="selected"'; ?> >20</option> |
|
186 | - <option value="21" <?php if($day_end == 21) echo 'selected="selected"'; ?> >21</option> |
|
187 | - <option value="22" <?php if($day_end == 22) echo 'selected="selected"'; ?> >22</option> |
|
188 | - <option value="23" <?php if($day_end == 23) echo 'selected="selected"'; ?> >23</option> |
|
189 | - <option value="24" <?php if($day_end == 24) echo 'selected="selected"'; ?> >24</option> |
|
190 | - <option value="25" <?php if($day_end == 25) echo 'selected="selected"'; ?> >25</option> |
|
191 | - <option value="26" <?php if($day_end == 26) echo 'selected="selected"'; ?> >26</option> |
|
192 | - <option value="27" <?php if($day_end == 27) echo 'selected="selected"'; ?> >27</option> |
|
193 | - <option value="28" <?php if($day_end == 28) echo 'selected="selected"'; ?> >28</option> |
|
194 | - <option value="29" <?php if($day_end == 29) echo 'selected="selected"'; ?> >29</option> |
|
195 | - <option value="30" <?php if($day_end == 30) echo 'selected="selected"'; ?> >30</option> |
|
196 | - <option value="31" <?php if($day_end == 31) echo 'selected="selected"'; ?> >31</option> |
|
302 | + <option value="1" <?php if($day_end == 1) { |
|
303 | + echo 'selected="selected"'; |
|
304 | +} |
|
305 | +?> >01</option> |
|
306 | + <option value="2" <?php if($day_end == 2) { |
|
307 | + echo 'selected="selected"'; |
|
308 | +} |
|
309 | +?> >02</option> |
|
310 | + <option value="3" <?php if($day_end == 3) { |
|
311 | + echo 'selected="selected"'; |
|
312 | +} |
|
313 | +?> >03</option> |
|
314 | + <option value="4" <?php if($day_end == 4) { |
|
315 | + echo 'selected="selected"'; |
|
316 | +} |
|
317 | +?> >04</option> |
|
318 | + <option value="5" <?php if($day_end == 5) { |
|
319 | + echo 'selected="selected"'; |
|
320 | +} |
|
321 | +?> >05</option> |
|
322 | + <option value="6" <?php if($day_end == 6) { |
|
323 | + echo 'selected="selected"'; |
|
324 | +} |
|
325 | +?> >06</option> |
|
326 | + <option value="7" <?php if($day_end == 7) { |
|
327 | + echo 'selected="selected"'; |
|
328 | +} |
|
329 | +?> >07</option> |
|
330 | + <option value="8" <?php if($day_end == 8) { |
|
331 | + echo 'selected="selected"'; |
|
332 | +} |
|
333 | +?> >08</option> |
|
334 | + <option value="9" <?php if($day_end == 9) { |
|
335 | + echo 'selected="selected"'; |
|
336 | +} |
|
337 | +?> >09</option> |
|
338 | + <option value="10" <?php if($day_end == 10) { |
|
339 | + echo 'selected="selected"'; |
|
340 | +} |
|
341 | +?> >10</option> |
|
342 | + <option value="11" <?php if($day_end == 11) { |
|
343 | + echo 'selected="selected"'; |
|
344 | +} |
|
345 | +?> >11</option> |
|
346 | + <option value="12" <?php if($day_end == 12) { |
|
347 | + echo 'selected="selected"'; |
|
348 | +} |
|
349 | +?> >12</option> |
|
350 | + <option value="13" <?php if($day_end == 13) { |
|
351 | + echo 'selected="selected"'; |
|
352 | +} |
|
353 | +?> >13</option> |
|
354 | + <option value="14" <?php if($day_end == 14) { |
|
355 | + echo 'selected="selected"'; |
|
356 | +} |
|
357 | +?> >14</option> |
|
358 | + <option value="15" <?php if($day_end == 15) { |
|
359 | + echo 'selected="selected"'; |
|
360 | +} |
|
361 | +?> >15</option> |
|
362 | + <option value="16" <?php if($day_end == 16) { |
|
363 | + echo 'selected="selected"'; |
|
364 | +} |
|
365 | +?> >16</option> |
|
366 | + <option value="17" <?php if($day_end == 17) { |
|
367 | + echo 'selected="selected"'; |
|
368 | +} |
|
369 | +?> >17</option> |
|
370 | + <option value="18" <?php if($day_end == 18) { |
|
371 | + echo 'selected="selected"'; |
|
372 | +} |
|
373 | +?> >18</option> |
|
374 | + <option value="19" <?php if($day_end == 19) { |
|
375 | + echo 'selected="selected"'; |
|
376 | +} |
|
377 | +?> >19</option> |
|
378 | + <option value="20" <?php if($day_end == 20) { |
|
379 | + echo 'selected="selected"'; |
|
380 | +} |
|
381 | +?> >20</option> |
|
382 | + <option value="21" <?php if($day_end == 21) { |
|
383 | + echo 'selected="selected"'; |
|
384 | +} |
|
385 | +?> >21</option> |
|
386 | + <option value="22" <?php if($day_end == 22) { |
|
387 | + echo 'selected="selected"'; |
|
388 | +} |
|
389 | +?> >22</option> |
|
390 | + <option value="23" <?php if($day_end == 23) { |
|
391 | + echo 'selected="selected"'; |
|
392 | +} |
|
393 | +?> >23</option> |
|
394 | + <option value="24" <?php if($day_end == 24) { |
|
395 | + echo 'selected="selected"'; |
|
396 | +} |
|
397 | +?> >24</option> |
|
398 | + <option value="25" <?php if($day_end == 25) { |
|
399 | + echo 'selected="selected"'; |
|
400 | +} |
|
401 | +?> >25</option> |
|
402 | + <option value="26" <?php if($day_end == 26) { |
|
403 | + echo 'selected="selected"'; |
|
404 | +} |
|
405 | +?> >26</option> |
|
406 | + <option value="27" <?php if($day_end == 27) { |
|
407 | + echo 'selected="selected"'; |
|
408 | +} |
|
409 | +?> >27</option> |
|
410 | + <option value="28" <?php if($day_end == 28) { |
|
411 | + echo 'selected="selected"'; |
|
412 | +} |
|
413 | +?> >28</option> |
|
414 | + <option value="29" <?php if($day_end == 29) { |
|
415 | + echo 'selected="selected"'; |
|
416 | +} |
|
417 | +?> >29</option> |
|
418 | + <option value="30" <?php if($day_end == 30) { |
|
419 | + echo 'selected="selected"'; |
|
420 | +} |
|
421 | +?> >30</option> |
|
422 | + <option value="31" <?php if($day_end == 31) { |
|
423 | + echo 'selected="selected"'; |
|
424 | +} |
|
425 | +?> >31</option> |
|
197 | 426 | </select> |
198 | 427 | / |
199 | 428 | <select name="month_end"> |
200 | 429 | <option value="0">--</option> |
201 | - <option value="1" <?php if($month_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
202 | - <option value="2" <?php if($month_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
203 | - <option value="3" <?php if($month_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
204 | - <option value="4" <?php if($month_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
205 | - <option value="5" <?php if($month_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
206 | - <option value="6" <?php if($month_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
207 | - <option value="7" <?php if($month_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
208 | - <option value="8" <?php if($month_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
209 | - <option value="9" <?php if($month_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
210 | - <option value="10" <?php if($month_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
211 | - <option value="11" <?php if($month_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
212 | - <option value="12" <?php if($month_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
430 | + <option value="1" <?php if($month_end == 1) { |
|
431 | + echo 'selected="selected"'; |
|
432 | +} |
|
433 | +?> >01</option> |
|
434 | + <option value="2" <?php if($month_end == 2) { |
|
435 | + echo 'selected="selected"'; |
|
436 | +} |
|
437 | +?> >02</option> |
|
438 | + <option value="3" <?php if($month_end == 3) { |
|
439 | + echo 'selected="selected"'; |
|
440 | +} |
|
441 | +?> >03</option> |
|
442 | + <option value="4" <?php if($month_end == 4) { |
|
443 | + echo 'selected="selected"'; |
|
444 | +} |
|
445 | +?> >04</option> |
|
446 | + <option value="5" <?php if($month_end == 5) { |
|
447 | + echo 'selected="selected"'; |
|
448 | +} |
|
449 | +?> >05</option> |
|
450 | + <option value="6" <?php if($month_end == 6) { |
|
451 | + echo 'selected="selected"'; |
|
452 | +} |
|
453 | +?> >06</option> |
|
454 | + <option value="7" <?php if($month_end == 7) { |
|
455 | + echo 'selected="selected"'; |
|
456 | +} |
|
457 | +?> >07</option> |
|
458 | + <option value="8" <?php if($month_end == 8) { |
|
459 | + echo 'selected="selected"'; |
|
460 | +} |
|
461 | +?> >08</option> |
|
462 | + <option value="9" <?php if($month_end == 9) { |
|
463 | + echo 'selected="selected"'; |
|
464 | +} |
|
465 | +?> >09</option> |
|
466 | + <option value="10" <?php if($month_end == 10) { |
|
467 | + echo 'selected="selected"'; |
|
468 | +} |
|
469 | +?> >10</option> |
|
470 | + <option value="11" <?php if($month_end == 11) { |
|
471 | + echo 'selected="selected"'; |
|
472 | +} |
|
473 | +?> >11</option> |
|
474 | + <option value="12" <?php if($month_end == 12) { |
|
475 | + echo 'selected="selected"'; |
|
476 | +} |
|
477 | +?> >12</option> |
|
213 | 478 | </select> |
214 | 479 | / |
215 | 480 | <select name="year_end"> |
@@ -217,7 +482,10 @@ discard block |
||
217 | 482 | <?php |
218 | 483 | for($i=$thisYear-5;$i <= ($thisYear+5);$i++) |
219 | 484 | { ?> |
220 | - <option value="<?php echo $i; ?>" <?php if($year_end == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
485 | + <option value="<?php echo $i; ?>" <?php if($year_end == $i) { |
|
486 | + echo 'selected="selected"'; |
|
487 | +} |
|
488 | +?> ><?php echo $i; ?></option> |
|
221 | 489 | <?php |
222 | 490 | } ?> |
223 | 491 | </select> |
@@ -238,7 +506,10 @@ discard block |
||
238 | 506 | |
239 | 507 | |
240 | 508 | <script> |
241 | -<?php if($year_start=="0000") echo "setDisable(document.form.nolimit);\r\n"; ?> |
|
509 | +<?php if($year_start=="0000") { |
|
510 | + echo "setDisable(document.form.nolimit);\r\n"; |
|
511 | +} |
|
512 | +?> |
|
242 | 513 | function setDisable(select){ |
243 | 514 | document.form.day_start.disabled = (select.checked) ? true : false; |
244 | 515 | document.form.month_start.disabled = (select.checked) ? true : false; |
@@ -132,8 +132,8 @@ |
||
132 | 132 | |
133 | 133 | /* View */ |
134 | 134 | $template = new Template($session->getName(), true, true, false, true, false); |
135 | -$template->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
136 | -$template->assign('pageUrl', api_get_path(WEB_PATH) . "session/{$session->getId()}/about/"); |
|
135 | +$template->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
136 | +$template->assign('pageUrl', api_get_path(WEB_PATH)."session/{$session->getId()}/about/"); |
|
137 | 137 | $template->assign('session', $session); |
138 | 138 | $template->assign('session_date', $sessionDates); |
139 | 139 | $template->assign( |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $tool_name = get_lang('ImportSessionListXMLCSV'); |
25 | 25 | |
26 | 26 | //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
27 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
27 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
28 | 28 | |
29 | 29 | set_time_limit(0); |
30 | 30 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $form_sent = $_POST['formSent']; |
41 | 41 | $file_type = isset($_POST['file_type']) ? $_POST['file_type'] : null; |
42 | 42 | $send_mail = isset($_POST['sendMail']) && $_POST['sendMail'] ? 1 : 0; |
43 | - $isOverwrite = isset($_POST['overwrite']) && $_POST['overwrite'] ? true: false; |
|
43 | + $isOverwrite = isset($_POST['overwrite']) && $_POST['overwrite'] ? true : false; |
|
44 | 44 | $deleteUsersNotInList = isset($_POST['delete_users_not_in_list']) ? true : false; |
45 | 45 | $sessions = array(); |
46 | 46 | $session_counter = 0; |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $sql = "INSERT IGNORE INTO $tbl_session_user SET |
319 | 319 | user_id ='$user_id', |
320 | 320 | session_id = '$session_id', |
321 | - registered_at = '" . api_get_utc_datetime() . "'"; |
|
321 | + registered_at = '".api_get_utc_datetime()."'"; |
|
322 | 322 | $rs_user = Database::query($sql); |
323 | 323 | $user_counter++; |
324 | 324 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | $sql = "INSERT IGNORE INTO $tbl_session_user SET |
372 | 372 | user_id ='$user_id', |
373 | 373 | session_id = '$session_id', |
374 | - registered_at = '" . api_get_utc_datetime() . "'"; |
|
374 | + registered_at = '".api_get_utc_datetime()."'"; |
|
375 | 375 | $rs_user = Database::query($sql); |
376 | 376 | $user_counter++; |
377 | 377 | // Adding to session_rel_user_rel_course table. |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | |
469 | 469 | echo '<div class="actions">'; |
470 | 470 | echo '<a href="../session/session_list.php">'. |
471 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
471 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
472 | 472 | echo '</div>'; |
473 | 473 | |
474 | 474 | if (!empty($error_message)) { |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | get_lang('FileType'), |
486 | 486 | Display::url( |
487 | 487 | get_lang('ExampleCSVFile'), |
488 | - api_get_path(WEB_CODE_PATH) . 'admin/example_session.csv', |
|
488 | + api_get_path(WEB_CODE_PATH).'admin/example_session.csv', |
|
489 | 489 | ['target' => '_blank'] |
490 | 490 | ) |
491 | 491 | ], |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | null, |
500 | 500 | Display::url( |
501 | 501 | get_lang('ExampleXMLFile'), |
502 | - api_get_path(WEB_CODE_PATH) . 'admin/example_session.xml', |
|
502 | + api_get_path(WEB_CODE_PATH).'admin/example_session.xml', |
|
503 | 503 | ['target' => '_blank'] |
504 | 504 | ) |
505 | 505 | ], |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | $form->addElement('checkbox', 'sendMail', null, get_lang('SendMailToUsers')); |
515 | 515 | $form->addButtonImport(get_lang('ImportSession')); |
516 | 516 | |
517 | -$defaults = array('sendMail' => 'true','file_type' => 'csv'); |
|
517 | +$defaults = array('sendMail' => 'true', 'file_type' => 'csv'); |
|
518 | 518 | $form->setDefaults($defaults); |
519 | 519 | |
520 | 520 | Display::display_normal_message(get_lang('TheXMLImportLetYouAddMoreInfoAndCreateResources')); |