19declare(strict_types=1);
39 $this->repo =
$repo->map();
42 $this->
access = $domain->access();
43 $this->
settings = $domain->settings();
44 $this->rbacreview =
$domain->rbac()->review();
45 $this->
user = $domain->user();
59 string $screen_sub_id,
64 $this->repo->saveMappingEntry(
79 $this->repo->removeScreenIdsOfChapter(
89 return $this->repo->getScreenIdsOfChapter(
100 if ($this->domain->module()->isAuthoringMode()) {
103 $module_ids = $this->domain->module()->getActiveModules();
106 foreach ($this->repo->getChaptersForScreenId($a_screen_id, $module_ids) as $rec) {
107 if ($rec[
"perm"] !=
"" && $rec[
"perm"] !=
"-") {
109 if ($rec[
"perm"] ===
"create*") {
110 $has_create_perm =
false;
114 $has_create_perm =
true;
115 } elseif ($this->rbacreview->isAssigned($this->user->getId(),
SYSTEM_ROLE_ID)) {
116 $has_create_perm =
true;
117 } elseif ($this->
access->checkAccess(
"read",
"", $a_ref_id)) {
118 $perm = $this->rbacreview->getUserPermissionsOnObject($this->
user->getId(), $a_ref_id);
119 foreach ($perm as $p) {
120 if (strpos($p,
"create_") === 0) {
121 $has_create_perm =
true;
125 if ($has_create_perm) {
126 $chaps[] = $rec[
"chap"];
128 } elseif ($this->
access->checkAccess($rec[
"perm"],
"", $a_ref_id)) {
129 $chaps[] = $rec[
"chap"];
132 $chaps[] = $rec[
"chap"];
153 if ($this->
settings->get(
"help_mode") ===
"2") {
157 if ($this->domain->module()->isAuthoringMode()) {
160 $module_ids = $this->domain->module()->getActiveModules();
163 foreach ($this->repo->getChaptersForScreenId($a_screen_id, $module_ids) as $rec) {
172 $this->repo->deleteEntriesOfModule(
$id);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(InternalRepoService $repo, InternalDomainService $domain)
InternalDomainService $domain
deleteEntriesOfModule(int $id)
saveScreenIdsForChapter(int $chap, array $ids)
getHelpSectionsForId(string $a_screen_id, int $a_ref_id)
hasScreenIdSections(string $a_screen_id)
Has given screen Id any sections? Note: We removed the "ref_id" parameter here, since this method sho...
saveMappingEntry(int $chap, string $comp, string $screen_id, string $screen_sub_id, string $perm, int $module_id=0, string $full_id="")
removeScreenIdsOfChapter(int $chap, int $module_id=0)
getScreenIdsOfChapter(int $chap, int $module_id=0)
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
static _lookupObjId(int $ref_id)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))