24 if ($ilUser->getLanguage() !=
"de")
29 if ($ilSetting->get(
"help_mode") ==
"1")
40 $module_id = (int) $ilSetting->get(
"help_module");
47 $set = $ilDB->query(
"SELECT tt_text FROM help_tooltip ".
48 " WHERE tt_id = ".$ilDB->quote($a_tt_id,
"text").
49 " AND module_id = ".$ilDB->quote($module_id,
"integer")
51 $rec = $ilDB->fetchAssoc($set);
52 if ($rec[
"tt_text"] !=
"")
57 $t.=
"<br/><i class='small'>".$a_tt_id.
"</i>";
63 $fu = strpos($a_tt_id,
"_");
64 $gen_tt_id =
"*".substr($a_tt_id, $fu);
65 $set = $ilDB->query(
"SELECT tt_text FROM help_tooltip ".
66 " WHERE tt_id = ".$ilDB->quote($gen_tt_id,
"text").
67 " AND module_id = ".$ilDB->quote($module_id,
"integer")
69 $rec = $ilDB->fetchAssoc($set);
70 if ($rec[
"tt_text"] !=
"")
75 $t.=
"<br/><i class='small'>".$a_tt_id.
"</i>";
82 return "<i>".$a_tt_id.
"</i>";
120 $q =
"SELECT * FROM help_tooltip";
121 $q.=
" WHERE module_id = ".$ilDB->quote($a_module_id,
"integer");
124 $q.=
" AND comp = ".$ilDB->quote($a_comp,
"text");
126 $set = $ilDB->query($q);
128 while ($rec = $ilDB->fetchAssoc($set))
130 $tts[$rec[
"id"]] = array(
"id" => $rec[
"id"],
"text" => $rec[
"tt_text"],
131 "tt_id" => $rec[
"tt_id"]);
142 static function addTooltip($a_tt_id, $a_text, $a_module_id = 0)
146 $fu = strpos($a_tt_id,
"_");
147 $comp = substr($a_tt_id, 0, $fu);
149 $nid = $ilDB->nextId(
"help_tooltip");
150 $ilDB->manipulate(
"INSERT INTO help_tooltip ".
151 "(id, tt_text, tt_id, comp,module_id) VALUES (".
152 $ilDB->quote($nid,
"integer").
",".
153 $ilDB->quote($a_text,
"text").
",".
154 $ilDB->quote($a_tt_id,
"text").
",".
155 $ilDB->quote($comp,
"text").
",".
156 $ilDB->quote($a_module_id,
"integer").
170 $fu = strpos($a_tt_id,
"_");
171 $comp = substr($a_tt_id, 0, $fu);
173 $ilDB->manipulate(
"UPDATE help_tooltip SET ".
174 " tt_text = ".$ilDB->quote($a_text,
"text").
", ".
175 " tt_id = ".$ilDB->quote($a_tt_id,
"text").
", ".
176 " comp = ".$ilDB->quote($comp,
"text").
177 " WHERE id = ".$ilDB->quote($a_id,
"integer")
192 $set = $ilDB->query(
"SELECT DISTINCT comp FROM help_tooltip ".
193 " WHERE module_id = ".$ilDB->quote($a_module_id,
"integer").
195 $comps[
""] =
"- ".$lng->txt(
"help_all").
" -";
196 while ($rec = $ilDB->fetchAssoc($set))
198 $comps[$rec[
"comp"]] = $rec[
"comp"];
213 $ilDB->manipulate(
"DELETE FROM help_tooltip WHERE ".
214 " id = ".$ilDB->quote($a_id,
"integer")
228 $ilDB->manipulate(
"DELETE FROM help_tooltip WHERE ".
229 " module_id = ".$ilDB->quote($a_id,
"integer")