/** * Add tooltip * * @param * @return */ function addTooltip() { global $lng, $ilCtrl; $tt_id = ilUtil::stripSlashes($_POST["tooltip_id"]); if (trim($tt_id) != "") { include_once "./Services/Help/classes/class.ilHelp.php"; ilHelp::addTooltip(trim($tt_id), ""); ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true); $fu = strpos($tt_id, "_"); $comp = substr($tt_id, 0, $fu); ilSession::set("help_tt_comp", ilUtil::stripSlashes($comp)); } $ilCtrl->redirect($this, "showTooltipList"); }
/** * Import record * * @param * @return */ function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version) { switch ($a_entity) { case "help_map": include_once "./Services/Help/classes/class.ilHelpMapping.php"; // without module ID we do nothing $module_id = $a_mapping->getMapping('Services/Help', 'help_module', 0); if ($module_id) { $new_chap = $a_mapping->getMapping('Services/Help', 'help_chap', $a_rec["Chap"]); if ($new_chap > 0) { ilHelpMapping::saveMappingEntry($new_chap, $a_rec["Component"], $a_rec["ScreenId"], $a_rec["ScreenSubId"], $a_rec["Perm"], $module_id); } } break; case "help_tooltip": include_once "./Services/Help/classes/class.ilHelp.php"; // without module ID we do nothing $module_id = $a_mapping->getMapping('Services/Help', 'help_module', 0); if ($module_id) { ilHelp::addTooltip($a_rec["TtId"], $a_rec["TtText"], $module_id); } break; } }