83 $this->ctrl =
$DIC->ctrl();
84 $this->lng =
$DIC->language();
85 $this->
help = $DIC[
"ilHelp"];
86 $this->obj_definition =
$DIC[
"objDefinition"];
87 $this->tpl =
$DIC[
"tpl"];
88 $this->main_menu =
$DIC[
"ilMainMenu"];
89 $this->
user = $DIC->user();
90 $this->tabs =
$DIC->tabs();
91 $this->locator =
$DIC[
"ilLocator"];
94 $ilHelp =
$DIC[
"ilHelp"];
97 $lng->loadLanguageModule(
"wsp");
101 $ilCtrl->saveParameter($this,
"wsp_id");
103 $this->node_id = (int) $_REQUEST[
"wsp_id"];
104 if (!$this->node_id || !$this->tree->isInTree($this->node_id)) {
105 $this->node_id = $this->tree->getRootId();
107 $this->tool_context =
$DIC->globalScreen()->tool()->context();
120 if ($this->
settings->get(
"disable_personal_workspace")) {
121 throw new ilException($this->lng->txt(
"no_permission"));
124 $ilCtrl->setReturn($this,
"render");
130 if ($_REQUEST[
"new_type"]) {
131 $class_name = $objDefinition->getClassName($_REQUEST[
"new_type"]);
139 if (strtolower(
$ilCtrl->getNextClass($this)) != strtolower(
"ilObj" . $class_name .
"GUI")) {
140 $ilCtrl->setCmdClass(
"ilObj" . $class_name .
"GUI");
145 $next_class =
$ilCtrl->getNextClass();
147 $node = $this->tree->getNodeData($this->node_id);
148 $next_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
149 $ilCtrl->setCmdClass($next_class);
156 $class_path =
$ilCtrl->lookupClassPath($next_class);
157 include_once($class_path);
158 $class_name =
$ilCtrl->getClassForClasspath($class_path);
159 if ($_REQUEST[
"new_type"]) {
161 $gui->setCreationMode();
183 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
185 if (!$this->tree->getRootId()) {
186 $this->tree->createTreeForUser($user_id);
197 $root = $this->tree->getNodeData($this->node_id);
198 if ($root[
"type"] !=
"wfld" && $root[
"type"] !=
"wsrt") {
200 if (!$ilTabs->back_target) {
201 $owner = $this->tree->lookupOwner($this->node_id);
203 if ($owner ==
$ilUser->getId()) {
204 $parent = $this->tree->getParentNodeData($this->node_id);
205 if ($parent[
"wsp_id"]) {
206 if ($parent[
"type"] ==
"wsrt") {
207 $class =
"ilobjworkspacerootfoldergui";
209 $class =
"ilobjworkspacefoldergui";
211 $ilCtrl->setParameterByClass($class,
"wsp_id", $parent[
"wsp_id"]);
212 $ilTabs->setBackTarget(
214 $ilCtrl->getLinkTargetByClass($class,
"")
220 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id",
"");
221 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"user", $owner);
222 $ilTabs->setBackTarget(
224 $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"share")
242 $ilLocator->clearItems();
245 $path = $this->tree->getPathFull($this->node_id);
247 foreach ($path as $node) {
248 $obj_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
250 $ilCtrl->setParameter($this,
"wsp_id", $node[
"wsp_id"]);
252 switch ($node[
"type"]) {
254 $ilLocator->addItem(
$lng->txt(
"personal_resources"),
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
258 case $objDefinition->isContainer($node[
"type"]):
259 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
263 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"edit"));
269 $ilCtrl->setParameter($this,
"wsp_id", $this->node_id);
An exception for terminatinating execution or to throw for unit testing.
Base class for ILIAS Exception handling.
GUI class for personal workspace.
renderLocator()
Build locator for current node.
executeCommand()
execute command
initTree()
Init personal tree.
Tree handler for personal workspace.