ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilSAHSEditToolProvider.php
Go to the documentation of this file.
1<?php
2
6
13{
14 const SHOW_SCORM_EDIT_TREE = 'show_scorm_edit_tree';
15
16
21 {
22 return $this->context_collection->main()->repository();
23 }
24
25
29 public function getToolsForContextStack(CalledContexts $called_contexts) : array
30 {
31 $tools = [];
32 $additional_data = $called_contexts->current()->getAdditionalData();
33 if ($additional_data->is(self::SHOW_SCORM_EDIT_TREE, true)) {
34 $iff = function ($id) {
35 return $this->identification_provider->contextAwareIdentifier($id);
36 };
37 $l = function (string $content) {
38 return $this->dic->ui()->factory()->legacy($content);
39 };
40 $tools[] = $this->factory->tool($iff("tree"))
41 ->withTitle("Organisation")
42 ->withContentWrapper(function () use ($l) {
43 return $l($this->getTree());
44 });
45 }
46
47 return $tools;
48 }
49
50
56 private function getTree() : string
57 {
59 $lm = $service->getLearningModule();
60 $exp = new ilSCORM2004EditorExplorerGUI(["ilSAHSEditGUI", "ilObjSCORM2004LearningModuleGUI"], "showEditTree", $lm);
61
62 return $exp->getHTML();
63 }
64}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
Scorm editor GS tool provider.
getToolsForContextStack(CalledContexts $called_contexts)
@inheritDoc
Main service init and factory.
$service
Definition: result.php:17