30 $lng->loadLanguageModule(
"wsp");
34 $ilCtrl->saveParameter($this,
"wsp_id");
39 $this->node_id = $this->tree->getRootId();
50 $ilCtrl->setReturn($this,
"render");
51 $cmd = $ilCtrl->getCmd();
56 $class_name = $objDefinition->getClassName(
$_REQUEST[
"new_type"]);
64 if (strtolower($ilCtrl->getNextClass($this)) != strtolower(
"ilObj".$class_name.
"GUI"))
66 $ilCtrl->setCmdClass(
"ilObj".$class_name.
"GUI");
71 $next_class = $ilCtrl->getNextClass();
74 $node = $this->tree->getNodeData($this->node_id);
75 $next_class =
"ilObj".$objDefinition->getClassName($node[
"type"]).
"GUI";
76 $ilCtrl->setCmdClass($next_class);
88 $class_path = $ilCtrl->lookupClassPath($next_class);
89 include_once($class_path);
90 $class_name = $ilCtrl->getClassForClasspath($class_path);
94 $gui->setCreationMode();
100 $ilCtrl->forwardCommand($gui);
113 $user_id = $ilUser->getId();
115 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
117 if(!$this->tree->getRootId())
119 $this->tree->createTreeForUser($user_id);
127 $root = $this->tree->getNodeData($this->node_id);
128 if($root[
"type"] !=
"wfld" && $root[
"type"] !=
"wsrt")
131 if(!$ilTabs->back_target)
133 $owner = $this->tree->lookupOwner($this->node_id);
135 if($owner == $ilUser->getId())
137 $parent = $this->tree->getParentNodeData($this->node_id);
138 if($parent[
"wsp_id"])
140 if($parent[
"type"] ==
"wsrt")
142 $class =
"ilobjworkspacerootfoldergui";
146 $class =
"ilobjworkspacefoldergui";
148 $ilCtrl->setParameterByClass($class,
"wsp_id", $parent[
"wsp_id"]);
149 $ilTabs->setBackTarget($lng->txt(
"back"),
150 $ilCtrl->getLinkTargetByClass($class,
""));
156 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id",
"");
157 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"user", $owner);
158 $ilTabs->setBackTarget($lng->txt(
"back"),
159 $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"share"));
172 $settings_map = array(
"blog" =>
"blogs",
174 "tstv" =>
"certificates",
175 "excv" =>
"certificates",
178 $root = $this->tree->getNodeData($this->node_id);
184 foreach(array_keys($subtypes) as $type)
186 if(isset($settings_map[$type]) && $ilSetting->get(
"disable_wsp_".$settings_map[$type]))
191 $class = $objDefinition->getClassName($type);
193 $subobj[] = array(
"value" => $type,
194 "title" => $lng->txt(
"wsp_type_".$type),
196 "alt" => $lng->txt(
"wsp_type_".$type));
201 $lng->loadLanguageModule(
"cntr");
202 $tpl->setCreationSelector($ilCtrl->getFormAction($this),
203 $subobj,
"create", $lng->txt(
"add"));
214 $ilLocator->clearItems();
217 $path = $this->tree->getPathFull($this->node_id);
220 foreach(
$path as $node)
222 $obj_class =
"ilObj".$objDefinition->getClassName($node[
"type"]).
"GUI";
224 $ilCtrl->setParameter($this,
"wsp_id", $node[
"wsp_id"]);
226 switch($node[
"type"])
229 $ilLocator->addItem($lng->txt(
"wsp_personal_workspace"), $ilCtrl->getLinkTargetByClass($obj_class,
"render"));
233 case $objDefinition->isContainer($node[
"type"]):
234 $ilLocator->addItem($node[
"title"], $ilCtrl->getLinkTargetByClass($obj_class,
"render"));
238 $ilLocator->addItem($node[
"title"], $ilCtrl->getLinkTargetByClass($obj_class,
"edit"));
244 $ilCtrl->setParameter($this,
"wsp_id", $this->node_id);