Workspace deep link handler GUI.
More...
|
static | hasAccess ($a_node_id, $a_is_portfolio=false) |
|
◆ __construct()
ilSharedResourceGUI::__construct |
( |
| ) |
|
Definition at line 67 of file class.ilSharedResourceGUI.php.
References $_GET, $DIC, $ilCtrl, and user().
71 $this->ctrl = $DIC->ctrl();
72 $this->tpl = $DIC[
"tpl"];
73 $this->main_menu = $DIC[
"ilMainMenu"];
74 $this->locator = $DIC[
"ilLocator"];
75 $this->
user = $DIC->user();
76 $this->lng = $DIC->language();
77 $this->obj_definition = $DIC[
"objDefinition"];
78 $this->tabs = $DIC->tabs();
79 $this->db = $DIC->database();
82 $ilCtrl->saveParameter($this,
"wsp_id");
83 $ilCtrl->saveParameter($this,
"prt_id");
84 $this->node_id = (int)
$_GET[
"wsp_id"];
85 $this->portfolio_id = (int)
$_GET[
"prt_id"];
◆ cancelPassword()
ilSharedResourceGUI::cancelPassword |
( |
| ) |
|
|
protected |
Definition at line 375 of file class.ilSharedResourceGUI.php.
References $ilUser, $user, ilWorkspaceTree\lookupOwner(), and ilUtil\redirect().
380 if ($this->node_id) {
381 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
382 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
385 ilUtil::redirect(
"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace&dsh=" . $owner);
387 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
389 $owner = $prtf->getOwner();
390 ilUtil::redirect(
"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio&dsh=" . $owner);
Tree handler for personal workspace.
static redirect($a_script)
lookupOwner($a_node_id)
Get owner for node id.
◆ checkPassword()
ilSharedResourceGUI::checkPassword |
( |
| ) |
|
|
protected |
Definition at line 395 of file class.ilSharedResourceGUI.php.
References $db, $form, $ilDB, $lng, $password, ilWorkspaceAccessHandler\getSharedNodePassword(), ilPortfolioAccessHandler\getSharedNodePassword(), initPasswordForm(), ilWorkspaceAccessHandler\keepSharedSessionPassword(), ilPortfolioAccessHandler\keepSharedSessionPassword(), passwordForm(), redirectToResource(), and ilUtil\sendFailure().
400 $lng->loadLanguageModule(
"wsp");
403 if (
$form->checkInput()) {
404 $input = md5(
$form->getInput(
"password"));
405 if ($this->node_id) {
406 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
409 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
413 if ($this->node_id) {
421 $item =
$form->getItemByPostVar(
"password");
422 $item->setAlert(
$lng->txt(
"wsp_invalid_password"));
427 $form->setValuesByPost();
static getSharedNodePassword($a_node_id)
static getSharedNodePassword($a_node_id)
static keepSharedSessionPassword($a_node_id, $a_password)
if(isset($_POST['submit'])) $form
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static keepSharedSessionPassword($a_node_id, $a_password)
redirectToResource($a_node_id, $a_is_portfolio=false)
◆ executeCommand()
ilSharedResourceGUI::executeCommand |
( |
| ) |
|
Definition at line 88 of file class.ilSharedResourceGUI.php.
References $access_handler, $ctrl, $ilCtrl, $ilUser, $lng, $locator, $main_menu, $tpl, $user, ilObject\_lookupTitle(), array, ilUserUtil\getNamePresentation(), ilObject2GUI\PORTFOLIO_OBJECT_ID, and ilObject2GUI\WORKSPACE_NODE_ID.
97 $next_class =
$ilCtrl->getNextClass($this);
100 $tpl->getStandardTemplate();
103 $ilMainMenu->setActive(
"desktop");
106 if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
108 !in_array($next_class,
array(
"ilobjbloggui",
"ilobjportfoliogui"))) {
109 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
110 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
113 $owner_id = $tree->lookupOwner($this->node_id);
114 $obj_id = $tree->lookupObjectId($this->node_id);
116 $lng->loadLanguageModule(
"wsp");
119 if ($owner_id !=
$ilUser->getId()) {
120 $ilCtrl->setParameterByClass(
"ilpersonaldesktopgui",
"dsh", $owner_id);
121 $link =
$ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"jumptoworkspace");
122 $ilLocator->addItem(
$lng->txt(
"wsp_tab_shared"), $link);
124 include_once
"Services/User/classes/class.ilUserUtil.php";
127 $link =
$ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"jumptoworkspace");
128 $ilLocator->addItem(
$lng->txt(
"wsp_tab_personal"), $link);
131 $link = $access_handler->getGotoLink($this->node_id, $obj_id);
133 $tpl->setLocator($ilLocator);
136 switch ($next_class) {
138 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
140 $ilCtrl->forwardCommand($bgui);
144 include_once
"Modules/File/classes/class.ilObjFileGUI.php";
146 $ilCtrl->forwardCommand($fgui);
149 case "ilobjtestverificationgui":
150 include_once
"Modules/Test/classes/class.ilObjTestVerificationGUI.php";
152 $ilCtrl->forwardCommand($tgui);
155 case "ilobjexerciseverificationgui":
156 include_once
"Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
158 $ilCtrl->forwardCommand($egui);
161 case "ilobjlinkresourcegui":
162 include_once
"Modules/WebResource/classes/class.ilObjLinkResourceGUI.php";
164 $ilCtrl->forwardCommand($lgui);
167 case "ilobjportfoliogui":
168 include_once
"Modules/Portfolio/classes/class.ilObjPortfolioGUI.php";
170 $ilCtrl->forwardCommand($pgui);
Class ilObjLinkResourceGUI.
Access handler for personal workspace.
static _lookupTitle($a_id)
lookup object title
Tree handler for personal workspace.
Portfolio view gui class.
GUI class for exercise verification.
const PORTFOLIO_OBJECT_ID
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, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
Create styles array
The data for the language used.
GUI class for test verification.
GUI class for file objects.
◆ hasAccess()
static ilSharedResourceGUI::hasAccess |
( |
|
$a_node_id, |
|
|
|
$a_is_portfolio = false |
|
) |
| |
|
static |
Definition at line 203 of file class.ilSharedResourceGUI.php.
References $access_handler, $DIC, $ilSetting, $ilUser, ilWorkspaceAccessHandler\_getPermissions(), ilPortfolioAccessHandler\_getPermissions(), ilWorkspaceAccessGUI\PERMISSION_ALL, ilWorkspaceAccessGUI\PERMISSION_ALL_PASSWORD, and ilUtil\redirect().
Referenced by ilObjPortfolioAccess\_checkGoto(), ilObjTestVerificationAccess\_checkGoto(), ilObjCourseVerificationAccess\_checkGoto(), ilObjSCORMVerificationAccess\_checkGoto(), ilObjExerciseVerificationAccess\_checkGoto(), ilObjBlogAccess\_checkGoto(), and ilObjFileAccess\_checkGoto().
211 if (
$ilUser->getId() != ANONYMOUS_USER_ID) {
212 if (!$a_is_portfolio) {
213 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
214 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
218 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
227 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php";
229 if (!$a_is_portfolio) {
230 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
239 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
241 if (!$prtf->isOnline()) {
245 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
256 if (!$a_is_portfolio) {
257 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&wsp_id=" . $a_node_id);
259 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&prt_id=" . $a_node_id);
const PERMISSION_ALL_PASSWORD
Access handler for personal workspace.
Tree handler for personal workspace.
static _getPermissions($a_node_id)
Get all permissions to node.
Access handler for portfolio.
static _getPermissions($a_node_id)
Get all permissions to node.
static redirect($a_script)
◆ initPasswordForm()
ilSharedResourceGUI::initPasswordForm |
( |
| ) |
|
|
protected |
Definition at line 340 of file class.ilSharedResourceGUI.php.
References $ctrl, $form, $ilCtrl, $ilUser, $lng, $password, $tabs, $user, ilObject\_lookupTitle(), and ilWorkspaceAccessHandler\getObjectDataFromNode().
Referenced by checkPassword(), and passwordForm().
347 if ($this->node_id) {
348 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
354 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
356 $form->setFormAction(
$ilCtrl->getFormAction($this,
"checkPassword"));
357 $form->setTitle(
$lng->txt(
"wsp_password_for") .
": " . $object_data[
"title"]);
365 $form->addCommandButton(
"checkPassword",
$lng->txt(
"submit"));
368 $ilTabs->setBackTarget(
$lng->txt(
"back"),
$ilCtrl->getLinkTarget($this,
"cancelPassword"));
369 $form->addCommandButton(
"cancelPassword",
$lng->txt(
"cancel"));
static _lookupTitle($a_id)
lookup object title
if(isset($_POST['submit'])) $form
static getObjectDataFromNode($a_node_id)
◆ passwordForm()
ilSharedResourceGUI::passwordForm |
( |
|
$form = null | ) |
|
|
protected |
◆ process()
ilSharedResourceGUI::process |
( |
| ) |
|
|
protected |
Definition at line 183 of file class.ilSharedResourceGUI.php.
References exit, and redirectToResource().
185 if (!$this->node_id && !$this->portfolio_id) {
186 exit(
"invalid call");
190 if ($this->node_id) {
191 if (!self::hasAccess($this->node_id)) {
192 exit(
"no permission");
196 if (!self::hasAccess($this->portfolio_id,
true)) {
197 exit(
"no permission");
redirectToResource($a_node_id, $a_is_portfolio=false)
◆ redirectToResource()
ilSharedResourceGUI::redirectToResource |
( |
|
$a_node_id, |
|
|
|
$a_is_portfolio = false |
|
) |
| |
|
protected |
Definition at line 266 of file class.ilSharedResourceGUI.php.
References $_GET, $ctrl, $ilCtrl, $obj_definition, ilObject\_lookupType(), exit, and ilWorkspaceAccessHandler\getObjectDataFromNode().
Referenced by checkPassword(), and process().
271 if (!$a_is_portfolio) {
272 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
274 if (!$object_data[
"obj_id"]) {
275 exit(
"invalid object");
279 exit(
"invalid object");
281 $object_data[
"obj_id"] = $a_node_id;
282 $object_data[
"type"] =
"prtf";
285 $class = $objDefinition->getClassName($object_data[
"type"]);
286 $gui =
"ilobj" . $class .
"gui";
288 switch ($object_data[
"type"]) {
290 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
291 $ilCtrl->setParameterByClass($gui,
"gtp", (
int)
$_GET[
"gtp"]);
292 $ilCtrl->redirectByClass($gui,
"preview");
299 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
300 $ilCtrl->redirectByClass($gui,
"deliver");
305 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
306 $ilCtrl->redirectByClass($gui);
310 $ilCtrl->setParameterByClass($gui,
"prt_id", $a_node_id);
311 $ilCtrl->setParameterByClass($gui,
"gtp", (
int) $_GET[
"gtp"]);
312 if ($_GET[
"back_url"]) {
313 $ilCtrl->setParameterByClass($gui,
"back_url", rawurlencode($_GET[
"back_url"]));
315 $ilCtrl->redirectByClass($gui,
"preview");
319 exit(
"invalid object type");
static getObjectDataFromNode($a_node_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
◆ $access_handler
ilSharedResourceGUI::$access_handler |
|
protected |
◆ $ctrl
ilSharedResourceGUI::$ctrl |
|
protected |
◆ $db
◆ $lng
ilSharedResourceGUI::$lng |
|
protected |
◆ $locator
ilSharedResourceGUI::$locator |
|
protected |
◆ $main_menu
ilSharedResourceGUI::$main_menu |
|
protected |
◆ $node_id
ilSharedResourceGUI::$node_id |
|
protected |
◆ $obj_definition
ilSharedResourceGUI::$obj_definition |
|
protected |
◆ $portfolio_id
ilSharedResourceGUI::$portfolio_id |
|
protected |
◆ $tabs
ilSharedResourceGUI::$tabs |
|
protected |
◆ $tpl
ilSharedResourceGUI::$tpl |
|
protected |
◆ $user
ilSharedResourceGUI::$user |
|
protected |
The documentation for this class was generated from the following file: