@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | { |
60 | 60 | $exercise_list = array(); |
61 | 61 | if (!empty($personal_course_list)) { |
62 | - foreach($personal_course_list as $course_item) { |
|
62 | + foreach ($personal_course_list as $course_item) { |
|
63 | 63 | $course_code = $course_item['c']; |
64 | 64 | $session_id = $course_item['id_session']; |
65 | 65 | |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | $session_id |
69 | 69 | ); |
70 | 70 | |
71 | - foreach($exercises as $exercise_item) { |
|
72 | - $exercise_item['course_code'] = $course_code; |
|
73 | - $exercise_item['session_id'] = $session_id; |
|
74 | - $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC'); |
|
71 | + foreach ($exercises as $exercise_item) { |
|
72 | + $exercise_item['course_code'] = $course_code; |
|
73 | + $exercise_item['session_id'] = $session_id; |
|
74 | + $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC'); |
|
75 | 75 | |
76 | 76 | $exercise_list[] = $exercise_item; |
77 | 77 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | } |
188 | 188 | |
189 | - if ($show_menu && ($show_create_link || $show_course_link )) { |
|
189 | + if ($show_menu && ($show_create_link || $show_course_link)) { |
|
190 | 190 | $show_menu = true; |
191 | 191 | } else { |
192 | 192 | $show_menu = false; |
@@ -198,14 +198,14 @@ discard block |
||
198 | 198 | if ($show_menu) { |
199 | 199 | $html .= '<ul class="nav nav-pills nav-stacked">'; |
200 | 200 | if ($show_create_link) { |
201 | - $html .= '<li class="add-course"><a href="' . api_get_path(WEB_CODE_PATH) . 'create_course/add_course.php">'.Display::return_icon('new-course.png', get_lang('CourseCreate')).(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')).'</a></li>'; |
|
201 | + $html .= '<li class="add-course"><a href="'.api_get_path(WEB_CODE_PATH).'create_course/add_course.php">'.Display::return_icon('new-course.png', get_lang('CourseCreate')).(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')).'</a></li>'; |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | if ($show_course_link) { |
205 | 205 | if (!api_is_drh() && !api_is_session_admin()) { |
206 | - $html .= '<li class="list-course"><a href="'. api_get_path(WEB_CODE_PATH) . 'auth/courses.php">'. Display::return_icon('catalog-course.png', get_lang('CourseCatalog')) .get_lang('CourseCatalog').'</a></li>'; |
|
206 | + $html .= '<li class="list-course"><a href="'.api_get_path(WEB_CODE_PATH).'auth/courses.php">'.Display::return_icon('catalog-course.png', get_lang('CourseCatalog')).get_lang('CourseCatalog').'</a></li>'; |
|
207 | 207 | } else { |
208 | - $html .= '<li><a href="' . api_get_path(WEB_CODE_PATH) . 'dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
208 | + $html .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
209 | 209 | } |
210 | 210 | } |
211 | 211 | $html .= '</ul>'; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $html = ''; |
230 | 230 | |
231 | 231 | if (!empty($_GET['include']) && preg_match('/^[a-zA-Z0-9_-]*\.html$/', $_GET['include'])) { |
232 | - $open = @(string)file_get_contents(api_get_path(SYS_PATH).$this->home.$_GET['include']); |
|
232 | + $open = @(string) file_get_contents(api_get_path(SYS_PATH).$this->home.$_GET['include']); |
|
233 | 233 | $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
234 | 234 | } else { |
235 | 235 | // Hiding home top when user not connected. |
@@ -259,15 +259,15 @@ discard block |
||
259 | 259 | $home_top_temp = file_get_contents($this->home.'home_top.html'); |
260 | 260 | } else { |
261 | 261 | if (file_exists($this->default_home.'home_top.html')) { |
262 | - $home_top_temp = file_get_contents($this->default_home . 'home_top.html'); |
|
262 | + $home_top_temp = file_get_contents($this->default_home.'home_top.html'); |
|
263 | 263 | } |
264 | 264 | } |
265 | 265 | } |
266 | 266 | |
267 | 267 | if (trim($home_top_temp) == '' && api_is_platform_admin()) { |
268 | - $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>'; |
|
268 | + $home_top_temp = '<div class="welcome-mascot">'.get_lang('PortalHomepageDefaultIntroduction').'</div>'; |
|
269 | 269 | } else { |
270 | - $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>'; |
|
270 | + $home_top_temp = '<div class="welcome-home-top-temp">'.$home_top_temp.'</div>'; |
|
271 | 271 | } |
272 | 272 | $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
273 | 273 | $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | |
284 | 284 | $html = ''; |
285 | 285 | // Notice |
286 | - $home_notice = @(string)file_get_contents($sys_path.$this->home.'home_notice_'.$user_selected_language.'.html'); |
|
286 | + $home_notice = @(string) file_get_contents($sys_path.$this->home.'home_notice_'.$user_selected_language.'.html'); |
|
287 | 287 | if (empty($home_notice)) { |
288 | - $home_notice = @(string)file_get_contents($sys_path.$this->home.'home_notice.html'); |
|
288 | + $home_notice = @(string) file_get_contents($sys_path.$this->home.'home_notice.html'); |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | if (!empty($home_notice)) { |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | } |
318 | 318 | |
319 | 319 | $html = null; |
320 | - $home_menu = @(string)file_get_contents($sys_path.$this->home.'home_menu_'.$user_selected_language.'.html'); |
|
320 | + $home_menu = @(string) file_get_contents($sys_path.$this->home.'home_menu_'.$user_selected_language.'.html'); |
|
321 | 321 | if (!empty($home_menu)) { |
322 | 322 | $home_menu_content = '<ul class="nav nav-pills nav-stacked">'; |
323 | 323 | $home_menu_content .= api_to_system_encoding($home_menu, api_detect_encoding(strip_tags($home_menu))); |
@@ -347,9 +347,9 @@ discard block |
||
347 | 347 | if (!api_is_anonymous()) { |
348 | 348 | $certificatesItem = Display::tag( |
349 | 349 | 'li', |
350 | - Display::url(Display::return_icon('graduation.png',get_lang('MyCertificates'),null,ICON_SIZE_SMALL). |
|
350 | + Display::url(Display::return_icon('graduation.png', get_lang('MyCertificates'), null, ICON_SIZE_SMALL). |
|
351 | 351 | get_lang('MyCertificates'), |
352 | - api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php" |
|
352 | + api_get_path(WEB_CODE_PATH)."gradebook/my_certificates.php" |
|
353 | 353 | ) |
354 | 354 | ); |
355 | 355 | } |
@@ -359,29 +359,29 @@ discard block |
||
359 | 359 | if (api_get_setting('allow_public_certificates') == 'true') { |
360 | 360 | $searchItem = Display::tag( |
361 | 361 | 'li', |
362 | - Display::url(Display::return_icon('search_graduation.png',get_lang('Search'),null,ICON_SIZE_SMALL). |
|
362 | + Display::url(Display::return_icon('search_graduation.png', get_lang('Search'), null, ICON_SIZE_SMALL). |
|
363 | 363 | get_lang('Search'), |
364 | - api_get_path(WEB_CODE_PATH) . "gradebook/search.php" |
|
364 | + api_get_path(WEB_CODE_PATH)."gradebook/search.php" |
|
365 | 365 | ) |
366 | 366 | ); |
367 | 367 | } |
368 | 368 | |
369 | 369 | if (empty($certificatesItem) && empty($searchItem)) { |
370 | 370 | return null; |
371 | - }else{ |
|
372 | - $content.= $certificatesItem; |
|
373 | - $content.= $searchItem; |
|
371 | + } else { |
|
372 | + $content .= $certificatesItem; |
|
373 | + $content .= $searchItem; |
|
374 | 374 | } |
375 | 375 | |
376 | 376 | if (api_get_setting('allow_skills_tool') == 'true') { |
377 | 377 | |
378 | - $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png',get_lang('MySkills'),null,ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php')); |
|
378 | + $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png', get_lang('MySkills'), null, ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php')); |
|
379 | 379 | $allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true'; |
380 | 380 | if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) { |
381 | 381 | $content .= Display::tag('li', |
382 | 382 | Display::url(Display::return_icon('edit-skill.png', get_lang('MySkills'), null, |
383 | - ICON_SIZE_SMALL) . get_lang('ManageSkills'), |
|
384 | - api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php')); |
|
383 | + ICON_SIZE_SMALL).get_lang('ManageSkills'), |
|
384 | + api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php')); |
|
385 | 385 | } |
386 | 386 | } |
387 | 387 | $content .= '</ul>'; |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | FROM $main_category_table t1 |
481 | 481 | LEFT JOIN $main_category_table t2 ON t1.code=t2.parent_id |
482 | 482 | LEFT JOIN $main_course_table t3 ON (t3.category_code = t1.code $platform_visible_courses) |
483 | - WHERE t1.parent_id ". (empty ($category) ? "IS NULL" : "='$category'")." |
|
483 | + WHERE t1.parent_id ".(empty ($category) ? "IS NULL" : "='$category'")." |
|
484 | 484 | GROUP BY t1.name,t1.code,t1.parent_id,t1.children_count ORDER BY t1.tree_pos, t1.name"; |
485 | 485 | |
486 | 486 | // Showing only the category of courses of the current access_url_id |
@@ -555,10 +555,10 @@ discard block |
||
555 | 555 | } |
556 | 556 | $result .= $htmlTitre; |
557 | 557 | if ($thereIsSubCat) { |
558 | - $result .= $htmlListCat; |
|
558 | + $result .= $htmlListCat; |
|
559 | 559 | } |
560 | 560 | while ($categoryName = Database::fetch_array($resCats)) { |
561 | - $result .= '<h3>' . $categoryName['name'] . "</h3>\n"; |
|
561 | + $result .= '<h3>'.$categoryName['name']."</h3>\n"; |
|
562 | 562 | } |
563 | 563 | $numrows = Database::num_rows($sql_result_courses); |
564 | 564 | $courses_list_string = ''; |
@@ -656,12 +656,12 @@ discard block |
||
656 | 656 | if ($courses_shown > 0) { |
657 | 657 | // Only display the list of courses and categories if there was more than |
658 | 658 | // 0 courses visible to the world (we're in the anonymous list here). |
659 | - $result .= $courses_list_string; |
|
659 | + $result .= $courses_list_string; |
|
660 | 660 | } |
661 | 661 | if ($category != '') { |
662 | - $result .= '<p><a href="'.api_get_self().'"> ' . |
|
662 | + $result .= '<p><a href="'.api_get_self().'"> '. |
|
663 | 663 | Display :: return_icon('back.png', get_lang('BackToHomePage')). |
664 | - get_lang('BackToHomePage') . '</a></p>'; |
|
664 | + get_lang('BackToHomePage').'</a></p>'; |
|
665 | 665 | } |
666 | 666 | return $result; |
667 | 667 | } |
@@ -738,14 +738,14 @@ discard block |
||
738 | 738 | ) { |
739 | 739 | if (!empty($idAccordion)) { |
740 | 740 | $html = null; |
741 | - $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">' . PHP_EOL; |
|
742 | - $html .= '<div class="panel panel-default" id="'.$id.'">' . PHP_EOL; |
|
743 | - $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">' . PHP_EOL; |
|
744 | - $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>' . PHP_EOL; |
|
745 | - $html .= '</h4></div>' . PHP_EOL; |
|
746 | - $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">' . PHP_EOL; |
|
747 | - $html .= '<div class="panel-body">'.$content.'</div>' . PHP_EOL; |
|
748 | - $html .= '</div></div></div>' . PHP_EOL; |
|
741 | + $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">'.PHP_EOL; |
|
742 | + $html .= '<div class="panel panel-default" id="'.$id.'">'.PHP_EOL; |
|
743 | + $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">'.PHP_EOL; |
|
744 | + $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>'.PHP_EOL; |
|
745 | + $html .= '</h4></div>'.PHP_EOL; |
|
746 | + $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">'.PHP_EOL; |
|
747 | + $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL; |
|
748 | + $html .= '</div></div></div>'.PHP_EOL; |
|
749 | 749 | |
750 | 750 | } else { |
751 | 751 | if (!empty($id)) { |
@@ -754,9 +754,9 @@ discard block |
||
754 | 754 | $params['class'] = 'panel panel-default'; |
755 | 755 | $html = null; |
756 | 756 | if (!empty($title)) { |
757 | - $html .= '<div class="panel-heading">'.$title.'</div>' . PHP_EOL; |
|
757 | + $html .= '<div class="panel-heading">'.$title.'</div>'.PHP_EOL; |
|
758 | 758 | } |
759 | - $html.= '<div class="panel-body">'.$content.'</div>' . PHP_EOL; |
|
759 | + $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL; |
|
760 | 760 | $html = Display::div($html, $params); |
761 | 761 | } |
762 | 762 | return $html; |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | $usergroup_list = $usergroup->get_usergroup_by_user(api_get_user_id()); |
803 | 803 | $classes = ''; |
804 | 804 | if (!empty($usergroup_list)) { |
805 | - foreach($usergroup_list as $group_id) { |
|
805 | + foreach ($usergroup_list as $group_id) { |
|
806 | 806 | $data = $usergroup->get($group_id); |
807 | 807 | $data['name'] = Display::url($data['name'], api_get_path(WEB_CODE_PATH).'user/classes.php?id='.$data['id']); |
808 | 808 | $classes .= Display::tag('li', $data['name']); |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | if (api_is_platform_admin()) { |
812 | 812 | $classes .= Display::tag( |
813 | 813 | 'li', |
814 | - Display::url(get_lang('AddClasses') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add') |
|
814 | + Display::url(get_lang('AddClasses'), api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add') |
|
815 | 815 | ); |
816 | 816 | } |
817 | 817 | if (!empty($classes)) { |
@@ -833,11 +833,11 @@ discard block |
||
833 | 833 | $content = null; |
834 | 834 | |
835 | 835 | if (api_get_setting('allow_social_tool') == 'true') { |
836 | - $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/social/home.php"> |
|
837 | - <img class="img-circle" src="' . $userPicture . '" ></a>'; |
|
836 | + $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/social/home.php"> |
|
837 | + <img class="img-circle" src="' . $userPicture.'" ></a>'; |
|
838 | 838 | } else { |
839 | - $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/auth/profile.php"> |
|
840 | - <img class="img-circle" title="' . get_lang('EditProfile') . '" src="' . $userPicture. '" ></a>'; |
|
839 | + $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/auth/profile.php"> |
|
840 | + <img class="img-circle" title="' . get_lang('EditProfile').'" src="'.$userPicture.'" ></a>'; |
|
841 | 841 | } |
842 | 842 | |
843 | 843 | $html = self::show_right_block( |
@@ -889,12 +889,12 @@ discard block |
||
889 | 889 | if (api_get_setting('allow_social_tool') == 'true') { |
890 | 890 | $link = '?f=social'; |
891 | 891 | } |
892 | - $profile_content .= '<li class="inbox-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.Display::return_icon('inbox.png',get_lang('Inbox'),null,ICON_SIZE_SMALL).get_lang('Inbox').$cant_msg.' </a></li>'; |
|
893 | - $profile_content .= '<li class="new-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.Display::return_icon('new-message.png',get_lang('Compose'),null,ICON_SIZE_SMALL).get_lang('Compose').' </a></li>'; |
|
892 | + $profile_content .= '<li class="inbox-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.Display::return_icon('inbox.png', get_lang('Inbox'), null, ICON_SIZE_SMALL).get_lang('Inbox').$cant_msg.' </a></li>'; |
|
893 | + $profile_content .= '<li class="new-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.Display::return_icon('new-message.png', get_lang('Compose'), null, ICON_SIZE_SMALL).get_lang('Compose').' </a></li>'; |
|
894 | 894 | |
895 | 895 | if (api_get_setting('allow_social_tool') == 'true') { |
896 | 896 | $total_invitations = Display::badge($total_invitations); |
897 | - $profile_content .= '<li class="invitations-social"><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitations.png',get_lang('PendingInvitations'),null,ICON_SIZE_SMALL).get_lang('PendingInvitations').$total_invitations.'</a></li>'; |
|
897 | + $profile_content .= '<li class="invitations-social"><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitations.png', get_lang('PendingInvitations'), null, ICON_SIZE_SMALL).get_lang('PendingInvitations').$total_invitations.'</a></li>'; |
|
898 | 898 | } |
899 | 899 | |
900 | 900 | if (isset($_configuration['allow_my_files_link_in_homepage']) && $_configuration['allow_my_files_link_in_homepage']) { |
@@ -910,7 +910,7 @@ discard block |
||
910 | 910 | |
911 | 911 | $editProfileUrl = Display::getProfileEditionLink($user_id); |
912 | 912 | |
913 | - $profile_content .= '<li class="profile-social"><a href="' . $editProfileUrl . '">'.Display::return_icon('edit-profile.png',get_lang('EditProfile'),null,ICON_SIZE_SMALL).get_lang('EditProfile').'</a></li>'; |
|
913 | + $profile_content .= '<li class="profile-social"><a href="'.$editProfileUrl.'">'.Display::return_icon('edit-profile.png', get_lang('EditProfile'), null, ICON_SIZE_SMALL).get_lang('EditProfile').'</a></li>'; |
|
914 | 914 | $profile_content .= '</ul>'; |
915 | 915 | $html = self::show_right_block( |
916 | 916 | get_lang('Profile'), |
@@ -985,17 +985,17 @@ discard block |
||
985 | 985 | if ($show_create_link) { |
986 | 986 | $my_account_content .= '<li class="add-course"><a href="main/create_course/add_course.php">'; |
987 | 987 | if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin()) { |
988 | - $my_account_content .= Display::return_icon('new-course.png',get_lang('CreateCourseRequest'),null,ICON_SIZE_SMALL); |
|
988 | + $my_account_content .= Display::return_icon('new-course.png', get_lang('CreateCourseRequest'), null, ICON_SIZE_SMALL); |
|
989 | 989 | $my_account_content .= get_lang('CreateCourseRequest'); |
990 | 990 | } else { |
991 | - $my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreate'),null,ICON_SIZE_SMALL); |
|
991 | + $my_account_content .= Display::return_icon('new-course.png', get_lang('CourseCreate'), null, ICON_SIZE_SMALL); |
|
992 | 992 | $my_account_content .= get_lang('CourseCreate'); |
993 | 993 | } |
994 | 994 | $my_account_content .= '</a></li>'; |
995 | 995 | |
996 | 996 | if (SessionManager::allowToManageSessions()) { |
997 | 997 | $my_account_content .= '<li class="add-course"><a href="main/session/session_add.php">'; |
998 | - $my_account_content .= Display::return_icon('session.png',get_lang('AddSession'),null,ICON_SIZE_SMALL); |
|
998 | + $my_account_content .= Display::return_icon('session.png', get_lang('AddSession'), null, ICON_SIZE_SMALL); |
|
999 | 999 | $my_account_content .= get_lang('AddSession'); |
1000 | 1000 | $my_account_content .= '</a></li>'; |
1001 | 1001 | } |
@@ -1003,21 +1003,21 @@ discard block |
||
1003 | 1003 | |
1004 | 1004 | //Sort courses |
1005 | 1005 | $url = api_get_path(WEB_CODE_PATH).'auth/courses.php?action=sortmycourses'; |
1006 | - $img_order= Display::return_icon('order-course.png',get_lang('SortMyCourses'),null,ICON_SIZE_SMALL); |
|
1006 | + $img_order = Display::return_icon('order-course.png', get_lang('SortMyCourses'), null, ICON_SIZE_SMALL); |
|
1007 | 1007 | $my_account_content .= '<li class="order-course">'.Display::url($img_order.get_lang('SortMyCourses'), $url, array('class' => 'sort course')).'</li>'; |
1008 | 1008 | |
1009 | 1009 | // Session history |
1010 | 1010 | if (isset($_GET['history']) && intval($_GET['history']) == 1) { |
1011 | - $my_account_content .= '<li class="history-course"><a href="user_portal.php">'.Display::return_icon('history-course.png',get_lang('DisplayTrainingList'),null,ICON_SIZE_SMALL).get_lang('DisplayTrainingList').'</a></li>'; |
|
1011 | + $my_account_content .= '<li class="history-course"><a href="user_portal.php">'.Display::return_icon('history-course.png', get_lang('DisplayTrainingList'), null, ICON_SIZE_SMALL).get_lang('DisplayTrainingList').'</a></li>'; |
|
1012 | 1012 | } else { |
1013 | - $my_account_content .= '<li class="history-course"><a href="user_portal.php?history=1" >'.Display::return_icon('history-course.png',get_lang('HistoryTrainingSessions'),null,ICON_SIZE_SMALL).get_lang('HistoryTrainingSessions').'</a></li>'; |
|
1013 | + $my_account_content .= '<li class="history-course"><a href="user_portal.php?history=1" >'.Display::return_icon('history-course.png', get_lang('HistoryTrainingSessions'), null, ICON_SIZE_SMALL).get_lang('HistoryTrainingSessions').'</a></li>'; |
|
1014 | 1014 | } |
1015 | 1015 | |
1016 | 1016 | // Course catalog |
1017 | 1017 | |
1018 | 1018 | if ($show_course_link) { |
1019 | 1019 | if (!api_is_drh()) { |
1020 | - $my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png',get_lang('CourseCatalog'),null,ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>'; |
|
1020 | + $my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png', get_lang('CourseCatalog'), null, ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>'; |
|
1021 | 1021 | } else { |
1022 | 1022 | $my_account_content .= '<li><a href="main/dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
1023 | 1023 | } |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | |
1209 | 1209 | $actions = null; |
1210 | 1210 | if (api_is_platform_admin()) { |
1211 | - $actions = api_get_path(WEB_CODE_PATH) .'session/resume_session.php?id_session='.$session_id; |
|
1211 | + $actions = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$session_id; |
|
1212 | 1212 | } |
1213 | 1213 | |
1214 | 1214 | $coachId = $session_box['id_coach']; |
@@ -1219,12 +1219,12 @@ discard block |
||
1219 | 1219 | $params['title'] = $session_box['title']; |
1220 | 1220 | //$params['subtitle'] = $extra_info; |
1221 | 1221 | $params['id_coach'] = $coachId; |
1222 | - $params['coach_url'] = api_get_path(WEB_AJAX_PATH) . 'user_manager.ajax.php?a=get_user_popup&user_id=' . $coachId; |
|
1222 | + $params['coach_url'] = api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=get_user_popup&user_id='.$coachId; |
|
1223 | 1223 | $params['coach_name'] = !empty($session_box['coach']) ? $session_box['coach'] : null; |
1224 | - $params['coach_avatar'] =UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL); |
|
1225 | - $params['date'] = $session_box['dates']; |
|
1224 | + $params['coach_avatar'] = UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL); |
|
1225 | + $params['date'] = $session_box['dates']; |
|
1226 | 1226 | $params['image'] = isset($imageField['value']) ? $imageField['value'] : null; |
1227 | - $params['duration'] = isset($session_box['duration']) ? ' ' . $session_box['duration'] : null; |
|
1227 | + $params['duration'] = isset($session_box['duration']) ? ' '.$session_box['duration'] : null; |
|
1228 | 1228 | $params['edit_actions'] = $actions; |
1229 | 1229 | $params['show_description'] = $session_box['show_description']; |
1230 | 1230 | $params['description'] = $session_box['description']; |
@@ -1332,7 +1332,7 @@ discard block |
||
1332 | 1332 | //$sessionParams['show_link_to_session'] = !api_is_drh() && $sessionTitleLink; |
1333 | 1333 | $sessionParams['course_list_session_style'] = $coursesListSessionStyle; |
1334 | 1334 | $sessionParams['title'] = $session_box['title']; |
1335 | - $sessionParams['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'] . ' | ': '') . $session_box['dates']; |
|
1335 | + $sessionParams['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'].' | ' : '').$session_box['dates']; |
|
1336 | 1336 | $sessionParams['show_actions'] = api_is_platform_admin(); |
1337 | 1337 | $sessionParams['courses'] = $html_courses_session; |
1338 | 1338 | $sessionParams['show_simple_session_info'] = false; |
@@ -1382,14 +1382,14 @@ discard block |
||
1382 | 1382 | !empty($session_category_start_date) && |
1383 | 1383 | $session_category_start_date != '0000-00-00' |
1384 | 1384 | ) { |
1385 | - $categoryParams['subtitle'] = get_lang('From') . ' ' . $session_category_start_date; |
|
1385 | + $categoryParams['subtitle'] = get_lang('From').' '.$session_category_start_date; |
|
1386 | 1386 | } |
1387 | 1387 | |
1388 | 1388 | if ( |
1389 | 1389 | !empty($session_category_end_date) && |
1390 | 1390 | $session_category_end_date != '0000-00-00' |
1391 | 1391 | ) { |
1392 | - $categoryParams['subtitle'] = get_lang('Until') . ' ' . $session_category_end_date; |
|
1392 | + $categoryParams['subtitle'] = get_lang('Until').' '.$session_category_end_date; |
|
1393 | 1393 | } |
1394 | 1394 | } |
1395 | 1395 | |
@@ -1414,10 +1414,10 @@ discard block |
||
1414 | 1414 | |
1415 | 1415 | $this->tpl->assign('all_courses', $allCoursesInSessions); |
1416 | 1416 | $this->tpl->assign('session', $listSession); |
1417 | - $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
1417 | + $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
1418 | 1418 | $this->tpl->assign('gamification_mode', $gamificationModeIsActive); |
1419 | 1419 | |
1420 | - if (api_get_configuration_value('view_grid_courses')){ |
|
1420 | + if (api_get_configuration_value('view_grid_courses')) { |
|
1421 | 1421 | $sessions_with_no_category = $this->tpl->fetch( |
1422 | 1422 | $this->tpl->get_template('/user_portal/grid_session.tpl') |
1423 | 1423 | ); |
@@ -1562,7 +1562,7 @@ discard block |
||
1562 | 1562 | } else { |
1563 | 1563 | $htmlCategory .= '<div class="session-view-row" >'; |
1564 | 1564 | } |
1565 | - $coursesInfo = $listCourse['course']; |
|
1565 | + $coursesInfo = $listCourse['course']; |
|
1566 | 1566 | |
1567 | 1567 | $htmlCategory .= self::getHtmlForCourse( |
1568 | 1568 | $coursesInfo, |
@@ -1579,7 +1579,7 @@ discard block |
||
1579 | 1579 | $listCategorySession['catSessionName'] |
1580 | 1580 | ); |
1581 | 1581 | // list of session |
1582 | - $htmlSession = ''; // start |
|
1582 | + $htmlSession = ''; // start |
|
1583 | 1583 | foreach ($listCategorySession['sessionList'] as $k => $listSession) { |
1584 | 1584 | // add session |
1585 | 1585 | $htmlSession .= '<div class="session-view-row">'; |
@@ -1596,8 +1596,8 @@ discard block |
||
1596 | 1596 | $htmlSessionCategory .= $htmlSession; |
1597 | 1597 | } |
1598 | 1598 | $htmlSessionCategory .= '</div>'; // end session cat block |
1599 | - $htmlCategory .= $htmlSessionCategory .'</div>' ; |
|
1600 | - $htmlCategory .= ''; // end course block |
|
1599 | + $htmlCategory .= $htmlSessionCategory.'</div>'; |
|
1600 | + $htmlCategory .= ''; // end course block |
|
1601 | 1601 | } |
1602 | 1602 | $userCategoryHtml .= $htmlCategory; |
1603 | 1603 | } |
@@ -1622,11 +1622,11 @@ discard block |
||
1622 | 1622 | } |
1623 | 1623 | } |
1624 | 1624 | $htmlCategory .= ''; |
1625 | - $userCategoryHtml .= $htmlCategory; // end user cat block |
|
1625 | + $userCategoryHtml .= $htmlCategory; // end user cat block |
|
1626 | 1626 | if ($userCategoryId != 0) { |
1627 | 1627 | $userCategoryHtml .= '</div>'; |
1628 | 1628 | } |
1629 | - $html .= $userCategoryHtml; // |
|
1629 | + $html .= $userCategoryHtml; // |
|
1630 | 1630 | } |
1631 | 1631 | $html .= '</div>'; |
1632 | 1632 | |
@@ -1767,11 +1767,11 @@ discard block |
||
1767 | 1767 | $html = ''; |
1768 | 1768 | |
1769 | 1769 | if ($categorySessionId == 0) { |
1770 | - $class1 = 'session-view-lvl-2'; // session |
|
1771 | - $class2 = 'session-view-lvl-4'; // got to course in session link |
|
1770 | + $class1 = 'session-view-lvl-2'; // session |
|
1771 | + $class2 = 'session-view-lvl-4'; // got to course in session link |
|
1772 | 1772 | } else { |
1773 | - $class1 = 'session-view-lvl-3'; // session |
|
1774 | - $class2 = 'session-view-lvl-5'; // got to course in session link |
|
1773 | + $class1 = 'session-view-lvl-3'; // session |
|
1774 | + $class2 = 'session-view-lvl-5'; // got to course in session link |
|
1775 | 1775 | } |
1776 | 1776 | |
1777 | 1777 | $icon = Display::return_icon( |
@@ -1799,7 +1799,7 @@ discard block |
||
1799 | 1799 | if ($listA['userCatTitle'] == $listB['userCatTitle']) { |
1800 | 1800 | if ($listA['title'] == $listB['title']) { |
1801 | 1801 | return 0; |
1802 | - } else if($listA['title'] > $listB['title']) { |
|
1802 | + } else if ($listA['title'] > $listB['title']) { |
|
1803 | 1803 | return 1; |
1804 | 1804 | } else { |
1805 | 1805 | return -1; |
@@ -1820,7 +1820,7 @@ discard block |
||
1820 | 1820 | { |
1821 | 1821 | if ($listA['title'] == $listB['title']) { |
1822 | 1822 | return 0; |
1823 | - } else if($listA['title'] > $listB['title']) { |
|
1823 | + } else if ($listA['title'] > $listB['title']) { |
|
1824 | 1824 | return 1; |
1825 | 1825 | } else { |
1826 | 1826 | return -1; |