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 374 of file class.ilSharedResourceGUI.php.
References $ilUser, $user, ilWorkspaceTree\lookupOwner(), and ilUtil\redirect().
379 if ($this->node_id) {
380 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
381 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
384 ilUtil::redirect(
"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace&dsh=" . $owner);
386 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
388 $owner = $prtf->getOwner();
389 ilUtil::redirect(
"ilias.php?baseClass=ilDashboardGUI&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 394 of file class.ilSharedResourceGUI.php.
References $db, $ilDB, $lng, $password, ilWorkspaceAccessHandler\getSharedNodePassword(), ilPortfolioAccessHandler\getSharedNodePassword(), initPasswordForm(), ilWorkspaceAccessHandler\keepSharedSessionPassword(), ilPortfolioAccessHandler\keepSharedSessionPassword(), passwordForm(), redirectToResource(), and ilUtil\sendFailure().
399 $lng->loadLanguageModule(
"wsp");
402 if ($form->checkInput()) {
403 $input = md5($form->getInput(
"password"));
404 if ($this->node_id) {
405 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
408 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
412 if ($this->node_id) {
420 $item = $form->getItemByPostVar(
"password");
421 $item->setAlert(
$lng->txt(
"wsp_invalid_password"));
426 $form->setValuesByPost();
static getSharedNodePassword($a_node_id)
static getSharedNodePassword($a_node_id)
static keepSharedSessionPassword($a_node_id, $a_password)
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(), ilUserUtil\getNamePresentation(), ilObject2GUI\PORTFOLIO_OBJECT_ID, and ilObject2GUI\WORKSPACE_NODE_ID.
97 $next_class =
$ilCtrl->getNextClass($this);
100 $tpl->loadStandardTemplate();
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(
"ildashboardgui",
"dsh", $owner_id);
121 $link =
$ilCtrl->getLinkTargetByClass(
"ildashboardgui",
"jumptoworkspace");
122 $ilLocator->addItem(
$lng->txt(
"wsp_tab_shared"), $link);
124 include_once
"Services/User/classes/class.ilUserUtil.php";
127 $link =
$ilCtrl->getLinkTargetByClass(
"ildashboardgui",
"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) {
139 $ilCtrl->forwardCommand($bgui);
144 $ilCtrl->forwardCommand($fgui);
147 case "ilobjtestverificationgui":
149 $ilCtrl->forwardCommand($tgui);
152 case "ilobjexerciseverificationgui":
154 $ilCtrl->forwardCommand($egui);
157 case "ilobjlinkresourcegui":
158 include_once
"Modules/WebResource/classes/class.ilObjLinkResourceGUI.php";
160 $ilCtrl->forwardCommand($lgui);
163 case "ilobjportfoliogui":
164 include_once
"Modules/Portfolio/classes/class.ilObjPortfolioGUI.php";
166 $ilCtrl->forwardCommand($pgui);
176 $tpl->printToStdout();
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:
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 199 of file class.ilSharedResourceGUI.php.
References $access_handler, $DIC, $ilSetting, $ilUser, ilPortfolioAccessHandler\_getPermissions(), ilWorkspaceAccessHandler\_getPermissions(), ilWorkspaceAccessGUI\PERMISSION_ALL, ilWorkspaceAccessGUI\PERMISSION_ALL_PASSWORD, and ilUtil\redirect().
Referenced by ilObjPortfolioAccess\_checkGoto(), ilObjCmiXapiVerificationAccess\_checkGoto(), ilObjLTIConsumerVerificationAccess\_checkGoto(), ilObjExerciseVerificationAccess\_checkGoto(), ilObjTestVerificationAccess\_checkGoto(), ilObjSCORMVerificationAccess\_checkGoto(), ilObjCourseVerificationAccess\_checkGoto(), ilObjBlogAccess\_checkGoto(), and ilObjFileAccess\_checkGoto().
207 if (
$ilUser->getId() != ANONYMOUS_USER_ID) {
208 if (!$a_is_portfolio) {
209 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
210 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
214 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
223 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php";
225 if (!$a_is_portfolio) {
226 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
235 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
237 if (!$prtf->isOnline()) {
241 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
252 if (!$a_is_portfolio) {
253 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&wsp_id=" . $a_node_id);
255 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 339 of file class.ilSharedResourceGUI.php.
References $ctrl, $ilCtrl, $ilUser, $lng, $password, $tabs, $user, ilObject\_lookupTitle(), and ilWorkspaceAccessHandler\getObjectDataFromNode().
Referenced by checkPassword(), and passwordForm().
346 if ($this->node_id) {
347 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
353 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
355 $form->setFormAction(
$ilCtrl->getFormAction($this,
"checkPassword"));
356 $form->setTitle(
$lng->txt(
"wsp_password_for") .
": " . $object_data[
"title"]);
364 $form->addCommandButton(
"checkPassword",
$lng->txt(
"submit"));
367 $ilTabs->setBackTarget(
$lng->txt(
"back"),
$ilCtrl->getLinkTarget($this,
"cancelPassword"));
368 $form->addCommandButton(
"cancelPassword",
$lng->txt(
"cancel"));
static _lookupTitle($a_id)
lookup object title
static getObjectDataFromNode($a_node_id)
◆ passwordForm()
ilSharedResourceGUI::passwordForm |
( |
|
$form = null | ) |
|
|
protected |
◆ process()
ilSharedResourceGUI::process |
( |
| ) |
|
|
protected |
Definition at line 179 of file class.ilSharedResourceGUI.php.
References exit, and redirectToResource().
181 if (!$this->node_id && !$this->portfolio_id) {
182 exit(
"invalid call");
186 if ($this->node_id) {
187 if (!self::hasAccess($this->node_id)) {
188 exit(
"no permission");
192 if (!self::hasAccess($this->portfolio_id,
true)) {
193 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 262 of file class.ilSharedResourceGUI.php.
References $_GET, $ctrl, $ilCtrl, $obj_definition, ilObject\_lookupType(), exit, and ilWorkspaceAccessHandler\getObjectDataFromNode().
Referenced by checkPassword(), and process().
267 if (!$a_is_portfolio) {
268 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
270 if (!$object_data[
"obj_id"]) {
271 exit(
"invalid object");
275 exit(
"invalid object");
277 $object_data[
"obj_id"] = $a_node_id;
278 $object_data[
"type"] =
"prtf";
281 $class = $objDefinition->getClassName($object_data[
"type"]);
282 $gui =
"ilobj" . $class .
"gui";
284 switch ($object_data[
"type"]) {
286 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
287 $ilCtrl->setParameterByClass($gui,
"gtp", (
int)
$_GET[
"gtp"]);
288 $ilCtrl->setParameterByClass($gui,
"edt", $_GET[
"edt"]);
289 $ilCtrl->redirectByClass($gui,
"preview");
298 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
299 $ilCtrl->redirectByClass($gui,
"deliver");
304 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
305 $ilCtrl->redirectByClass($gui);
309 $ilCtrl->setParameterByClass($gui,
"prt_id", $a_node_id);
310 $ilCtrl->setParameterByClass($gui,
"gtp", (
int) $_GET[
"gtp"]);
311 if ($_GET[
"back_url"]) {
312 $ilCtrl->setParameterByClass($gui,
"back_url", rawurlencode($_GET[
"back_url"]));
314 $ilCtrl->redirectByClass($gui,
"preview");
318 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: