2) */ if (isset($_GET['remove']) && $_GET['remove']) { $msgDestroy = get_lang('DelLk').'
'; $msgDestroy .= ''.get_lang('No').' | '; $msgDestroy .= ''.get_lang('Yes').''; $show_message .= Display :: return_message($msgDestroy, 'confirmation', false); } elseif (isset($_GET['destroy']) && $_GET['destroy']) { /* * Process hiding a tools from available tools. * visibility=2 are only view by Dokeos Administrator (visibility 0,1->2) */ Database::query("UPDATE $tool_table SET visibility='2' WHERE c_id = $course_id AND id='".$id."'"); } elseif (isset($_GET['hide']) && $_GET['hide']) { /* HIDE */ // visibility 1 -> 0 Database::query("UPDATE $tool_table SET visibility=0 WHERE c_id = $course_id AND id='".$id."'"); $show_message .= Display::return_message(get_lang('ToolIsNowHidden'), 'confirmation'); } elseif (isset($_GET['restore']) && $_GET["restore"]) { // visibility 0,2 -> 1 /* REACTIVATE */ Database::query("UPDATE $tool_table SET visibility=1 WHERE c_id = $course_id AND id='".$id."'"); $show_message .= Display::return_message(get_lang('ToolIsNowVisible'), 'confirmation'); } } // Work with data post askable by admin of course // Work with data post askable by admin of course if (api_is_platform_admin()) { // Show message to confirm that a tool it to be hidden from available tools // visibility 0,1->2 if (!empty($_GET['askDelete'])) { $content .='
'.get_lang('DelLk').'
    '.get_lang('No').' |  '.get_lang('Yes').'
'; } elseif (isset($_GET['delete']) && $_GET['delete']) { /* * Process hiding a tools from available tools. */ //where $id is set? $id = intval($id); Database::query("DELETE FROM $tool_table WHERE c_id = $course_id AND id='$id' AND added_tool=1"); } } /* TOOLS VISIBLE FOR EVERYBODY */ $content .= '
'; $content .= ''; $content .= CourseHome::show_tool_2column(TOOL_PUBLIC); $content .= '
'; $content .= '
'; /* COURSE ADMIN ONLY VIEW */ // Start of tools for CourseAdmins (teachers/tutors) if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { $content .= "
"; $content .= ""; $content .= get_lang('CourseAdminOnly'); $content .= ""; $content .= ""; $content .= CourseHome::show_tool_2column(TOOL_COURSE_ADMIN); /* INACTIVE TOOLS - HIDDEN (GREY) LINKS */ $content .= "\n". "\n". "\n". ""; $content .= CourseHome::show_tool_2column(TOOL_PUBLIC_BUT_HIDDEN); $content .= "

\n". "
\n".get_lang('InLnk')."
". "
"; $content .= "
"; } /* Tools for platform admin only */ if (api_is_platform_admin() && api_is_allowed_to_edit(null, true) && !api_is_coach()) { $content .='
'.get_lang('PlatformAdminOnly').' '.CourseHome::show_tool_2column(TOOL_PLATFORM_ADMIN).'
'; }