From 8b9e8517858387e63a59a2fa1228e55572299b97 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Thu, 18 Jan 2018 11:06:54 +0100 Subject: [PATCH] Fix course progress invisible by default bug see #2268 --- main/inc/lib/add_course.lib.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main/inc/lib/add_course.lib.inc.php b/main/inc/lib/add_course.lib.inc.php index 11738f53da..1d74ac60f6 100755 --- a/main/inc/lib/add_course.lib.inc.php +++ b/main/inc/lib/add_course.lib.inc.php @@ -548,11 +548,14 @@ class AddCourse "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) VALUES ($course_id, 19, '".TOOL_ATTENDANCE."','attendance/index.php','attendance.gif','".$setting."','0','squaregrey.gif',0,'_self','authoring','0')" ); + + $setting = intval(self::string2binary( + api_get_setting('course_create_active_tools', 'course_progress') + )); + Database::query( "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) - VALUES ($course_id, 20, '".TOOL_COURSE_PROGRESS."','course_progress/index.php','course_progress.gif','".self::string2binary( - intval(api_get_setting('course_create_active_tools', 'course_progress')) - )."','0','squaregrey.gif',0,'_self','authoring','0')" + VALUES ($course_id, 20, '".TOOL_COURSE_PROGRESS."','course_progress/index.php','course_progress.gif','".$setting."','0','squaregrey.gif',0,'_self','authoring','0')" ); if (api_get_setting('search_enabled') === 'true') {