57 bool $a_is_portfolio =
false,
62 $this->
tabs = $DIC->tabs();
63 $this->tpl = $DIC->ui()->mainTemplate();
64 $this->
toolbar = $DIC->toolbar();
65 $this->
user = $DIC->user();
67 $ilCtrl = $DIC->ctrl();
68 $lng = $DIC->language();
70 $this->
ctrl = $ilCtrl;
72 $this->node_id = $a_node_id;
73 $this->access_handler = $a_access_handler;
74 $this->is_portfolio = $a_is_portfolio;
85 $this->blocking_message = $a_val;
97 $next_class = $this->
ctrl->getNextClass($this);
98 $cmd = $this->
ctrl->getCmd();
100 switch ($next_class) {
101 case "ilmailsearchcoursesgui":
102 $ilTabs->setBackTarget(
103 $this->
lng->txt(
"back"),
104 $this->
ctrl->getLinkTarget($this,
"share")
107 $this->
ctrl->setReturn($this,
'share');
108 $this->
ctrl->forwardCommand($csearch);
113 case "ilmailsearchgroupsgui":
114 $ilTabs->setBackTarget(
115 $this->
lng->txt(
"back"),
116 $this->
ctrl->getLinkTarget($this,
"share")
119 $this->
ctrl->setReturn($this,
'share');
120 $this->
ctrl->forwardCommand($gsearch);
125 case "ilmailsearchgui":
126 $ilTabs->setBackTarget(
127 $this->
lng->txt(
"back"),
128 $this->
ctrl->getLinkTarget($this,
"share")
131 $this->
ctrl->setReturn($this,
'share');
132 $this->
ctrl->forwardCommand($usearch);
137 case "ilsingleusersharegui":
138 $ilTabs->setBackTarget(
139 $this->
lng->txt(
"back"),
140 $this->
ctrl->getLinkTarget($this,
"share")
143 $this->
ctrl->setReturn($this,
'share');
144 $this->
ctrl->forwardCommand($ushare);
149 case "ilpublicuserprofilegui":
150 $ilTabs->clearTargets();
151 $ilTabs->setBackTarget(
152 $this->
lng->txt(
"back"),
153 $this->
ctrl->getLinkTarget($this,
"share")
157 $this->std_request->getUser()
178 if (!$this->is_portfolio) {
179 $obj_id = $this->access_handler->getTree()->lookupObjectId($this->node_id);
209 $options[
"user"] = $this->
lng->txt(
"wsp_set_permission_single_user");
212 if (
sizeof($grp_ids)) {
213 $options[
"group"] = $this->
lng->txt(
"wsp_set_permission_group");
217 if (
sizeof($crs_ids)) {
218 $options[
"course"] = $this->
lng->txt(
"wsp_set_permission_course");
222 $options[
"registered"] = $this->
lng->txt(
"wsp_set_permission_registered");
225 if (
$ilSetting->get(
"enable_global_profiles")) {
226 if (!$this->
getAccessHandler()->hasGlobalPasswordPermission($this->node_id)) {
227 $options[
"password"] = $this->
lng->txt(
"wsp_set_permission_all_password");
231 $options[
"all"] = $this->
lng->txt(
"wsp_set_permission_all");
236 $actions->setOptions($options);
237 $ilToolbar->addStickyItem($actions);
239 $ilToolbar->setFormAction($this->
ctrl->getFormAction($this));
242 $button->setCaption(
"add");
243 $button->setCommand(
"addpermissionhandler");
244 $ilToolbar->addStickyItem($button);
252 switch ($this->std_request->getAction()) {
256 $this->
ctrl->redirectByClass(
"ilsingleusersharegui");
258 $this->
ctrl->setParameterByClass(
"ilmailsearchgui",
"ref",
"wsp");
259 $this->
ctrl->redirectByClass(
"ilmailsearchgui");
264 $this->
ctrl->setParameterByClass(
"ilmailsearchgroupsgui",
"ref",
"wsp");
265 $this->
ctrl->redirectByClass(
"ilmailsearchgroupsgui");
269 $this->
ctrl->setParameterByClass(
"ilmailsearchcoursesgui",
"ref",
"wsp");
270 $this->
ctrl->redirectByClass(
"ilmailsearchcoursesgui");
274 $this->
getAccessHandler()->addPermission($this->node_id, self::PERMISSION_REGISTERED);
275 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"wsp_permission_registered_info"),
true);
276 $this->
ctrl->redirect($this,
"share");
284 $this->
getAccessHandler()->addPermission($this->node_id, self::PERMISSION_ALL);
285 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"wsp_permission_all_info"),
true);
286 $this->
ctrl->redirect($this,
"share");
292 $obj_id = $this->std_request->getObjId();
295 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"wsp_permission_removed"),
true);
298 $this->
ctrl->redirect($this,
"share");
304 $form->setFormAction($this->
ctrl->getFormAction($this));
305 $form->setTitle($this->
lng->txt(
"wsp_set_permission_all_password"));
309 $form->addItem($password);
311 $form->addCommandButton(
'savepasswordform', $this->
lng->txt(
"save"));
312 $form->addCommandButton(
'share', $this->
lng->txt(
"cancel"));
330 if ($form->checkInput()) {
333 self::PERMISSION_ALL_PASSWORD,
334 md5($form->getInput(
"password"))
336 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"wsp_permission_all_pw_info"),
true);
337 $this->
ctrl->redirect($this,
"share");
340 $form->setValuesByPost();
StandardGUIRequest $std_request
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const PERMISSION_ALL_PASSWORD
__construct(int $a_node_id, $a_access_handler, bool $a_is_portfolio=false, string $a_footer="")
const PERMISSION_REGISTERED
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
setContent(string $a_html)
Sets content for standard template.
setBackUrl(string $a_backurl)
Set Back Link URL.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setBlockingMessage(string $a_val)
ilGlobalTemplateInterface $tpl
showPasswordForm(ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getMembershipByType(int $a_usr_id, array $a_type, bool $a_only_member_role=false)
get membership by type Get course or group membership
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...