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"];
92 $ilCtrl = $DIC->ctrl();
93 $lng = $DIC->language();
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");
125 $cmd = $ilCtrl->getCmd();
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();
165 $ilCtrl->forwardCommand($gui);
182 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
184 if (!$this->tree->getRootId()) {
185 $this->tree->createTreeForUser($user_id);
196 $root = $this->tree->getNodeData($this->node_id);
197 if ($root[
"type"] !=
"wfld" && $root[
"type"] !=
"wsrt") {
199 if (!$ilTabs->back_target) {
200 $owner = $this->tree->lookupOwner($this->node_id);
202 if ($owner ==
$ilUser->getId()) {
203 $parent = $this->tree->getParentNodeData($this->node_id);
204 if ($parent[
"wsp_id"]) {
205 if ($parent[
"type"] ==
"wsrt") {
206 $class =
"ilobjworkspacerootfoldergui";
208 $class =
"ilobjworkspacefoldergui";
210 $ilCtrl->setParameterByClass($class,
"wsp_id", $parent[
"wsp_id"]);
211 $ilTabs->setBackTarget(
213 $ilCtrl->getLinkTargetByClass($class,
"")
219 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id",
"");
220 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"user", $owner);
221 $ilTabs->setBackTarget(
223 $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"share")
241 $ilLocator->clearItems();
244 $path = $this->tree->getPathFull($this->node_id);
246 foreach ($path as $node) {
247 $obj_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
249 $ilCtrl->setParameter($this,
"wsp_id", $node[
"wsp_id"]);
251 switch ($node[
"type"]) {
253 $ilLocator->addItem(
$lng->txt(
"mm_personal_and_shared_r"), $ilCtrl->getLinkTargetByClass($obj_class,
"render"));
257 case $objDefinition->isContainer($node[
"type"]):
258 $ilLocator->addItem($node[
"title"], $ilCtrl->getLinkTargetByClass($obj_class,
"render"));
262 $ilLocator->addItem($node[
"title"], $ilCtrl->getLinkTargetByClass($obj_class,
"edit"));
268 $ilCtrl->setParameter($this,
"wsp_id", $this->node_id);
GUI class for personal workspace.
initTree()
Init personal tree.
renderLocator()
Build locator for current node.
Tree handler for personal workspace.
executeCommand()
execute command