@@ -46,9 +46,9 @@ |
||
46 | 46 | define('ICAL_LANG', api_get_language_isocode()); |
47 | 47 | |
48 | 48 | $ical = new vcalendar(); |
49 | - $ical->setConfig('unique_id',api_get_path(WEB_PATH)); |
|
50 | - $ical->setProperty( 'method', 'PUBLISH' ); |
|
51 | - $ical->setConfig('url',api_get_path(WEB_PATH)); |
|
49 | + $ical->setConfig('unique_id', api_get_path(WEB_PATH)); |
|
50 | + $ical->setProperty('method', 'PUBLISH'); |
|
51 | + $ical->setConfig('url', api_get_path(WEB_PATH)); |
|
52 | 52 | $vevent = new vevent(); |
53 | 53 | |
54 | 54 | switch ($_GET['class']) { |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | if ($current_session == $details['lp_session']) { |
339 | 339 | $dsp_edit_lp = Display::url( |
340 | 340 | Display::return_icon('settings.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL), |
341 | - "lp_controller.php?" . api_get_cidreq() . "&action=edit&lp_id=$id" |
|
341 | + "lp_controller.php?".api_get_cidreq()."&action=edit&lp_id=$id" |
|
342 | 342 | ); |
343 | 343 | } else { |
344 | 344 | $dsp_edit_lp = Display::return_icon( |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | if ($details['lp_type'] == 1 || $details['lp_type'] == 2) { |
355 | 355 | $dsp_build = Display::url( |
356 | 356 | Display::return_icon('edit.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL), |
357 | - 'lp_controller.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
357 | + 'lp_controller.php?'.api_get_cidreq().'&'.http_build_query([ |
|
358 | 358 | 'action' => 'add_item', |
359 | 359 | 'type' => 'step', |
360 | 360 | 'lp_id' => $id, |
@@ -388,19 +388,19 @@ discard block |
||
388 | 388 | if ($details['lp_visibility'] == 0) { |
389 | 389 | $dsp_visible = Display::url( |
390 | 390 | Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL), |
391 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=1" |
|
391 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1" |
|
392 | 392 | ); |
393 | 393 | } else { |
394 | 394 | $dsp_visible = Display::url( |
395 | 395 | Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL), |
396 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=0" |
|
396 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0" |
|
397 | 397 | ); |
398 | 398 | } |
399 | 399 | } |
400 | 400 | |
401 | 401 | //Tracking command |
402 | 402 | $trackingActionUrl = 'lp_controller.php?' |
403 | - . api_get_cidreq() . '&' |
|
403 | + . api_get_cidreq().'&' |
|
404 | 404 | . http_build_query([ |
405 | 405 | 'action' => 'report', |
406 | 406 | 'lp_id' => $id, |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | '', |
422 | 422 | ICON_SIZE_SMALL |
423 | 423 | ), |
424 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=v" |
|
424 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=v" |
|
425 | 425 | ); |
426 | 426 | } else { |
427 | 427 | $dsp_publish = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i'>". |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | '', |
439 | 439 | ICON_SIZE_SMALL |
440 | 440 | ), |
441 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=i" |
|
441 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i" |
|
442 | 442 | ); |
443 | 443 | } |
444 | 444 | } else { |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | '', |
467 | 467 | ICON_SIZE_SMALL |
468 | 468 | ), |
469 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id" |
|
469 | + "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id" |
|
470 | 470 | ); |
471 | 471 | } |
472 | 472 | if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 1) { //single mode | next = multiple |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | '', |
478 | 478 | ICON_SIZE_SMALL |
479 | 479 | ), |
480 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id" |
|
480 | + "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id" |
|
481 | 481 | ); |
482 | 482 | } |
483 | 483 | if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 0) { //multiple mode | next = seriousgame |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | '', |
489 | 489 | ICON_SIZE_SMALL |
490 | 490 | ), |
491 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id" |
|
491 | + "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id" |
|
492 | 492 | ); |
493 | 493 | } |
494 | 494 | } else { |
@@ -511,8 +511,8 @@ discard block |
||
511 | 511 | '', |
512 | 512 | ICON_SIZE_SMALL |
513 | 513 | ), |
514 | - 'lp_controller.php?' . api_get_cidreq() |
|
515 | - . '&action=switch_view_mode&lp_id=' . $id . $token_parameter |
|
514 | + 'lp_controller.php?'.api_get_cidreq() |
|
515 | + . '&action=switch_view_mode&lp_id='.$id.$token_parameter |
|
516 | 516 | ); |
517 | 517 | break; |
518 | 518 | case 'embedded': |
@@ -523,8 +523,8 @@ discard block |
||
523 | 523 | '', |
524 | 524 | ICON_SIZE_SMALL |
525 | 525 | ), |
526 | - 'lp_controller.php?' . api_get_cidreq() |
|
527 | - . '&action=switch_view_mode&lp_id=' . $id . $token_parameter |
|
526 | + 'lp_controller.php?'.api_get_cidreq() |
|
527 | + . '&action=switch_view_mode&lp_id='.$id.$token_parameter |
|
528 | 528 | ); |
529 | 529 | break; |
530 | 530 | case 'embedframe': |
@@ -535,8 +535,8 @@ discard block |
||
535 | 535 | '', |
536 | 536 | ICON_SIZE_SMALL |
537 | 537 | ), |
538 | - 'lp_controller.php?' . api_get_cidreq() |
|
539 | - . '&action=switch_view_mode&lp_id=' . $id . $token_parameter |
|
538 | + 'lp_controller.php?'.api_get_cidreq() |
|
539 | + . '&action=switch_view_mode&lp_id='.$id.$token_parameter |
|
540 | 540 | ); |
541 | 541 | break; |
542 | 542 | case 'impress': |
@@ -547,8 +547,8 @@ discard block |
||
547 | 547 | '', |
548 | 548 | ICON_SIZE_SMALL |
549 | 549 | ), |
550 | - 'lp_controller.php?' . api_get_cidreq() |
|
551 | - . '&action=switch_view_mode&lp_id=' . $id . $token_parameter |
|
550 | + 'lp_controller.php?'.api_get_cidreq() |
|
551 | + . '&action=switch_view_mode&lp_id='.$id.$token_parameter |
|
552 | 552 | ); |
553 | 553 | break; |
554 | 554 | } |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | '', |
581 | 581 | ICON_SIZE_SMALL |
582 | 582 | ), |
583 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id" |
|
583 | + "lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id" |
|
584 | 584 | ); |
585 | 585 | } else { |
586 | 586 | $dsp_debug = Display::url( |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | '', |
591 | 591 | ICON_SIZE_SMALL |
592 | 592 | ), |
593 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id" |
|
593 | + "lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id" |
|
594 | 594 | ); |
595 | 595 | } |
596 | 596 | } |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | if ($details['subscribe_users'] == 1) { |
644 | 644 | $subscribeUsers = Display::url( |
645 | 645 | Display::return_icon('user.png', get_lang('SubscribeUsersToLp')), |
646 | - api_get_path(WEB_CODE_PATH) . "lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq() |
|
646 | + api_get_path(WEB_CODE_PATH)."lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq() |
|
647 | 647 | ); |
648 | 648 | } |
649 | 649 | |
@@ -653,12 +653,12 @@ discard block |
||
653 | 653 | $autolaunch_exists = true; |
654 | 654 | $lp_auto_launch_icon = Display::url( |
655 | 655 | Display::return_icon('launch.png', get_lang('DisableLPAutoLaunch')), |
656 | - api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=0&lp_id=$id" |
|
656 | + api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=0&lp_id=$id" |
|
657 | 657 | ); |
658 | 658 | } else { |
659 | 659 | $lp_auto_launch_icon = Display::url( |
660 | 660 | Display::return_icon('launch_na.png', get_lang('EnableLPAutoLaunch')), |
661 | - api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=1&lp_id=$id" |
|
661 | + api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=1&lp_id=$id" |
|
662 | 662 | ); |
663 | 663 | } |
664 | 664 | } |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | '', |
672 | 672 | ICON_SIZE_SMALL |
673 | 673 | ), |
674 | - api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id" |
|
674 | + api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id" |
|
675 | 675 | ); |
676 | 676 | |
677 | 677 | /* Delete */ |
@@ -683,8 +683,8 @@ discard block |
||
683 | 683 | '', |
684 | 684 | ICON_SIZE_SMALL |
685 | 685 | ), |
686 | - 'lp_controller.php?' . api_get_cidreq() . "&action=delete&lp_id=$id", |
|
687 | - ['onclick' => "javascript: return confirmation('" . addslashes($name) . "');"] |
|
686 | + 'lp_controller.php?'.api_get_cidreq()."&action=delete&lp_id=$id", |
|
687 | + ['onclick' => "javascript: return confirmation('".addslashes($name)."');"] |
|
688 | 688 | ); |
689 | 689 | } else { |
690 | 690 | $dsp_delete = Display::return_icon( |
@@ -701,23 +701,23 @@ discard block |
||
701 | 701 | if ($details['lp_display_order'] == 1 && $max != 1) { |
702 | 702 | $dsp_order .= Display::url( |
703 | 703 | Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL), |
704 | - "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id" |
|
704 | + "lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id" |
|
705 | 705 | ); |
706 | 706 | } elseif ($current == $max - 1 && $max != 1) { |
707 | 707 | $dsp_order .= Display::url( |
708 | 708 | Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL), |
709 | - "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id" |
|
709 | + "lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id" |
|
710 | 710 | ); |
711 | 711 | } elseif ($max == 1) { |
712 | 712 | $dsp_order = ''; |
713 | 713 | } else { |
714 | 714 | $dsp_order .= Display::url( |
715 | 715 | Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL), |
716 | - "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id" |
|
716 | + "lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id" |
|
717 | 717 | ); |
718 | 718 | $dsp_order .= Display::url( |
719 | 719 | Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL), |
720 | - "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id" |
|
720 | + "lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id" |
|
721 | 721 | ); |
722 | 722 | } |
723 | 723 | } |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | if ($details['seriousgame_mode'] == 0) { |
734 | 734 | $actionSeriousGame = Display::toolbarButton( |
735 | 735 | null, |
736 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame", |
|
736 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame", |
|
737 | 737 | 'trophy', |
738 | 738 | 'default', |
739 | 739 | [ |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | } else { |
745 | 745 | $actionSeriousGame = Display::toolbarButton( |
746 | 746 | null, |
747 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame", |
|
747 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame", |
|
748 | 748 | 'trophy', |
749 | 749 | 'warning', |
750 | 750 | [ |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | // Student |
759 | 759 | $export_icon = Display::url( |
760 | 760 | Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL), |
761 | - api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id" |
|
761 | + api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id" |
|
762 | 762 | ); |
763 | 763 | } |
764 | 764 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $course_title = null; |
22 | 22 | $xajax_response = new xajaxResponse(); |
23 | 23 | $return = ''; |
24 | - if(!empty($needle) && !empty($type)) { |
|
24 | + if (!empty($needle) && !empty($type)) { |
|
25 | 25 | // xajax send utf8 datas... datas in db can be non-utf8 datas |
26 | 26 | $charset = api_get_system_encoding(); |
27 | 27 | $needle = api_convert_encoding($needle, $charset, 'utf-8'); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | while ($row = Database::fetch_row($res)) { |
39 | 39 | $course_codes .= '\''.$row[0].'\','; |
40 | 40 | } |
41 | - $course_codes = substr($course_codes,0,(strlen($course_codes)-1)); |
|
41 | + $course_codes = substr($course_codes, 0, (strlen($course_codes) - 1)); |
|
42 | 42 | |
43 | 43 | $cond_course_code = ' AND course.id NOT IN('.$course_codes.') '; |
44 | 44 | } |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | if (api_is_multiple_url_enabled()) { |
70 | 70 | $tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); |
71 | 71 | $access_url_id = api_get_current_access_url_id(); |
72 | - if ($access_url_id != -1){ |
|
72 | + if ($access_url_id != -1) { |
|
73 | 73 | |
74 | - if ($type=='single') { |
|
74 | + if ($type == 'single') { |
|
75 | 75 | $sql = 'SELECT |
76 | 76 | course.id, |
77 | 77 | course.visual_code, |
@@ -104,19 +104,19 @@ discard block |
||
104 | 104 | if ($type == 'single') { |
105 | 105 | while ($course = Database :: fetch_array($rs)) { |
106 | 106 | $course_list[] = $course['code']; |
107 | - $course_title=str_replace("'","\'",$course_title); |
|
107 | + $course_title = str_replace("'", "\'", $course_title); |
|
108 | 108 | $return .= '<a href="javascript: void(0);" onclick="javascript: add_course_to_session(\''.$course['id'].'\',\''.$course_title.' ('.$course['visual_code'].')'.'\')">'.$course['title'].' ('.$course['visual_code'].')</a><br />'; |
109 | 109 | } |
110 | - $xajax_response -> addAssign('ajax_list_courses_single','innerHTML',api_utf8_encode($return)); |
|
110 | + $xajax_response -> addAssign('ajax_list_courses_single', 'innerHTML', api_utf8_encode($return)); |
|
111 | 111 | } else { |
112 | 112 | $return .= '<select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:340px;">'; |
113 | - while($course = Database :: fetch_array($rs)) { |
|
113 | + while ($course = Database :: fetch_array($rs)) { |
|
114 | 114 | $course_list[] = $course['code']; |
115 | - $course_title=str_replace("'","\'",$course_title); |
|
116 | - $return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['title'].' ('.$course['visual_code'].')',ENT_QUOTES).'">'.$course['title'].' ('.$course['visual_code'].')</option>'; |
|
115 | + $course_title = str_replace("'", "\'", $course_title); |
|
116 | + $return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['title'].' ('.$course['visual_code'].')', ENT_QUOTES).'">'.$course['title'].' ('.$course['visual_code'].')</option>'; |
|
117 | 117 | } |
118 | 118 | $return .= '</select>'; |
119 | - $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return)); |
|
119 | + $xajax_response -> addAssign('ajax_list_courses_multiple', 'innerHTML', api_utf8_encode($return)); |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | $_SESSION['course_list'] = $course_list; |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | // the form |
74 | 74 | if (api_is_platform_admin() || api_is_course_admin() || api_is_course_tutor() || api_is_course_coach()) { |
75 | 75 | $actions .= '<a id="export_opener" href="'.api_get_self().'?export_report=1&path='.$hotpotatoes_path.' ">'. |
76 | - Display::return_icon('save.png', get_lang('Export'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
76 | + Display::return_icon('save.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
77 | 77 | } |
78 | 78 | } else { |
79 | - $actions .= '<a href="exercise.php">' . |
|
80 | - Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
79 | + $actions .= '<a href="exercise.php">'. |
|
80 | + Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | if ($is_allowedToEdit) { |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | |
100 | 100 | if ($is_allowedToEdit || $is_tutor) { |
101 | 101 | $nameTools = get_lang('StudentScore'); |
102 | - $interbreadcrumb[] = array("url" => "exercise.php","name" => get_lang('Exercises')); |
|
102 | + $interbreadcrumb[] = array("url" => "exercise.php", "name" => get_lang('Exercises')); |
|
103 | 103 | $objExerciseTmp = new Exercise(); |
104 | 104 | /*if ($objExerciseTmp->read($exercise_id)) { |
105 | 105 | $interbreadcrumb[] = array("url" => "admin.php?exerciseId=".$exercise_id, "name" => $objExerciseTmp->name); |
106 | 106 | }*/ |
107 | 107 | } else { |
108 | - $interbreadcrumb[] = array("url" => "exercise.php","name" => get_lang('Exercises')); |
|
108 | + $interbreadcrumb[] = array("url" => "exercise.php", "name" => get_lang('Exercises')); |
|
109 | 109 | $objExerciseTmp = new Exercise(); |
110 | 110 | /*if ($objExerciseTmp->read($exercise_id)) { |
111 | 111 | $nameTools = get_lang('Results').': '.$objExerciseTmp->name; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | // Generating group list |
169 | 169 | |
170 | 170 | $group_list = GroupManager::get_group_list(); |
171 | -$group_parameters = array('group_all:'.get_lang('All'),'group_none:'.get_lang('None')); |
|
171 | +$group_parameters = array('group_all:'.get_lang('All'), 'group_none:'.get_lang('None')); |
|
172 | 172 | |
173 | 173 | foreach ($group_list as $group) { |
174 | 174 | $group_parameters[] = $group['id'].':'.$group['name']; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $userId = api_get_user_id(); |
23 | 23 | |
24 | 24 | $this_section = SECTION_COURSES; |
25 | -$current_course_tool = TOOL_GROUP; |
|
25 | +$current_course_tool = TOOL_GROUP; |
|
26 | 26 | |
27 | 27 | // Notice for unauthorized people. |
28 | 28 | api_protect_course_script(true); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | Display::return_icon('add-groups.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM).'</a>'; |
171 | 171 | |
172 | 172 | if (api_get_setting('allow_group_categories') === 'true') { |
173 | - $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'. |
|
173 | + $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'. |
|
174 | 174 | Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
175 | 175 | } else { |
176 | 176 | $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'. |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $actions = null; |
226 | 226 | if (api_is_allowed_to_edit(false, true) && !empty($categoryId)) { |
227 | 227 | $actions .= '<a href="group_category.php?'.api_get_cidreq().'&id='.$categoryId.'" title="'.get_lang('Edit').'">'. |
228 | - Display::return_icon('edit.png', get_lang('EditGroup'),'',ICON_SIZE_SMALL).'</a>'; |
|
228 | + Display::return_icon('edit.png', get_lang('EditGroup'), '', ICON_SIZE_SMALL).'</a>'; |
|
229 | 229 | $actions .= |
230 | 230 | Display::url( |
231 | 231 | Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL), |
@@ -235,17 +235,17 @@ discard block |
||
235 | 235 | ) |
236 | 236 | ); |
237 | 237 | if ($index != 0) { |
238 | - $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index -1]['id'].'">'. |
|
239 | - Display::return_icon('up.png',' ','',ICON_SIZE_SMALL).'</a>'; |
|
238 | + $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index - 1]['id'].'">'. |
|
239 | + Display::return_icon('up.png', ' ', '', ICON_SIZE_SMALL).'</a>'; |
|
240 | 240 | } |
241 | 241 | if ($index != count($group_cats) - 1) { |
242 | - $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index +1]['id'].'">'. |
|
243 | - Display::return_icon('down.png',' ','',ICON_SIZE_SMALL).'</a>'; |
|
242 | + $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index + 1]['id'].'">'. |
|
243 | + Display::return_icon('down.png', ' ', '', ICON_SIZE_SMALL).'</a>'; |
|
244 | 244 | } |
245 | 245 | } |
246 | 246 | |
247 | 247 | echo Display::page_header( |
248 | - Security::remove_XSS($category['title'].' '. $label.' ').$actions, |
|
248 | + Security::remove_XSS($category['title'].' '.$label.' ').$actions, |
|
249 | 249 | null, |
250 | 250 | 'h4', |
251 | 251 | false |
@@ -16,7 +16,7 @@ |
||
16 | 16 | api_protect_admin_script(true); |
17 | 17 | |
18 | 18 | // setting breadcrumbs |
19 | -$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
19 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
20 | 20 | |
21 | 21 | $form = new FormValidator('archive_cleanup_form', 'post', '', '', array(), FormValidator::LAYOUT_BOX); |
22 | 22 | $form->addButtonSend(get_lang('ArchiveDirCleanupProceedButton')); |
@@ -36,22 +36,22 @@ discard block |
||
36 | 36 | if (substr($url, strlen($url) - 1, strlen($url)) == '/') { |
37 | 37 | UrlManager::update($url_id, $url, $description, $active); |
38 | 38 | } else { |
39 | - UrlManager::update($url_id, $url . '/', $description, $active); |
|
39 | + UrlManager::update($url_id, $url.'/', $description, $active); |
|
40 | 40 | } |
41 | 41 | // URL Images |
42 | - $url_images_dir = api_get_path(SYS_PATH) . 'custompages/url-images/'; |
|
42 | + $url_images_dir = api_get_path(SYS_PATH).'custompages/url-images/'; |
|
43 | 43 | $image_fields = array("url_image_1", "url_image_2", "url_image_3"); |
44 | 44 | foreach ($image_fields as $image_field) { |
45 | 45 | if ($_FILES[$image_field]['error'] == 0) { |
46 | 46 | // Hardcoded: only PNG files allowed |
47 | 47 | $fileFields = explode('.', $_FILES[$image_field]['name']); |
48 | 48 | if (end($fileFields) == 'png') { |
49 | - if (file_exists($url_images_dir . $url_id . '_' . $image_field . '.png')) { |
|
49 | + if (file_exists($url_images_dir.$url_id.'_'.$image_field.'.png')) { |
|
50 | 50 | // if the file exists, we have to remove it before move_uploaded_file |
51 | - unlink($url_images_dir . $url_id . '_' . $image_field . '.png'); |
|
51 | + unlink($url_images_dir.$url_id.'_'.$image_field.'.png'); |
|
52 | 52 | } |
53 | 53 | move_uploaded_file( |
54 | - $_FILES[$image_field]['tmp_name'], $url_images_dir . $url_id . '_' . $image_field . '.png' |
|
54 | + $_FILES[$image_field]['tmp_name'], $url_images_dir.$url_id.'_'.$image_field.'.png' |
|
55 | 55 | ); |
56 | 56 | } |
57 | 57 | // else fail silently |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | UrlManager::add($url, $description, $active); |
69 | 69 | } else { |
70 | 70 | //create |
71 | - UrlManager::add($url . '/', $description, $active); |
|
71 | + UrlManager::add($url.'/', $description, $active); |
|
72 | 72 | } |
73 | 73 | $message = get_lang('URLAdded'); |
74 | 74 | $url_to_go = 'access_urls.php'; |
@@ -79,14 +79,14 @@ discard block |
||
79 | 79 | // URL Images |
80 | 80 | $url .= (substr($url, strlen($url) - 1, strlen($url)) == '/') ? '' : '/'; |
81 | 81 | $url_id = UrlManager::get_url_id($url); |
82 | - $url_images_dir = api_get_path(SYS_PATH) . 'custompages/url-images/'; |
|
82 | + $url_images_dir = api_get_path(SYS_PATH).'custompages/url-images/'; |
|
83 | 83 | $image_fields = array("url_image_1", "url_image_2", "url_image_3"); |
84 | 84 | foreach ($image_fields as $image_field) { |
85 | 85 | if ($_FILES[$image_field]['error'] == 0) { |
86 | 86 | // Hardcoded: only PNG files allowed |
87 | 87 | $fileFields = explode('.', $_FILES[$image_field]['name']); |
88 | 88 | if (end($fileFields) == 'png') { |
89 | - move_uploaded_file($_FILES[$image_field]['tmp_name'], $url_images_dir . $url_id . '_' . $image_field . '.png'); |
|
89 | + move_uploaded_file($_FILES[$image_field]['tmp_name'], $url_images_dir.$url_id.'_'.$image_field.'.png'); |
|
90 | 90 | } |
91 | 91 | // else fail silently |
92 | 92 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | Security::clear_token(); |
97 | 97 | $tok = Security::get_token(); |
98 | 98 | Display::addFlash(Display::return_message($message)); |
99 | - header('Location: ' . $url_to_go . '?sec_token=' . $tok); |
|
99 | + header('Location: '.$url_to_go.'?sec_token='.$tok); |
|
100 | 100 | exit(); |
101 | 101 | } |
102 | 102 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | function send() { |
60 | 60 | if (document.formulaire.access_url_id.value!=0) { |
61 | 61 | document.formulaire.form_sent.value=0; |
62 | - document.formulaire.add_type.value=\'' . $add_type . '\'; |
|
62 | + document.formulaire.add_type.value=\'' . $add_type.'\'; |
|
63 | 63 | document.formulaire.submit(); |
64 | 64 | } |
65 | 65 | } |
@@ -95,17 +95,17 @@ discard block |
||
95 | 95 | $result = UrlManager::update_urls_rel_user($UserList, $access_url_id); |
96 | 96 | $url_info = UrlManager::get_url_data_from_id($access_url_id); |
97 | 97 | if (!empty($result)) { |
98 | - $message .= 'URL: ' . $url_info['url'] . '<br />'; |
|
98 | + $message .= 'URL: '.$url_info['url'].'<br />'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | if (!empty($result['users_added'])) { |
102 | - $message .= '<h4>' . get_lang('UsersAdded') . ':</h4>'; |
|
102 | + $message .= '<h4>'.get_lang('UsersAdded').':</h4>'; |
|
103 | 103 | $i = 1; |
104 | 104 | $user_added_list = array(); |
105 | 105 | foreach ($result['users_added'] as $user) { |
106 | 106 | $user_info = api_get_user_info($user); |
107 | 107 | if (!empty($user_info)) { |
108 | - $user_added_list[] = $i . '. ' . api_get_person_name($user_info['firstname'], $user_info['lastname'], null, null, null, null, $user_info['username']); |
|
108 | + $user_added_list[] = $i.'. '.api_get_person_name($user_info['firstname'], $user_info['lastname'], null, null, null, null, $user_info['username']); |
|
109 | 109 | $i++; |
110 | 110 | } |
111 | 111 | } |
@@ -115,13 +115,13 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | if (!empty($result['users_deleted'])) { |
118 | - $message .= '<br /><h4>' . get_lang('UsersDeleted') . ': </h4>'; |
|
118 | + $message .= '<br /><h4>'.get_lang('UsersDeleted').': </h4>'; |
|
119 | 119 | $user_deleted_list = array(); |
120 | 120 | $i = 1; |
121 | 121 | foreach ($result['users_deleted'] as $user) { |
122 | 122 | $user_info = api_get_user_info($user); |
123 | 123 | if (!empty($user_info)) { |
124 | - $user_deleted_list [] = $i . '. ' . api_get_person_name($user_info['firstname'], $user_info['lastname']); |
|
124 | + $user_deleted_list [] = $i.'. '.api_get_person_name($user_info['firstname'], $user_info['lastname']); |
|
125 | 125 | $i++; |
126 | 126 | } |
127 | 127 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | echo '<div class="actions">'; |
143 | 143 | echo Display::url( |
144 | 144 | Display::return_icon('view_more_stats.gif', get_lang('AddUserToURL'), ''), |
145 | - api_get_path(WEB_CODE_PATH) . 'admin/access_url_add_users_to_url.php' |
|
145 | + api_get_path(WEB_CODE_PATH).'admin/access_url_add_users_to_url.php' |
|
146 | 146 | ); |
147 | 147 | echo '</div>'; |
148 | 148 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | } |
168 | 168 | |
169 | 169 | $sql = "SELECT u.user_id, lastname, firstname, username |
170 | - FROM $tbl_user u WHERE status <> " . ANONYMOUS . " " . |
|
170 | + FROM $tbl_user u WHERE status <> ".ANONYMOUS." ". |
|
171 | 171 | $order_clause; |
172 | 172 | $result = Database::query($sql); |
173 | 173 | $Users = Database::store_result($result); |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | if ($add_type == 'multiple') { |
183 | - $link_add_type_unique = '<a href="' . api_get_self() . '?add_type=unique&access_url_id=' . $access_url_id . '">' . get_lang('SessionAddTypeUnique') . '</a>'; |
|
183 | + $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeUnique').'</a>'; |
|
184 | 184 | $link_add_type_multiple = get_lang('SessionAddTypeMultiple'); |
185 | 185 | } else { |
186 | 186 | $link_add_type_unique = get_lang('SessionAddTypeUnique'); |
187 | - $link_add_type_multiple = '<a href="' . api_get_self() . '?add_type=multiple&access_url_id=' . $access_url_id . '">' . get_lang('SessionAddTypeMultiple') . '</a>'; |
|
187 | + $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeMultiple').'</a>'; |
|
188 | 188 | } |
189 | 189 | $url_list = UrlManager::get_url_data(); |
190 | 190 | ?> |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>" style="margin:0px;" <?php if ($ajax_search) { |
197 | 197 | echo ' onsubmit="valide();"'; |
198 | 198 | } ?> > |
199 | - <?php echo get_lang('SelectUrl') . ' : '; ?> |
|
199 | + <?php echo get_lang('SelectUrl').' : '; ?> |
|
200 | 200 | <select name="access_url_id" onchange="javascript:send();"> |
201 | 201 | <option value="0"> <?php echo get_lang('SelectUrl') ?></option> |
202 | 202 | <?php |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | <td> |
233 | 233 | <h3> |
234 | 234 | <?php |
235 | - $total_users = count($nosessionUsersList) + count($sessionUsersList); |
|
235 | + $total_users = count($nosessionUsersList) + count($sessionUsersList); |
|
236 | 236 | echo get_lang('TotalAvailableUsers').' '.$total_users; |
237 | 237 | ?> |
238 | 238 | </h3> |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | <td align="center"><b><?php echo get_lang('UserListInPlatform') ?> : <?php echo count($nosessionUsersList); ?></b> |
243 | 243 | </td> |
244 | 244 | <td></td> |
245 | - <td align="center"><b><?php echo get_lang('UserListIn') . ' ' . $url_selected; ?> : <?php echo count($sessionUsersList); ?></b></td> |
|
245 | + <td align="center"><b><?php echo get_lang('UserListIn').' '.$url_selected; ?> : <?php echo count($sessionUsersList); ?></b></td> |
|
246 | 246 | </tr> |
247 | 247 | <tr> |
248 | 248 | <td align="center"> |
@@ -302,9 +302,9 @@ discard block |
||
302 | 302 | <br /> |
303 | 303 | <?php |
304 | 304 | if (isset($_GET['add'])) { |
305 | - echo '<button class="save" type="button" onclick="valide()" >' . get_lang('AddUsersToURL') . '</button>'; |
|
305 | + echo '<button class="save" type="button" onclick="valide()" >'.get_lang('AddUsersToURL').'</button>'; |
|
306 | 306 | } else { |
307 | - echo '<button class="save" type="button" onclick="valide()" >' . get_lang('EditUsersToURL') . '</button>'; |
|
307 | + echo '<button class="save" type="button" onclick="valide()" >'.get_lang('EditUsersToURL').'</button>'; |
|
308 | 308 | } |
309 | 309 | ?> |
310 | 310 | </td> |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | WHERE |
43 | 43 | course_user.status='1' AND |
44 | 44 | course_user.user_id=user.user_id AND |
45 | - course_user.c_id ='" . $courseId . "'" . |
|
45 | + course_user.c_id ='".$courseId."'". |
|
46 | 46 | $order_clause; |
47 | 47 | $res = Database::query($sql); |
48 | 48 | $course_teachers = array(); |
@@ -58,18 +58,18 @@ discard block |
||
58 | 58 | INNER JOIN $access_url_rel_user_table url_rel_user |
59 | 59 | ON (u.user_id=url_rel_user.user_id) |
60 | 60 | WHERE |
61 | - url_rel_user.access_url_id=" . api_get_current_access_url_id() . " AND |
|
61 | + url_rel_user.access_url_id=".api_get_current_access_url_id()." AND |
|
62 | 62 | status=1" . $order_clause; |
63 | 63 | } else { |
64 | 64 | $sql = "SELECT user_id, lastname, firstname |
65 | - FROM $table_user WHERE status='1'" . $order_clause; |
|
65 | + FROM $table_user WHERE status='1'".$order_clause; |
|
66 | 66 | } |
67 | 67 | $courseInfo['tutor_name'] = null; |
68 | 68 | |
69 | 69 | $res = Database::query($sql); |
70 | 70 | $teachers = array(); |
71 | 71 | $allTeachers = array(); |
72 | -$platform_teachers[0] = '-- ' . get_lang('NoManager') . ' --'; |
|
72 | +$platform_teachers[0] = '-- '.get_lang('NoManager').' --'; |
|
73 | 73 | while ($obj = Database::fetch_object($res)) { |
74 | 74 | $allTeachers[$obj->user_id] = api_get_person_name($obj->firstname, $obj->lastname); |
75 | 75 | if (!array_key_exists($obj->user_id, $course_teachers)) { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | // Case where there is no teacher in the course |
89 | 89 | if (count($course_teachers) == 0) { |
90 | - $sql = 'SELECT tutor_name FROM ' . $course_table . ' WHERE code="' . $course_code . '"'; |
|
90 | + $sql = 'SELECT tutor_name FROM '.$course_table.' WHERE code="'.$course_code.'"'; |
|
91 | 91 | $res = Database::query($sql); |
92 | 92 | $tutor_name = Database::result($res, 0, 0); |
93 | 93 | $courseInfo['tutor_name'] = array_search($tutor_name, $platform_teachers); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | // Build the form |
97 | 97 | $form = new FormValidator('update_course', 'post', api_get_self().'?id='.$courseId); |
98 | -$form->addElement('header', get_lang('Course') . ' #' . $courseInfo['real_id'] . ' ' . $course_code); |
|
98 | +$form->addElement('header', get_lang('Course').' #'.$courseInfo['real_id'].' '.$course_code); |
|
99 | 99 | $form->addElement('hidden', 'code', $course_code); |
100 | 100 | |
101 | 101 | //title |
@@ -151,14 +151,14 @@ discard block |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | |
154 | - $groupName = 'session_coaches[' . $sessionId . ']'; |
|
155 | - $platformTeacherId = 'platform_teachers_by_session_' . $sessionId; |
|
156 | - $coachId = 'coaches_by_session_' . $sessionId; |
|
154 | + $groupName = 'session_coaches['.$sessionId.']'; |
|
155 | + $platformTeacherId = 'platform_teachers_by_session_'.$sessionId; |
|
156 | + $coachId = 'coaches_by_session_'.$sessionId; |
|
157 | 157 | |
158 | 158 | $platformTeacherName = 'platform_teachers_by_session'; |
159 | 159 | $coachName = 'coaches_by_session'; |
160 | 160 | |
161 | - $sessionUrl = api_get_path(WEB_CODE_PATH) . 'session/resume_session.php?id_session=' . $sessionId; |
|
161 | + $sessionUrl = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$sessionId; |
|
162 | 162 | $form->addElement( |
163 | 163 | 'advmultiselect', |
164 | 164 | $groupName, |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $session['name'], |
167 | 167 | $sessionUrl, |
168 | 168 | array('target' => '_blank') |
169 | - ) . ' - ' . get_lang('Coaches'), |
|
169 | + ).' - '.get_lang('Coaches'), |
|
170 | 170 | $allTeachers |
171 | 171 | ); |
172 | 172 | $courseInfo[$groupName] = $sessionTeachers; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } |
175 | 175 | |
176 | 176 | // Category code |
177 | -$url = api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_category'; |
|
177 | +$url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_category'; |
|
178 | 178 | |
179 | 179 | $categorySelect = $form->addElement( |
180 | 180 | 'select_ajax', |
@@ -201,11 +201,11 @@ discard block |
||
201 | 201 | $form->applyFilter('select_language', 'html_filter'); |
202 | 202 | |
203 | 203 | $group = array(); |
204 | -$group[]= $form->createElement('radio', 'visibility', get_lang("CourseAccess"), get_lang('OpenToTheWorld'), COURSE_VISIBILITY_OPEN_WORLD); |
|
205 | -$group[]= $form->createElement('radio', 'visibility', null, get_lang('OpenToThePlatform'), COURSE_VISIBILITY_OPEN_PLATFORM); |
|
206 | -$group[]= $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED); |
|
207 | -$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED); |
|
208 | -$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN); |
|
204 | +$group[] = $form->createElement('radio', 'visibility', get_lang("CourseAccess"), get_lang('OpenToTheWorld'), COURSE_VISIBILITY_OPEN_WORLD); |
|
205 | +$group[] = $form->createElement('radio', 'visibility', null, get_lang('OpenToThePlatform'), COURSE_VISIBILITY_OPEN_PLATFORM); |
|
206 | +$group[] = $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED); |
|
207 | +$group[] = $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED); |
|
208 | +$group[] = $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN); |
|
209 | 209 | $form->addGroup($group, '', get_lang('CourseAccess')); |
210 | 210 | |
211 | 211 | $group = array(); |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $htmlHeadXtra[] = ' |
230 | 230 | <script> |
231 | 231 | $(function() { |
232 | - ' . $extra['jquery_ready_content'] . ' |
|
232 | + ' . $extra['jquery_ready_content'].' |
|
233 | 233 | }); |
234 | 234 | </script>'; |
235 | 235 | |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | foreach ($list as $course_temp) { |
285 | 285 | if ($course_temp['code'] != $course_code) { |
286 | 286 | $visual_code_is_used = true; |
287 | - $warn .= ' ' . $course_temp['title'] . ' (' . $course_temp['code'] . '),'; |
|
287 | + $warn .= ' '.$course_temp['title'].' ('.$course_temp['code'].'),'; |
|
288 | 288 | } |
289 | 289 | } |
290 | 290 | $warn = substr($warn, 0, -1); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | $course['course_code'] = $course_code; |
304 | 304 | |
305 | 305 | if (!stristr($department_url, 'http://')) { |
306 | - $department_url = 'http://' . $department_url; |
|
306 | + $department_url = 'http://'.$department_url; |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | Database::query($sql); |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | if (array_key_exists('add_teachers_to_sessions_courses', $courseInfo)) { |
369 | 369 | $sql = "UPDATE $course_table SET |
370 | 370 | add_teachers_to_sessions_courses = '$addTeacherToSessionCourses' |
371 | - WHERE id = " . $courseInfo['real_id']; |
|
371 | + WHERE id = ".$courseInfo['real_id']; |
|
372 | 372 | Database::query($sql); |
373 | 373 | } |
374 | 374 |