diff --git a/main/inc/lib/course_home.lib.php b/main/inc/lib/course_home.lib.php index 2c271549ed8..6cc4a61196b 100755 --- a/main/inc/lib/course_home.lib.php +++ b/main/inc/lib/course_home.lib.php @@ -505,7 +505,7 @@ public static function get_tools_category($course_tool_category, $courseId = 0, //Other queries recover id, name, link, image, visibility, admin, address, added_tool, target, category and session_id // but plugins are not present in the tool table, only globally and inside the course_settings table once configured $sql = "SELECT * FROM $course_tool_table t - WHERE category = 'plugin' AND c_id = $course_id $condition_session + WHERE category = 'plugin' AND name <> 'courseblock' AND c_id = $course_id $condition_session ORDER BY id"; $result = Database::query($sql); break; diff --git a/main/inc/lib/plugin.class.php b/main/inc/lib/plugin.class.php index 86c587f5624..2561c0735c2 100755 --- a/main/inc/lib/plugin.class.php +++ b/main/inc/lib/plugin.class.php @@ -26,6 +26,8 @@ class Plugin public $isCoursePlugin = false; public $isAdminPlugin = false; public $isMailPlugin = false; + // Adds icon in the course home + public $addCourseTool = true; /** * When creating a new course, these settings are added to the course, in @@ -461,6 +463,10 @@ public function install_course_fields($courseId, $add_tool_link = true) return true; } + if ($this->addCourseTool == false) { + return true; + } + //Add an icon in the table tool list $table = Database::get_course_table(TABLE_TOOL_LIST); $sql = "SELECT name FROM $table diff --git a/plugin/courseblock/CourseBlockPlugin.php b/plugin/courseblock/CourseBlockPlugin.php index ee44377679e..2f34bde3595 100644 --- a/plugin/courseblock/CourseBlockPlugin.php +++ b/plugin/courseblock/CourseBlockPlugin.php @@ -7,6 +7,7 @@ class CourseBlockPlugin extends Plugin { public $isCoursePlugin = true; + public $addCourseTool = false; // When creating a new course this settings are added to the course public $course_settings = array(