@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $navigation['mycourses']['key'] = 'my-course'; |
| 40 | 40 | |
| 41 | 41 | // My Profile |
| 42 | - $navigation['myprofile']['url'] = api_get_path(WEB_CODE_PATH).'auth/profile.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' ); |
|
| 42 | + $navigation['myprofile']['url'] = api_get_path(WEB_CODE_PATH).'auth/profile.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : ''); |
|
| 43 | 43 | $navigation['myprofile']['title'] = get_lang('ModifyProfile'); |
| 44 | 44 | $navigation['myprofile']['key'] = 'profile'; |
| 45 | 45 | // Link to my agenda |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | // Gradebook |
| 51 | 51 | if (api_get_setting('gradebook_enable') == 'true') { |
| 52 | - $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' ); |
|
| 52 | + $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : ''); |
|
| 53 | 53 | $navigation['mygradebook']['title'] = get_lang('MyGradebook'); |
| 54 | 54 | $navigation['mygradebook']['key'] = 'gradebook'; |
| 55 | 55 | } |
@@ -57,11 +57,11 @@ discard block |
||
| 57 | 57 | // Reporting |
| 58 | 58 | if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) { |
| 59 | 59 | // Link to my space |
| 60 | - $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh()?'session.php':''); |
|
| 60 | + $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh() ? 'session.php' : ''); |
|
| 61 | 61 | $navigation['session_my_space']['title'] = get_lang('MySpace'); |
| 62 | 62 | $navigation['session_my_space']['key'] = 'my-space'; |
| 63 | 63 | } else if (api_is_student_boss()) { |
| 64 | - $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH) . 'mySpace/student.php'; |
|
| 64 | + $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/student.php'; |
|
| 65 | 65 | $navigation['session_my_space']['title'] = get_lang('MySpace'); |
| 66 | 66 | $navigation['session_my_space']['key'] = 'my-space'; |
| 67 | 67 | } else { |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // Social |
| 83 | - if (api_get_setting('allow_social_tool')=='true') { |
|
| 83 | + if (api_get_setting('allow_social_tool') == 'true') { |
|
| 84 | 84 | $navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php'; |
| 85 | 85 | $navigation['social']['title'] = get_lang('SocialNetwork'); |
| 86 | 86 | $navigation['social']['key'] = 'social-network'; |
@@ -165,14 +165,14 @@ discard block |
||
| 165 | 165 | 'id' => 'header-logo' |
| 166 | 166 | ); |
| 167 | 167 | $testServer = api_get_setting('server_type'); |
| 168 | - if ($testServer == 'test' && is_file($logoBase . 'svg')) { |
|
| 169 | - $logo = $logoBase . 'svg'; |
|
| 168 | + if ($testServer == 'test' && is_file($logoBase.'svg')) { |
|
| 169 | + $logo = $logoBase.'svg'; |
|
| 170 | 170 | $attributes['width'] = '245'; |
| 171 | 171 | $attributes['height'] = '68'; |
| 172 | 172 | $imageUrl = api_get_path(WEB_CSS_PATH).'themes/'.$theme.'/images/header-logo.svg'; |
| 173 | 173 | } else { |
| 174 | - $logo = $logoBase . 'png'; |
|
| 175 | - $customLogo = $customLogoBase . 'png'; |
|
| 174 | + $logo = $logoBase.'png'; |
|
| 175 | + $customLogo = $customLogoBase.'png'; |
|
| 176 | 176 | $imageUrl = api_get_path(WEB_CSS_PATH).'themes/'.$theme.'/images/header-logo.png'; |
| 177 | 177 | $customImageUrl = api_get_path(WEB_CSS_PATH).'themes/'.$theme.'/images/header-logo-custom.png'; |
| 178 | 178 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | $_course = api_get_course_info(); |
| 223 | 223 | $course_id = 0; |
| 224 | 224 | if (!empty($_course)) { |
| 225 | - $course_id = $_course['code']; |
|
| 225 | + $course_id = $_course['code']; |
|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | $user_id = api_get_user_id(); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | if (api_get_setting('gradebook_enable') == 'true') { |
| 320 | 320 | if (api_get_setting('show_tabs', 'my_gradebook') == 'true') { |
| 321 | 321 | $navigation['mygradebook'] = $possible_tabs['mygradebook']; |
| 322 | - } else{ |
|
| 322 | + } else { |
|
| 323 | 323 | $menu_navigation['mygradebook'] = $possible_tabs['mygradebook']; |
| 324 | 324 | } |
| 325 | 325 | } |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | if (api_get_setting('allow_social_tool') == 'true') { |
| 345 | 345 | $navigation['social'] = isset($possible_tabs['social']) ? $possible_tabs['social'] : null; |
| 346 | 346 | } |
| 347 | - } else{ |
|
| 347 | + } else { |
|
| 348 | 348 | $menu_navigation['social'] = isset($possible_tabs['social']) ? $possible_tabs['social'] : null; |
| 349 | 349 | } |
| 350 | 350 | |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) { |
| 354 | 354 | $navigation['dashboard'] = isset($possible_tabs['dashboard']) ? $possible_tabs['dashboard'] : null; |
| 355 | 355 | } |
| 356 | - } else{ |
|
| 356 | + } else { |
|
| 357 | 357 | $menu_navigation['dashboard'] = isset($possible_tabs['dashboard']) ? $possible_tabs['dashboard'] : null; |
| 358 | 358 | } |
| 359 | 359 | |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | } |
| 396 | 396 | } |
| 397 | - }else{ |
|
| 397 | + } else { |
|
| 398 | 398 | // Custom tabs public |
| 399 | 399 | $customTabs = getCustomTabs(); |
| 400 | 400 | if (!empty($customTabs)) { |
@@ -463,32 +463,32 @@ discard block |
||
| 463 | 463 | $home_top = ''; |
| 464 | 464 | |
| 465 | 465 | if (is_file($homep.$menutabs.'_'.$lang.$ext) && is_readable($homep.$menutabs.'_'.$lang.$ext)) { |
| 466 | - $home_top = @(string)file_get_contents($homep.$menutabs.'_'.$lang.$ext); |
|
| 466 | + $home_top = @(string) file_get_contents($homep.$menutabs.'_'.$lang.$ext); |
|
| 467 | 467 | } elseif (is_file($homep.$menutabs.$lang.$ext) && is_readable($homep.$menutabs.$lang.$ext)) { |
| 468 | - $home_top = @(string)file_get_contents($homep.$menutabs.$lang.$ext); |
|
| 468 | + $home_top = @(string) file_get_contents($homep.$menutabs.$lang.$ext); |
|
| 469 | 469 | } else { |
| 470 | 470 | //$errorMsg = get_lang('HomePageFilesNotReadable'); |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | $home_top = api_to_system_encoding($home_top, api_detect_encoding(strip_tags($home_top))); |
| 474 | 474 | |
| 475 | - $open = str_replace('{rel_path}',api_get_path(REL_PATH), $home_top); |
|
| 475 | + $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top); |
|
| 476 | 476 | $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
| 477 | 477 | |
| 478 | 478 | $open_mtloggedin = ''; |
| 479 | 479 | if (api_get_user_id() && !api_is_anonymous()) { |
| 480 | 480 | if (is_file($homep.$mtloggedin.'_'.$lang.$ext) && is_readable($homep.$mtloggedin.'_'.$lang.$ext)) { |
| 481 | - $home_top = @(string)file_get_contents($homep.$mtloggedin.'_'.$lang.$ext); |
|
| 481 | + $home_top = @(string) file_get_contents($homep.$mtloggedin.'_'.$lang.$ext); |
|
| 482 | 482 | $home_top = str_replace('::private', '', $home_top); |
| 483 | 483 | } elseif (is_file($homep.$mtloggedin.$lang.$ext) && is_readable($homep.$mtloggedin.$lang.$ext)) { |
| 484 | - $home_top = @(string)file_get_contents($homep.$mtloggedin.$lang.$ext); |
|
| 484 | + $home_top = @(string) file_get_contents($homep.$mtloggedin.$lang.$ext); |
|
| 485 | 485 | $home_top = str_replace('::private', '', $home_top); |
| 486 | 486 | } else { |
| 487 | 487 | //$errorMsg = get_lang('HomePageFilesNotReadable'); |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | $home_top = api_to_system_encoding($home_top, api_detect_encoding(strip_tags($home_top))); |
| 491 | - $open_mtloggedin = str_replace('{rel_path}',api_get_path(REL_PATH), $home_top); |
|
| 491 | + $open_mtloggedin = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top); |
|
| 492 | 492 | $open_mtloggedin = api_to_system_encoding($open_mtloggedin, api_detect_encoding(strip_tags($open_mtloggedin))); |
| 493 | 493 | } |
| 494 | 494 | |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | if (!empty($open) OR !empty($open_mtloggedin)) { |
| 498 | 498 | if (strpos($open.$open_mtloggedin, 'show_menu') === false) { |
| 499 | 499 | if (api_is_anonymous()) { |
| 500 | - $navigation[SECTION_CAMPUS] = null; |
|
| 500 | + $navigation[SECTION_CAMPUS] = null; |
|
| 501 | 501 | } |
| 502 | 502 | } else { |
| 503 | 503 | if (api_get_user_id() && !api_is_anonymous()) { |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | if (count($navigation) > 0 || !empty($lis)) { |
| 512 | 512 | $pre_lis = ''; |
| 513 | 513 | foreach ($navigation as $section => $navigation_info) { |
| 514 | - $key = (!empty($navigation_info['key'])?'tab-'.$navigation_info['key']:''); |
|
| 514 | + $key = (!empty($navigation_info['key']) ? 'tab-'.$navigation_info['key'] : ''); |
|
| 515 | 515 | if (isset($GLOBALS['this_section'])) { |
| 516 | 516 | $current = $section == $GLOBALS['this_section'] ? ' id="current" class="active '.$key.'" ' : ' class="'.$key.'"'; |
| 517 | 517 | } else { |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | |
| 559 | 559 | if (!empty($_course) && !isset($_GET['hide_course_breadcrumb'])) { |
| 560 | 560 | |
| 561 | - $navigation_item['url'] = $web_course_path . $_course['path'].'/index.php'.(!empty($session_id) ? '?id_session='.$session_id : ''); |
|
| 561 | + $navigation_item['url'] = $web_course_path.$_course['path'].'/index.php'.(!empty($session_id) ? '?id_session='.$session_id : ''); |
|
| 562 | 562 | $_course['name'] = api_htmlentities($_course['name']); |
| 563 | 563 | $course_title = cut($_course['name'], MAX_LENGTH_BREADCRUMB); |
| 564 | 564 | switch (api_get_setting('breadcrumbs_course_homepage')) { |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | $navigation_item['title'] = Display::img(api_get_path(WEB_IMG_PATH).'home.png', $_course['name'].$my_session_name).' '.$course_title.$my_session_name; |
| 573 | 573 | break; |
| 574 | 574 | default: |
| 575 | - if (api_get_session_id() != -1 ) { |
|
| 575 | + if (api_get_session_id() != -1) { |
|
| 576 | 576 | $navigation_item['title'] = Display::img(api_get_path(WEB_IMG_PATH).'home.png', $_course['name'].$my_session_name).' '.$course_title.$my_session_name; |
| 577 | 577 | } else { |
| 578 | 578 | $navigation_item['title'] = Display::img(api_get_path(WEB_IMG_PATH).'home.png', $_course['name']).' '.$course_title; |
@@ -606,22 +606,22 @@ discard block |
||
| 606 | 606 | // titles for shared folders |
| 607 | 607 | if ($breadcrumb_step['name'] == 'shared_folder') { |
| 608 | 608 | $navigation_item['title'] = get_lang('UserFolders'); |
| 609 | - } elseif(strstr($breadcrumb_step['name'], 'shared_folder_session_')) { |
|
| 609 | + } elseif (strstr($breadcrumb_step['name'], 'shared_folder_session_')) { |
|
| 610 | 610 | $navigation_item['title'] = get_lang('UserFolders'); |
| 611 | - } elseif(strstr($breadcrumb_step['name'], 'sf_user_')) { |
|
| 611 | + } elseif (strstr($breadcrumb_step['name'], 'sf_user_')) { |
|
| 612 | 612 | $userinfo = api_get_user_info(substr($breadcrumb_step['name'], 8)); |
| 613 | 613 | $navigation_item['title'] = $userinfo['complete_name']; |
| 614 | - } elseif($breadcrumb_step['name'] == 'chat_files') { |
|
| 614 | + } elseif ($breadcrumb_step['name'] == 'chat_files') { |
|
| 615 | 615 | $navigation_item['title'] = get_lang('ChatFiles'); |
| 616 | - } elseif($breadcrumb_step['name'] == 'images') { |
|
| 616 | + } elseif ($breadcrumb_step['name'] == 'images') { |
|
| 617 | 617 | $navigation_item['title'] = get_lang('Images'); |
| 618 | - } elseif($breadcrumb_step['name'] == 'video') { |
|
| 618 | + } elseif ($breadcrumb_step['name'] == 'video') { |
|
| 619 | 619 | $navigation_item['title'] = get_lang('Video'); |
| 620 | - } elseif($breadcrumb_step['name'] == 'audio') { |
|
| 620 | + } elseif ($breadcrumb_step['name'] == 'audio') { |
|
| 621 | 621 | $navigation_item['title'] = get_lang('Audio'); |
| 622 | - } elseif($breadcrumb_step['name'] == 'flash') { |
|
| 622 | + } elseif ($breadcrumb_step['name'] == 'flash') { |
|
| 623 | 623 | $navigation_item['title'] = get_lang('Flash'); |
| 624 | - } elseif($breadcrumb_step['name'] == 'gallery') { |
|
| 624 | + } elseif ($breadcrumb_step['name'] == 'gallery') { |
|
| 625 | 625 | $navigation_item['title'] = get_lang('Gallery'); |
| 626 | 626 | } |
| 627 | 627 | // Fixes breadcrumb title now we applied the Security::remove_XSS and |
@@ -689,35 +689,35 @@ discard block |
||
| 689 | 689 | if (!empty($final_navigation)) { |
| 690 | 690 | // $home_link.= '<span class="divider">/</span>'; |
| 691 | 691 | if (!empty($home_link)) { |
| 692 | - $lis.= Display::tag('li', $home_link); |
|
| 692 | + $lis .= Display::tag('li', $home_link); |
|
| 693 | 693 | } |
| 694 | 694 | |
| 695 | 695 | foreach ($final_navigation as $bread) { |
| 696 | 696 | $bread_check = trim(strip_tags($bread)); |
| 697 | 697 | if (!empty($bread_check)) { |
| 698 | - if ($final_navigation_count-1 > $i) { |
|
| 698 | + if ($final_navigation_count - 1 > $i) { |
|
| 699 | 699 | $bread .= ''; |
| 700 | 700 | } |
| 701 | - $lis.= Display::tag('li', $bread,array('class'=>'active')); |
|
| 701 | + $lis .= Display::tag('li', $bread, array('class'=>'active')); |
|
| 702 | 702 | $i++; |
| 703 | 703 | } |
| 704 | 704 | } |
| 705 | 705 | } else { |
| 706 | 706 | if (!empty($home_link)) { |
| 707 | - $lis.= Display::tag('li', $home_link); |
|
| 707 | + $lis .= Display::tag('li', $home_link); |
|
| 708 | 708 | } |
| 709 | 709 | } |
| 710 | 710 | |
| 711 | 711 | // View as student/teacher link |
| 712 | 712 | $view = null; |
| 713 | 713 | if (!empty($view_as_student_link)) { |
| 714 | - $view .= Display::tag('div', $view_as_student_link, array('id' => 'view_as_link','class' => 'pull-right')); |
|
| 714 | + $view .= Display::tag('div', $view_as_student_link, array('id' => 'view_as_link', 'class' => 'pull-right')); |
|
| 715 | 715 | } |
| 716 | 716 | |
| 717 | 717 | if (!empty($navigation_right)) { |
| 718 | - foreach($navigation_right as $item){ |
|
| 718 | + foreach ($navigation_right as $item) { |
|
| 719 | 719 | $extra_class = isset($item['class']) ? $item['class'] : null; |
| 720 | - $lis.= Display::tag('li', $item['title'], array('class' => $extra_class.' pull-right')); |
|
| 720 | + $lis .= Display::tag('li', $item['title'], array('class' => $extra_class.' pull-right')); |
|
| 721 | 721 | } |
| 722 | 722 | } |
| 723 | 723 | |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | //just showing the src in a iframe ... |
| 82 | 82 | $html .= '<h2>'.$toc['title'].'</h2>'; |
| 83 | 83 | $html .= '<iframe border="0" frameborder="0" style="width:100%;height:600px" src="' . $src . '"></iframe>'; |
| 84 | - }else{ |
|
| 84 | + } else{ |
|
| 85 | 85 | $html .= "<div class='impress-title'>"; |
| 86 | 86 | $html .= '<h1>'.$toc['title'].'</h1>'; |
| 87 | 87 | $html .= "</div>"; |