Help mapping.
More...
◆ deleteEntriesOfModule()
static ilHelpMapping::deleteEntriesOfModule |
( |
|
$a_id | ) |
|
|
static |
◆ getHelpSectionsForId()
static ilHelpMapping::getHelpSectionsForId |
( |
|
$a_screen_id, |
|
|
|
$a_ref_id |
|
) |
| |
|
static |
Get help sections for screen id.
- Parameters
-
Definition at line 143 of file class.ilHelpMapping.php.
References $ilDB, $ilSetting, $ilUser, ilObject\_lookupObjId(), and array.
Referenced by ilHelpGUI\getHelpSections(), and ilHelpGUI\showHelp().
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"];
static _lookupObjId($a_id)
Create styles array
The data for the language used.
◆ getScreenIdsOfChapter()
ilHelpMapping::getScreenIdsOfChapter |
( |
|
$a_chap, |
|
|
|
$a_module_id = 0 |
|
) |
| |
Get screen ids of chapter.
- Parameters
-
Definition at line 107 of file class.ilHelpMapping.php.
References $ilDB, and array.
Referenced by ilHelpMappingTableGUI\fillRow().
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"];
Create styles array
The data for the language used.
◆ hasScreenIdSections()
static ilHelpMapping::hasScreenIdSections |
( |
|
$a_screen_id | ) |
|
|
static |
Has given screen Id any sections?
Note: We removed the "ref_id" parameter here, since this method should be fast. It is used to decide whether the help button should appear or not. We assume that there is at least one section for users with the "read" permission.
- Parameters
-
Definition at line 240 of file class.ilHelpMapping.php.
References $ilDB, $ilSetting, and $ilUser.
Referenced by ilHelpGUI\hasSections().
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))
◆ removeScreenIdsOfChapter()
static ilHelpMapping::removeScreenIdsOfChapter |
( |
|
$a_chap, |
|
|
|
$a_module_id = 0 |
|
) |
| |
|
static |
Remove screen ids of chapter.
- Parameters
-
Definition at line 91 of file class.ilHelpMapping.php.
References $ilDB.
Referenced by ilStructureObject\delete().
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")
◆ saveMappingEntry()
static ilHelpMapping::saveMappingEntry |
( |
|
$a_chap, |
|
|
|
$a_comp, |
|
|
|
$a_screen_id, |
|
|
|
$a_screen_sub_id, |
|
|
|
$a_perm, |
|
|
|
$a_module_id = 0 |
|
) |
| |
|
static |
Save mapping entry.
- Parameters
-
Definition at line 67 of file class.ilHelpMapping.php.
References $ilDB, and array.
Referenced by ilHelpDataSet\importRecord().
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)
Create styles array
The data for the language used.
◆ saveScreenIdsForChapter()
ilHelpMapping::saveScreenIdsForChapter |
( |
|
$a_chap, |
|
|
|
$a_ids |
|
) |
| |
Save screen ids for chapter.
- Parameters
-
Definition at line 20 of file class.ilHelpMapping.php.
References $ilDB, and array.
Referenced by ilObjContentObjectGUI\saveHelpMapping().
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)
Create styles array
The data for the language used.
The documentation for this class was generated from the following file: