28        if (
$ilUser->getLanguage() != 
"de") {
 
   36        if (
$ilUser->getPref(
"hide_help_tt")) {
 
   43            $module_id = (int) 
$ilSetting->get(
"help_module");
 
   44            if ($module_id == 0) {
 
   50            "SELECT tt_text FROM help_tooltip " .
 
   51            " WHERE tt_id = " . 
$ilDB->quote($a_tt_id, 
"text") .
 
   52            " AND module_id = " . 
$ilDB->quote($module_id, 
"integer")
 
   54        $rec = 
$ilDB->fetchAssoc($set);
 
   55        if ($rec[
"tt_text"] != 
"") {
 
   57            if ($module_id == 0) {
 
   58                $t .= 
"<br/><i class='small'>" . $a_tt_id . 
"</i>";
 
   62            $fu = strpos($a_tt_id, 
"_");
 
   63            $gen_tt_id = 
"*" . substr($a_tt_id, $fu);
 
   65                "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"] != 
"") {
 
   72                if ($module_id == 0) {
 
   73                    $t .= 
"<br/><i class='small'>" . $a_tt_id . 
"</i>";
 
   78        if ($module_id == 0) {
 
   79            return "<i>" . $a_tt_id . 
"</i>";
 
  119        $q = 
"SELECT * FROM help_tooltip";
 
  120        $q .= 
" WHERE module_id = " . 
$ilDB->quote($a_module_id, 
"integer");
 
  122            $q .= 
" AND comp = " . 
$ilDB->quote($a_comp, 
"text");
 
  124        $set = 
$ilDB->query($q);
 
  126        while ($rec = 
$ilDB->fetchAssoc($set)) {
 
  127            $tts[$rec[
"id"]] = array(
"id" => $rec[
"id"], 
"text" => $rec[
"tt_text"],
 
  128                "tt_id" => $rec[
"tt_id"]);
 
  139    public static function addTooltip($a_tt_id, $a_text, $a_module_id = 0)
 
  145        $fu = strpos($a_tt_id, 
"_");
 
  146        $comp = substr($a_tt_id, 0, $fu);
 
  148        $nid = 
$ilDB->nextId(
"help_tooltip");
 
  149        $ilDB->manipulate(
"INSERT INTO help_tooltip " .
 
  150            "(id, tt_text, tt_id, comp,module_id) VALUES (" .
 
  151            $ilDB->quote($nid, 
"integer") . 
"," .
 
  152            $ilDB->quote($a_text, 
"text") . 
"," .
 
  153            $ilDB->quote($a_tt_id, 
"text") . 
"," .
 
  154            $ilDB->quote($comp, 
"text") . 
"," .
 
  155            $ilDB->quote($a_module_id, 
"integer") .
 
  171        $fu = strpos($a_tt_id, 
"_");
 
  172        $comp = substr($a_tt_id, 0, $fu);
 
  175            "UPDATE help_tooltip SET " .
 
  176            " tt_text = " . 
$ilDB->quote($a_text, 
"text") . 
", " .
 
  177            " tt_id = " . 
$ilDB->quote($a_tt_id, 
"text") . 
", " .
 
  178            " comp = " . 
$ilDB->quote($comp, 
"text") .
 
  179            " WHERE id = " . 
$ilDB->quote($a_id, 
"integer")
 
  197        $set = 
$ilDB->query(
"SELECT DISTINCT comp FROM help_tooltip " .
 
  198            " WHERE module_id = " . 
$ilDB->quote($a_module_id, 
"integer") .
 
  200        $comps[
""] = 
"- " . 
$lng->txt(
"help_all") . 
" -";
 
  201        while ($rec = 
$ilDB->fetchAssoc($set)) {
 
  202            $comps[$rec[
"comp"]] = $rec[
"comp"];
 
  220            "DELETE FROM help_tooltip WHERE " .
 
  221            " id = " . 
$ilDB->quote($a_id, 
"integer")
 
  238            "DELETE FROM help_tooltip WHERE " .
 
  239            " module_id = " . 
$ilDB->quote($a_id, 
"integer")
 
  261                include_once(
"./Services/Help/classes/class.ilObjHelpSettings.php");
 
An exception for terminatinating execution or to throw for unit testing.
Online help application class.
static addTooltip($a_tt_id, $a_text, $a_module_id=0)
Add tooltip.
static getAllTooltips($a_comp="", $a_module_id=0)
Get all tooltips.
static getTooltipPresentationText($a_tt_id)
Get tooltip for id.
static updateTooltip($a_id, $a_text, $a_tt_id)
Update tooltip.
static getMainMenuTooltip($a_item_id)
Get main menu tooltip.
static getObjCreationTooltipText($a_type)
Get object_creation tooltip tab text.
static getTooltipComponents($a_module_id=0)
Get all tooltip components.
static deleteTooltip($a_id)
Delete tooltip.
static getHelpLMId()
Get help lm id.
static deleteTooltipsOfModule($a_id)
Delete tooltips of module.
static lookupModuleLmId($a_id)
lookup module lm id
static _lookupObjId($a_id)