2 if (!empty($_GET['askDelete'])) { $content .= '
'.get_lang('Do you really want to delete this link?').'
    '.get_lang('No').' |  '.get_lang('Yes').'
'; } elseif (isset($_GET['delete']) && $_GET['delete']) { /* * Process hiding a tools from available tools. */ Database::query("DELETE FROM $tool_table WHERE c_id = $course_id AND id='$id' AND added_tool=1"); } } // Course legal $enabled = api_get_plugin_setting('courselegal', 'tool_enable'); $pluginExtra = null; if ($enabled === 'true') { require_once api_get_path(SYS_PLUGIN_PATH).'courselegal/config.php'; $plugin = CourseLegalPlugin::create(); $pluginExtra = $plugin->getTeacherLink(); } // Start of tools for CourseAdmins (teachers/tutors) if ($session_id === 0 && api_is_course_admin() && api_is_allowed_to_edit(null, true)) { $content .= '
'; $content .= $pluginExtra; } elseif (api_is_coach()) { $content .= $pluginExtra; if (api_get_setting('show_session_data') === 'true' && $session_id > 0) { $content .= '
'.get_lang('Session\'s data').' '; $content .= CourseHome::show_session_data($session_id); $content .= '
'; } } $blocks = CourseHome::getUserBlocks(); $activityView = new Template('', false, false, false, false, false, false); $activityView->assign('blocks', $blocks); $content .= $activityView->fetch( $activityView->get_template('course_home/activity.tpl') );