27        $this->db = 
$DIC->database();
 
   43        if (is_array($a_ids)) {
 
   44            foreach ($a_ids as 
$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)
 
   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)
 
  119            "DELETE FROM help_map WHERE " .
 
  120            " chap = " . 
$ilDB->quote($a_chap, 
"integer") .
 
  121            " AND module_id = " . 
$ilDB->quote($a_module_id, 
"integer")
 
  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"];
 
  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"];
 
  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)) {
 
  324        $ilDB->manipulate(
"DELETE FROM help_map WHERE " .
 
  325            " module_id = " . 
$ilDB->quote($a_id, 
"integer"));
 
An exception for terminatinating execution or to throw for unit testing.
static removeScreenIdsOfChapter($a_chap, $a_module_id=0)
Remove screen ids of chapter.
static saveMappingEntry( $a_chap, $a_comp, $a_screen_id, $a_screen_sub_id, $a_perm, $a_module_id=0)
Save mapping entry.
static deleteEntriesOfModule($a_id)
Delete entries of module.
static hasScreenIdSections($a_screen_id)
Has given screen Id any sections?
static getHelpSectionsForId($a_screen_id, $a_ref_id)
Get help sections for screen id.
__construct()
Constructor.
static saveScreenIdsForChapter($a_chap, $a_ids)
Save screen ids for chapter.
static getScreenIdsOfChapter($a_chap, $a_module_id=0)
Get screen ids of chapter.
static _lookupObjId($a_id)
if(!array_key_exists('StateId', $_REQUEST)) $id
if($modEnd===false) $module