24 self::removeScreenIdsOfChapter($a_chap);
27 foreach ($a_ids as $id)
30 $id = explode(
"/", $id);
37 $id2 = explode(
"#", $id[2]);
46 $ilDB->replace(
"help_map",
48 "component" =>
array(
"text", $id[0]),
49 "screen_id" =>
array(
"text", $id[1]),
50 "screen_sub_id" =>
array(
"text", $id2[0]),
51 "perm" =>
array(
"text", $id2[1]),
52 "module_id" =>
array(
"integer", 0)
68 $a_screen_sub_id, $a_perm, $a_module_id = 0)
72 $ilDB->replace(
"help_map",
74 "component" =>
array(
"text", $a_comp),
75 "screen_id" =>
array(
"text", $a_screen_id),
76 "screen_sub_id" =>
array(
"text", $a_screen_sub_id),
77 "perm" =>
array(
"text", $a_perm),
78 "module_id" =>
array(
"integer", $a_module_id)
95 $ilDB->manipulate(
"DELETE FROM help_map WHERE ".
96 " chap = ".$ilDB->quote($a_chap,
"integer").
97 " AND module_id = ".$ilDB->quote($a_module_id,
"integer")
111 $set = $ilDB->query(
"SELECT * FROM help_map ".
112 " WHERE chap = ".$ilDB->quote($a_chap,
"integer").
113 " AND module_id = ".$ilDB->quote($a_module_id,
"integer").
114 " ORDER BY component, screen_id, screen_sub_id" 116 $screen_ids =
array();
117 while ($rec = $ilDB->fetchAssoc($set))
119 if ($rec[
"screen_id"] ==
"-")
121 $rec[
"screen_id"] =
"";
123 if ($rec[
"screen_sub_id"] ==
"-")
125 $rec[
"screen_sub_id"] =
"";
127 $id = $rec[
"component"].
"/".$rec[
"screen_id"].
"/".$rec[
"screen_sub_id"];
128 if ($rec[
"perm"] !=
"" && $rec[
"perm"] !=
"-")
130 $id.=
"#".$rec[
"perm"];
153 $module = (int) $ilSetting->get(
"help_module");
160 $sc_id = explode(
"/", $a_screen_id);
172 $set = $ilDB->query(
"SELECT chap, perm FROM help_map JOIN lm_tree".
173 " ON (help_map.chap = lm_tree.child) ".
174 " WHERE (component = ".$ilDB->quote($sc_id[0],
"text").
175 " OR component = ".$ilDB->quote(
"*",
"text").
")".
176 " AND screen_id = ".$ilDB->quote($sc_id[1],
"text").
177 " AND screen_sub_id = ".$ilDB->quote($sc_id[2],
"text").
178 " AND module_id = ".$ilDB->quote($module,
"integer").
179 " ORDER BY lm_tree.lft" 181 while ($rec = $ilDB->fetchAssoc($set))
183 if ($rec[
"perm"] !=
"" && $rec[
"perm"] !=
"-")
186 if ($rec[
"perm"] ==
"create*")
188 $has_create_perm =
false;
193 $has_create_perm =
true;
195 else if ($rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID))
197 $has_create_perm =
true;
199 else if ($ilAccess->checkAccess(
"read",
"", (
int) $a_ref_id))
201 $perm = $rbacreview->getUserPermissionsOnObject($ilUser->getId(), (int) $a_ref_id);
202 foreach ($perm as $p)
204 if (substr($p, 0, 7) ==
"create_")
206 $has_create_perm =
true;
210 if ($has_create_perm)
212 $chaps[] = $rec[
"chap"];
215 else if ($ilAccess->checkAccess($rec[
"perm"],
"", (
int) $a_ref_id))
217 $chaps[] = $rec[
"chap"];
222 $chaps[] = $rec[
"chap"];
244 if ($ilUser->getLanguage() !=
"de")
249 if ($ilSetting->get(
"help_mode") ==
"2")
260 $module = (int) $ilSetting->get(
"help_module");
267 $sc_id = explode(
"/", $a_screen_id);
278 $set = $ilDB->query(
"SELECT chap, perm FROM help_map ".
279 " WHERE (component = ".$ilDB->quote($sc_id[0],
"text").
280 " OR component = ".$ilDB->quote(
"*",
"text").
")".
281 " AND screen_id = ".$ilDB->quote($sc_id[1],
"text").
282 " AND screen_sub_id = ".$ilDB->quote($sc_id[2],
"text").
283 " AND module_id = ".$ilDB->quote($module,
"integer")
285 while ($rec = $ilDB->fetchAssoc($set))
317 $ilDB->manipulate(
"DELETE FROM help_map WHERE ".
318 " module_id = ".$ilDB->quote($a_id,
"integer"));
static deleteEntriesOfModule($a_id)
Delete entries of module.
static getHelpSectionsForId($a_screen_id, $a_ref_id)
Get help sections for screen id.
static hasScreenIdSections($a_screen_id)
Has given screen Id any sections?
static removeScreenIdsOfChapter($a_chap, $a_module_id=0)
Remove screen ids of chapter.
getScreenIdsOfChapter($a_chap, $a_module_id=0)
Get screen ids of chapter.
saveScreenIdsForChapter($a_chap, $a_ids)
Save screen ids for chapter.
static _lookupObjId($a_id)
Create styles array
The data for the language used.
static saveMappingEntry($a_chap, $a_comp, $a_screen_id, $a_screen_sub_id, $a_perm, $a_module_id=0)
Save mapping entry.