26 $ilCtrl->saveParameter($this,
"wsp_id");
27 $ilCtrl->saveParameter($this,
"prt_id");
28 $this->node_id = (int)
$_GET[
"wsp_id"];
29 $this->portfolio_id = (int)
$_GET[
"prt_id"];
36 $next_class = $ilCtrl->getNextClass($this);
37 $cmd = $ilCtrl->getCmd();
39 $tpl->getStandardTemplate();
42 $ilMainMenu->setActive(
"desktop");
45 if($ilUser->getId() != ANONYMOUS_USER_ID &&
47 !in_array($next_class,
array(
"ilobjbloggui",
"ilobjportfoliogui")))
49 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
50 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
53 $owner_id = $tree->lookupOwner($this->node_id);
54 $obj_id = $tree->lookupObjectId($this->node_id);
56 $lng->loadLanguageModule(
"wsp");
59 if($owner_id != $ilUser->getId())
61 $ilCtrl->setParameterByClass(
"ilpersonaldesktopgui",
"dsh", $owner_id);
62 $link = $ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"jumptoworkspace");
63 $ilLocator->addItem($lng->txt(
"wsp_tab_shared"), $link);
65 include_once
"Services/User/classes/class.ilUserUtil.php";
70 $link = $ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"jumptoworkspace");
71 $ilLocator->addItem($lng->txt(
"wsp_tab_personal"), $link);
74 $link = $access_handler->getGotoLink($this->node_id, $obj_id);
76 $tpl->setLocator($ilLocator);
82 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
84 $ilCtrl->forwardCommand($bgui);
88 include_once
"Modules/File/classes/class.ilObjFileGUI.php";
90 $ilCtrl->forwardCommand($fgui);
93 case "ilobjtestverificationgui":
94 include_once
"Modules/Test/classes/class.ilObjTestVerificationGUI.php";
96 $ilCtrl->forwardCommand($tgui);
99 case "ilobjexerciseverificationgui":
100 include_once
"Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
102 $ilCtrl->forwardCommand($egui);
105 case "ilobjlinkresourcegui":
106 include_once
"Modules/WebResource/classes/class.ilObjLinkResourceGUI.php";
108 $ilCtrl->forwardCommand($lgui);
111 case "ilobjportfoliogui":
112 include_once
"Modules/Portfolio/classes/class.ilObjPortfolioGUI.php";
114 $ilCtrl->forwardCommand($pgui);
130 if(!$this->node_id && !$this->portfolio_id)
132 exit(
"invalid call");
138 if(!self::hasAccess($this->node_id))
140 exit(
"no permission");
146 if(!self::hasAccess($this->portfolio_id,
true))
148 exit(
"no permission");
154 public static function hasAccess($a_node_id, $a_is_portfolio =
false)
159 if($ilUser->getId() != ANONYMOUS_USER_ID)
163 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
164 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
170 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
180 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php";
184 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
190 if (!$ilSetting->get(
'user_portfolios'))
196 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
198 if(!$prtf->isOnline())
203 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
218 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&wsp_id=".$a_node_id);
222 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&prt_id=".$a_node_id);
231 global
$ilCtrl, $objDefinition;
235 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
237 if(!$object_data[
"obj_id"])
239 exit(
"invalid object");
246 exit(
"invalid object");
248 $object_data[
"obj_id"] = $a_node_id;
249 $object_data[
"type"] =
"prtf";
252 $class = $objDefinition->getClassName($object_data[
"type"]);
253 $gui =
"ilobj".$class.
"gui";
255 switch($object_data[
"type"])
258 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
259 $ilCtrl->setParameterByClass($gui,
"gtp", (
int)
$_GET[
"gtp"]);
260 $ilCtrl->redirectByClass($gui,
"preview");
266 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
267 $ilCtrl->redirectByClass($gui,
"deliver");
271 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
272 $ilCtrl->redirectByClass($gui);
275 $ilCtrl->setParameterByClass($gui,
"prt_id", $a_node_id);
276 $ilCtrl->setParameterByClass($gui,
"gtp", (
int)$_GET[
"gtp"]);
277 if($_GET[
"back_url"])
279 $ilCtrl->setParameterByClass($gui,
"back_url", rawurlencode($_GET[
"back_url"]));
281 $ilCtrl->redirectByClass($gui,
"preview");
284 exit(
"invalid object type");
292 $lng->loadLanguageModule(
"wsp");
294 $tpl->setTitle($lng->txt(
"wsp_password_protected_resource"));
295 $tpl->setDescription($lng->txt(
"wsp_password_protected_resource_info"));
302 $tpl->setContent($form->getHTML());
311 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
319 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
321 $form->setFormAction($ilCtrl->getFormAction($this,
"checkPassword"));
322 $form->setTitle($lng->txt(
"wsp_password_for").
": ".$object_data[
"title"]);
326 $password->setRequired(
true);
327 $password->setSkipSyntaxCheck(
true);
328 $form->addItem($password);
330 $form->addCommandButton(
"checkPassword", $lng->txt(
"submit"));
332 if($ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID)
334 $ilTabs->setBackTarget($lng->txt(
"back"), $ilCtrl->getLinkTarget($this,
"cancelPassword"));
335 $form->addCommandButton(
"cancelPassword", $lng->txt(
"cancel"));
345 if($ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID)
349 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
350 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
353 ilUtil::redirect(
"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace&dsh=".$owner);
357 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
359 $owner = $prtf->getOwner();
360 ilUtil::redirect(
"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio&dsh=".$owner);
369 $lng->loadLanguageModule(
"wsp");
372 if($form->checkInput())
374 $input = md5($form->getInput(
"password"));
377 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
382 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
385 if($input == $password)
400 $item = $form->getItemByPostVar(
"password");
401 $item->setAlert($lng->txt(
"wsp_invalid_password"));
406 $form->setValuesByPost();
static getSharedNodePassword($a_node_id)
const PERMISSION_ALL_PASSWORD
Class ilObjLinkResourceGUI.
Access handler for personal workspace.
static _lookupTitle($a_id)
lookup object title
Workspace deep link handler GUI.
static getSharedNodePassword($a_node_id)
Tree handler for personal workspace.
static _getPermissions($a_node_id)
Get all permissions to node.
static keepSharedSessionPassword($a_node_id, $a_password)
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false)
Default behaviour is:
Portfolio view gui class.
GUI class for exercise verification.
const PORTFOLIO_OBJECT_ID
static getObjectDataFromNode($a_node_id)
static hasAccess($a_node_id, $a_is_portfolio=false)
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static keepSharedSessionPassword($a_node_id, $a_password)
GUI class for test verification.
GUI class for file objects.
Access handler for portfolio.
static _getPermissions($a_node_id)
Get all permissions to node.
static redirect($a_script)
http redirect to other script
lookupOwner($a_node_id)
Get owner for node id.
redirectToResource($a_node_id, $a_is_portfolio=false)