23 $ilDB = $DIC->database();
28 if (
$ilUser->getLanguage() !=
"de") {
39 $module_id = (int)
$ilSetting->get(
"help_module");
40 if ($module_id == 0) {
46 "SELECT tt_text FROM help_tooltip " .
47 " WHERE tt_id = " .
$ilDB->quote($a_tt_id,
"text") .
48 " AND module_id = " .
$ilDB->quote($module_id,
"integer")
50 $rec =
$ilDB->fetchAssoc($set);
51 if ($rec[
"tt_text"] !=
"") {
53 if ($module_id == 0) {
54 $t.=
"<br/><i class='small'>" . $a_tt_id .
"</i>";
58 $fu = strpos($a_tt_id,
"_");
59 $gen_tt_id =
"*" . substr($a_tt_id, $fu);
61 "SELECT tt_text FROM help_tooltip " .
62 " WHERE tt_id = " .
$ilDB->quote($gen_tt_id,
"text") .
63 " AND module_id = " .
$ilDB->quote($module_id,
"integer")
65 $rec =
$ilDB->fetchAssoc($set);
66 if ($rec[
"tt_text"] !=
"") {
68 if ($module_id == 0) {
69 $t.=
"<br/><i class='small'>" . $a_tt_id .
"</i>";
74 if ($module_id == 0) {
75 return "<i>" . $a_tt_id .
"</i>";
88 return self::getTooltipPresentationText(
$a_type .
"_create");
99 return self::getTooltipPresentationText($a_item_id);
113 $ilDB = $DIC->database();
115 $q =
"SELECT * FROM help_tooltip";
116 $q.=
" WHERE module_id = " .
$ilDB->quote($a_module_id,
"integer");
118 $q.=
" AND comp = " .
$ilDB->quote($a_comp,
"text");
120 $set =
$ilDB->query($q);
122 while ($rec =
$ilDB->fetchAssoc($set)) {
123 $tts[$rec[
"id"]] =
array(
"id" => $rec[
"id"],
"text" => $rec[
"tt_text"],
124 "tt_id" => $rec[
"tt_id"]);
135 public static function addTooltip($a_tt_id, $a_text, $a_module_id = 0)
139 $ilDB = $DIC->database();
141 $fu = strpos($a_tt_id,
"_");
142 $comp = substr($a_tt_id, 0, $fu);
144 $nid =
$ilDB->nextId(
"help_tooltip");
145 $ilDB->manipulate(
"INSERT INTO help_tooltip " .
146 "(id, tt_text, tt_id, comp,module_id) VALUES (" .
147 $ilDB->quote($nid,
"integer") .
"," .
148 $ilDB->quote($a_text,
"text") .
"," .
149 $ilDB->quote($a_tt_id,
"text") .
"," .
150 $ilDB->quote($comp,
"text") .
"," .
151 $ilDB->quote($a_module_id,
"integer") .
165 $ilDB = $DIC->database();
167 $fu = strpos($a_tt_id,
"_");
168 $comp = substr($a_tt_id, 0, $fu);
171 "UPDATE help_tooltip SET " .
172 " tt_text = " .
$ilDB->quote($a_text,
"text") .
", " .
173 " tt_id = " .
$ilDB->quote($a_tt_id,
"text") .
", " .
174 " comp = " .
$ilDB->quote($comp,
"text") .
175 " WHERE id = " .
$ilDB->quote($a_id,
"integer")
190 $ilDB = $DIC->database();
191 $lng = $DIC->language();
193 $set =
$ilDB->query(
"SELECT DISTINCT comp FROM help_tooltip " .
194 " WHERE module_id = " .
$ilDB->quote($a_module_id,
"integer") .
196 $comps[
""] =
"- " .
$lng->txt(
"help_all") .
" -";
197 while ($rec =
$ilDB->fetchAssoc($set)) {
198 $comps[$rec[
"comp"]] = $rec[
"comp"];
213 $ilDB = $DIC->database();
216 "DELETE FROM help_tooltip WHERE " .
217 " id = " .
$ilDB->quote($a_id,
"integer")
231 $ilDB = $DIC->database();
234 "DELETE FROM help_tooltip WHERE " .
235 " module_id = " .
$ilDB->quote($a_id,
"integer")
257 include_once(
"./Services/Help/classes/class.ilObjHelpSettings.php");
static getHelpLMId()
Get help lm id.
static getTooltipPresentationText($a_tt_id)
Get tooltip for id.
static deleteTooltipsOfModule($a_id)
Delete tooltips of module.
static getTooltipComponents($a_module_id=0)
Get all tooltip components.
static getAllTooltips($a_comp="", $a_module_id=0)
Get all tooltips.
static _lookupObjId($a_id)
Online help application class.
static getMainMenuTooltip($a_item_id)
Get main menu tooltip.
Create styles array
The data for the language used.
static getObjCreationTooltipText($a_type)
Get object_creation tooltip tab text.
static lookupModuleLmId($a_id)
lookup module lm id
static deleteTooltip($a_id)
Delete tooltip.
static updateTooltip($a_id, $a_text, $a_tt_id)
Update tooltip.
static addTooltip($a_tt_id, $a_text, $a_module_id=0)
Add tooltip.