diff --git a/main/admin/statistics/index.php b/main/admin/statistics/index.php index 041fab3c8f..732948b744 100755 --- a/main/admin/statistics/index.php +++ b/main/admin/statistics/index.php @@ -124,7 +124,7 @@ switch ($report) { [ 'name' => 'url', 'index' => 'url', - 'width' => '180', + 'width' => '120', 'align' => 'left', ], [ diff --git a/main/course_home/2column.php b/main/course_home/2column.php index b34ffb1f4c..8185826d39 100755 --- a/main/course_home/2column.php +++ b/main/course_home/2column.php @@ -86,11 +86,8 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { $content .= get_lang('CourseAdminOnly'); $content .= ""; $content .= ""; - $content .= CourseHome::show_tool_2column(TOOL_COURSE_ADMIN); - /* INACTIVE TOOLS - HIDDEN (GREY) LINKS */ - $content .= "\n". "\n". "

\n". @@ -104,7 +101,6 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { } /* Tools for platform admin only */ - if (api_is_platform_admin() && api_is_allowed_to_edit(null, true) && !api_is_coach()) { $content .= '
'.get_lang('PlatformAdminOnly').' diff --git a/main/course_home/3column.php b/main/course_home/3column.php index cd6ebc4edc..0c2de9611c 100755 --- a/main/course_home/3column.php +++ b/main/course_home/3column.php @@ -58,7 +58,11 @@ if (api_is_allowed_to_edit(null, true)) { $sql = "SELECT * FROM $TBL_ACCUEIL WHERE c_id = $course_id AND id=$id"; $result = Database::query($sql); $tool = Database::fetch_array($result); - $tool_name = @htmlspecialchars($tool['name'] != '' ? $tool['name'] : $tool['link'], ENT_QUOTES, api_get_system_encoding()); + $tool_name = @htmlspecialchars( + $tool['name'] != '' ? $tool['name'] : $tool['link'], + ENT_QUOTES, + api_get_system_encoding() + ); if ($tool['img'] != 'external.gif') { $tool['link'] = api_get_path(WEB_CODE_PATH).$tool['link']; } diff --git a/main/course_home/activity.php b/main/course_home/activity.php index f9a28e6ddc..b52534ccd9 100755 --- a/main/course_home/activity.php +++ b/main/course_home/activity.php @@ -135,7 +135,6 @@ if ($session_id === 0 && api_is_course_admin() && api_is_allowed_to_edit(null, t } } else { $tools = CourseHome::get_tools_category(TOOL_STUDENT_VIEW); - $isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh( api_get_user_id(), api_get_course_info() @@ -174,7 +173,6 @@ if ($session_id === 0 && api_is_course_admin() && api_is_allowed_to_edit(null, t if ($isDrhOfCourse) { $drhTool = CourseHome::get_tools_category(TOOL_DRH); - $blocks[] = ['content' => CourseHome::show_tools_category($drhTool)]; } } diff --git a/main/course_home/course_home.php b/main/course_home/course_home.php index 772bd20706..69d75208d1 100755 --- a/main/course_home/course_home.php +++ b/main/course_home/course_home.php @@ -39,17 +39,15 @@ $(document).ready(function(){ $(".btn-show-thematic").show(); //show using class $("#pross").fadeToggle(); //Not working collapse for Chrome }); + $("#thematic-hide").click(function(){ $(".btn-show-thematic").hide(); //show using class $(".btn-hide-thematic").show(); $("#pross").fadeToggle(); //Not working collapse for Chrome }); -}); - -$(document).ready(function() { + $(".make_visible_and_invisible").attr("href", "javascript:void(0);"); $(".make_visible_and_invisible > img").click(function () { - make_visible = "visible.gif"; make_invisible = "invisible.gif"; path_name = $(this).attr("src"); @@ -172,7 +170,6 @@ if (!isset($coursesAlreadyVisited[$course_code])) { $autoLaunchWarning = ''; $showAutoLaunchLpWarning = false; $course_id = api_get_course_int_id(); - $lpAutoLaunch = api_get_course_setting('enable_lp_auto_launch'); $session_id = api_get_session_id(); if (!empty($lpAutoLaunch)) { @@ -274,8 +271,8 @@ if (api_get_configuration_value('allow_exercise_auto_launch')) { $table = Database::get_course_table(TABLE_QUIZ_TEST); $sessionCondition = api_get_session_condition($session_id, true); $sql = "SELECT iid FROM $table - WHERE c_id = $course_id AND autolaunch = 1 $sessionCondition - LIMIT 1"; + WHERE c_id = $course_id AND autolaunch = 1 $sessionCondition + LIMIT 1"; $result = Database::query($sql); if (Database::num_rows($result) > 0) { $row = Database::fetch_array($result, 'ASSOC'); @@ -307,8 +304,6 @@ $tool_table = Database::get_course_table(TABLE_TOOL_LIST); $temps = time(); $reqdate = "&reqdate=$temps"; -/* MAIN CODE */ - /* Introduction section (editable by course admins) */ $content = Display::return_introduction_section( TOOL_COURSE_HOMEPAGE, @@ -322,7 +317,6 @@ $content = Display::return_introduction_section( /* SWITCH TO A DIFFERENT HOMEPAGE VIEW the setting homepage_view is adjustable through the platform administration section */ - if (!empty($autoLaunchWarning)) { $show_message .= Display::return_message( $autoLaunchWarning, diff --git a/main/course_home/vertical_activity.php b/main/course_home/vertical_activity.php index c7dd150e12..95f49e6db1 100755 --- a/main/course_home/vertical_activity.php +++ b/main/course_home/vertical_activity.php @@ -71,14 +71,12 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { } $my_list = CourseHome::get_tools_category(TOOL_AUTHORING); - $blocks[] = [ 'title' => get_lang('Authoring'), 'content' => CourseHome::show_tools_category($my_list), ]; $my_list = CourseHome::get_tools_category(TOOL_INTERACTION); - $blocks[] = [ 'title' => get_lang('Interaction'), 'content' => CourseHome::show_tools_category($my_list), diff --git a/main/course_info/maintenance_coach.php b/main/course_info/maintenance_coach.php index a00102ac01..272c1716b6 100644 --- a/main/course_info/maintenance_coach.php +++ b/main/course_info/maintenance_coach.php @@ -23,7 +23,7 @@ if ($sessionsCopy !== 'true') { api_not_allowed(true); } -Display :: display_header($nameTools); +Display::display_header($nameTools); echo Display::page_subheader( Display::return_icon( diff --git a/main/course_progress/index.php b/main/course_progress/index.php index efd7b85be4..9a13af982f 100755 --- a/main/course_progress/index.php +++ b/main/course_progress/index.php @@ -18,7 +18,6 @@ require_once 'thematic_controller.php'; // current section $this_section = SECTION_COURSES; - $current_course_tool = TOOL_COURSE_PROGRESS; // protect a course script diff --git a/main/course_progress/layout.php b/main/course_progress/layout.php index 04fbac8a12..6c50d4c30b 100755 --- a/main/course_progress/layout.php +++ b/main/course_progress/layout.php @@ -14,7 +14,7 @@ api_protect_course_script(true); // Header $tool = TOOL_COURSE_PROGRESS; -Display :: display_header(''); +Display::display_header(''); // Introduction section Display::display_introduction_section($tool); @@ -26,4 +26,4 @@ Event::event_access_tool($tool); echo $content; // Footer -Display :: display_footer(); +Display::display_footer(); diff --git a/main/course_progress/thematic.php b/main/course_progress/thematic.php index 6ce6f04cea..dc0550ccf7 100755 --- a/main/course_progress/thematic.php +++ b/main/course_progress/thematic.php @@ -129,7 +129,6 @@ if ($action == 'thematic_list') { $list['content'] = Security::remove_XSS($thematic['content'], STUDENT); $list['display_orden'] = $thematic['display_order']; $list['active'] = $thematic['active']; - $my_thematic_id = $thematic['id']; $session_star = ''; diff --git a/main/coursecopy/copy_course_session.php b/main/coursecopy/copy_course_session.php index 1c2f25c67c..abe6c6f580 100755 --- a/main/coursecopy/copy_course_session.php +++ b/main/coursecopy/copy_course_session.php @@ -111,7 +111,13 @@ function display_form() // origin $html .= ''; - $html .= '
'.make_select_session_list('sessions_list_origin', $sessions, ['onchange' => 'javascript: xajax_search_courses(this.value,\'origin\');']).'
'; + $html .= '
'; + $html .= make_select_session_list( + 'sessions_list_origin', + $sessions, + ['onchange' => 'javascript: xajax_search_courses(this.value,\'origin\');'] + ); + $html .= '
'; $html .= '
'; $html .= ''; $html .= '
'; @@ -179,7 +185,6 @@ function search_courses($id_session, $type) // Build select for destination sessions where is not included current session from select origin if (!empty($id_session)) { $sessions = SessionManager::get_sessions_list([], ['name', 'ASC']); - $select_destination .= '