Help mapping.
More...
◆ __construct()
ilHelpMapping::__construct |
( |
| ) |
|
◆ 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 166 of file class.ilHelpMapping.php.
References $DIC, $ilDB, $ilSetting, $ilUser, $module, and ilObject\_lookupObjId().
Referenced by ilHelpGUI\getHelpSections(), and ilHelpGUI\showHelp().
170 $ilDB = $DIC->database();
171 $ilAccess = $DIC->access();
173 $rbacreview = $DIC->rbac()->review();
175 $ilObjDataCache = $DIC[
"ilObjDataCache"];
186 $sc_id = explode(
"/", $a_screen_id);
188 if ($sc_id[0] !=
"") {
189 if ($sc_id[1] ==
"") {
192 if ($sc_id[2] ==
"") {
196 "SELECT chap, perm FROM help_map JOIN lm_tree" .
197 " ON (help_map.chap = lm_tree.child) " .
198 " WHERE (component = " .
$ilDB->quote($sc_id[0],
"text") .
199 " OR component = " .
$ilDB->quote(
"*",
"text") .
")" .
200 " AND screen_id = " .
$ilDB->quote($sc_id[1],
"text") .
201 " AND screen_sub_id = " .
$ilDB->quote($sc_id[2],
"text") .
202 " AND module_id = " .
$ilDB->quote(
$module,
"integer") .
203 " ORDER BY lm_tree.lft" 205 while ($rec =
$ilDB->fetchAssoc($set)) {
206 if ($rec[
"perm"] !=
"" && $rec[
"perm"] !=
"-") {
208 if ($rec[
"perm"] ==
"create*") {
209 $has_create_perm =
false;
213 $has_create_perm =
true;
214 } elseif ($rbacreview->isAssigned(
$ilUser->getId(), SYSTEM_ROLE_ID)) {
215 $has_create_perm =
true;
216 } elseif ($ilAccess->checkAccess(
"read",
"", (
int) $a_ref_id)) {
217 $perm = $rbacreview->getUserPermissionsOnObject(
$ilUser->getId(), (int) $a_ref_id);
218 foreach ($perm as $p) {
219 if (substr($p, 0, 7) ==
"create_") {
220 $has_create_perm =
true;
224 if ($has_create_perm) {
225 $chaps[] = $rec[
"chap"];
227 } elseif ($ilAccess->checkAccess($rec[
"perm"],
"", (
int) $a_ref_id)) {
228 $chaps[] = $rec[
"chap"];
231 $chaps[] = $rec[
"chap"];
if($modEnd===false) $module
static _lookupObjId($a_id)
◆ getScreenIdsOfChapter()
static ilHelpMapping::getScreenIdsOfChapter |
( |
|
$a_chap, |
|
|
|
$a_module_id = 0 |
|
) |
| |
|
static |
Get screen ids of chapter.
- Parameters
-
Definition at line 131 of file class.ilHelpMapping.php.
References $DIC, $id, and $ilDB.
Referenced by ilHelpMappingTableGUI\fillRow().
135 $ilDB = $DIC->database();
138 "SELECT * FROM help_map " .
139 " WHERE chap = " .
$ilDB->quote($a_chap,
"integer") .
140 " AND module_id = " .
$ilDB->quote($a_module_id,
"integer") .
141 " ORDER BY component, screen_id, screen_sub_id" 143 $screen_ids = array();
144 while ($rec =
$ilDB->fetchAssoc($set)) {
145 if ($rec[
"screen_id"] ==
"-") {
146 $rec[
"screen_id"] =
"";
148 if ($rec[
"screen_sub_id"] ==
"-") {
149 $rec[
"screen_sub_id"] =
"";
151 $id = $rec[
"component"] .
"/" . $rec[
"screen_id"] .
"/" . $rec[
"screen_sub_id"];
152 if ($rec[
"perm"] !=
"" && $rec[
"perm"] !=
"-") {
153 $id .=
"#" . $rec[
"perm"];
if(!array_key_exists('StateId', $_REQUEST)) $id
◆ 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 249 of file class.ilHelpMapping.php.
References $DIC, $ilDB, $ilSetting, $ilUser, and $module.
Referenced by ilHelpGUI\hasSections().
253 $ilDB = $DIC->database();
254 $ilAccess = $DIC->access();
258 if (
$ilUser->getLanguage() !=
"de") {
275 $sc_id = explode(
"/", $a_screen_id);
276 if ($sc_id[0] !=
"") {
277 if ($sc_id[1] ==
"") {
280 if ($sc_id[2] ==
"") {
284 "SELECT chap, perm FROM help_map " .
285 " WHERE (component = " .
$ilDB->quote($sc_id[0],
"text") .
286 " OR component = " .
$ilDB->quote(
"*",
"text") .
")" .
287 " AND screen_id = " .
$ilDB->quote($sc_id[1],
"text") .
288 " AND screen_sub_id = " .
$ilDB->quote($sc_id[2],
"text") .
291 while ($rec =
$ilDB->fetchAssoc($set)) {
if($modEnd===false) $module
◆ removeScreenIdsOfChapter()
static ilHelpMapping::removeScreenIdsOfChapter |
( |
|
$a_chap, |
|
|
|
$a_module_id = 0 |
|
) |
| |
|
static |
◆ 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 80 of file class.ilHelpMapping.php.
References $DIC, and $ilDB.
Referenced by ilHelpDataSet\importRecord().
90 $ilDB = $DIC->database();
94 array(
"chap" => array(
"integer", $a_chap),
95 "component" => array(
"text", $a_comp),
96 "screen_id" => array(
"text", $a_screen_id),
97 "screen_sub_id" => array(
"text", $a_screen_sub_id),
98 "perm" => array(
"text", $a_perm),
99 "module_id" => array(
"integer", $a_module_id)
◆ saveScreenIdsForChapter()
static ilHelpMapping::saveScreenIdsForChapter |
( |
|
$a_chap, |
|
|
|
$a_ids |
|
) |
| |
|
static |
Save screen ids for chapter.
- Parameters
-
Definition at line 36 of file class.ilHelpMapping.php.
References $DIC, $id, and $ilDB.
Referenced by ilObjContentObjectGUI\saveHelpMapping().
40 $ilDB = $DIC->database();
42 self::removeScreenIdsOfChapter($a_chap);
43 if (is_array($a_ids)) {
44 foreach ($a_ids as
$id) {
46 $id = explode(
"/", $id);
51 $id2 = explode(
"#", $id[2]);
60 array(
"chap" => array(
"integer", $a_chap),
61 "component" => array(
"text", $id[0]),
62 "screen_id" => array(
"text", $id[1]),
63 "screen_sub_id" => array(
"text", $id2[0]),
64 "perm" => array(
"text", $id2[1]),
65 "module_id" => array(
"integer", 0)
if(!array_key_exists('StateId', $_REQUEST)) $id
◆ $db
The documentation for this class was generated from the following file: