19declare(strict_types=1);
29 protected \ILIAS\Help\Tooltips\TooltipsManager
$tooltips;
40 $this->
settings = $domain->settings();
41 $this->help_map = $domain->
map();
42 $this->tooltips = $domain->
tooltips();
43 $this->
event = $domain->event();
44 $this->
user = $domain->user();
50 $id = $this->repo->create();
53 $imp = new \ilImport();
54 $conf = $imp->getConfig(
"components/ILIAS/Help");
55 $conf->setModuleId(
$id);
56 $new_id = $imp->importObject(
null, $file[
"tmp_name"], $file[
"name"],
"lm",
"components/ILIAS/LearningModule");
57 $newObj = new \ilObjLearningModule($new_id,
false);
59 $this->repo->writeHelpModuleLmId(
$id, $newObj->getId());
61 throw new \ilLMOldExportFileException(
"This file seems to be from ILIAS version 5.0.x or lower. Import is not supported anymore.");
65 'components/ILIAS/Help',
75 return $this->repo->getHelpModules();
84 foreach ($this->getHelpModules() as $m) {
86 $ids[] = (
int) $m[
"id"];
94 if ($this->
user->getLanguage() !==
"de") {
97 if ($this->isAuthoringMode()) {
100 return (count($this->getActiveModules()) > 0);
105 if ($this->
settings->get(
"help_mode") ===
"1") {
108 return $this->isHelpActive();
113 return ($this->getAuthoringLMId() > 0);
118 if (defined(
'OH_REF_ID') && (
int) OH_REF_ID > 0) {
127 return $this->repo->lookupModuleTitle(
$id);
133 return $this->repo->lookupModuleLmId(
$id);
138 $this->repo->writeActive($module_id,
true);
143 $this->repo->writeActive($module_id,
false);
149 $lm_id = $this->repo->lookupModuleLmId(
$id);
153 $lm = new \ilObjLearningModule($lm_id,
false);
158 $this->help_map->deleteEntriesOfModule(
$id);
161 $this->tooltips->deleteTooltipsOfModule(
$id);
163 $this->repo->deleteModule(
$id);
169 return $this->repo->isHelpLM($lm_id);
174 $this->repo->saveOrder($order);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
lookupModuleTitle(int $id)
ILIAS Help Tooltips TooltipsManager $tooltips
__construct(ModuleDBRepository $repo, InternalDomainService $domain)
ILIAS Help Map MapManager $help_map
lookupModuleLmId(int $id)
deactivate(int $module_id)
manifest.xml file not found-exception for import
static _lookupType(int $id, bool $reference=false)
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...