34 protected \ILIAS\PersonalWorkspace\InternalGUIService
$gui;
53 bool $a_is_portfolio =
false,
58 $this->
tabs = $DIC->tabs();
59 $this->tpl =
$DIC->ui()->mainTemplate();
60 $this->
toolbar = $DIC->toolbar();
61 $this->
user = $DIC->user();
63 $ilCtrl =
$DIC->ctrl();
66 $this->
ctrl = $ilCtrl;
68 $this->node_id = $a_node_id;
69 $this->access_handler = $a_access_handler;
70 $this->is_portfolio = $a_is_portfolio;
71 $this->footer = $a_footer;
76 $this->gui =
$DIC->personalWorkspace()->internal()->gui();
82 $this->blocking_message = $a_val;
94 $next_class = $this->
ctrl->getNextClass($this);
95 $cmd = $this->
ctrl->getCmd();
97 switch ($next_class) {
98 case "ilmailsearchcoursesgui":
99 $ilTabs->setBackTarget(
100 $this->
lng->txt(
"back"),
101 $this->ctrl->getLinkTarget($this,
"share")
104 $this->
ctrl->setReturn($this,
'share');
105 $this->
ctrl->forwardCommand($csearch);
110 case "ilmailsearchgroupsgui":
111 $ilTabs->setBackTarget(
112 $this->
lng->txt(
"back"),
113 $this->ctrl->getLinkTarget($this,
"share")
116 $this->
ctrl->setReturn($this,
'share');
117 $this->
ctrl->forwardCommand($gsearch);
122 case "ilmailsearchgui":
123 $ilTabs->setBackTarget(
124 $this->
lng->txt(
"back"),
125 $this->ctrl->getLinkTarget($this,
"share")
128 $this->
ctrl->setReturn($this,
'share');
129 $this->
ctrl->forwardCommand($usearch);
134 case "ilsingleusersharegui":
135 $ilTabs->setBackTarget(
136 $this->
lng->txt(
"back"),
137 $this->ctrl->getLinkTarget($this,
"share")
140 $this->
ctrl->setReturn($this,
'share');
141 $this->
ctrl->forwardCommand($ushare);
146 case strtolower(PublicProfileGUI::class):
147 $ilTabs->clearTargets();
148 $ilTabs->setBackTarget(
149 $this->
lng->txt(
"back"),
150 $this->ctrl->getLinkTarget($this,
"share")
154 $this->std_request->getUser()
156 $prof->setBackUrl($this->
ctrl->getLinkTarget($this,
"share"));
175 if (!$this->is_portfolio) {
176 $obj_id = $this->access_handler->getTree()->lookupObjectId($this->node_id);
203 $options[
"user"] = $this->
lng->txt(
"wsp_set_permission_single_user");
206 if (
sizeof($grp_ids)) {
207 $options[
"group"] = $this->
lng->txt(
"wsp_set_permission_group");
211 if (
sizeof($crs_ids)) {
212 $options[
"course"] = $this->
lng->txt(
"wsp_set_permission_course");
216 $options[
"registered"] = $this->
lng->txt(
"wsp_set_permission_registered");
219 if (
$ilSetting->get(
"enable_global_profiles")) {
220 if (!$this->
getAccessHandler()->hasGlobalPasswordPermission($this->node_id)) {
221 $options[
"password"] = $this->
lng->txt(
"wsp_set_permission_all_password");
225 $options[
"all"] = $this->
lng->txt(
"wsp_set_permission_all");
231 $ilToolbar->addStickyItem($actions);
233 $ilToolbar->setFormAction($this->
ctrl->getFormAction($this));
236 $this->
lng->txt(
"add"),
237 "addpermissionhandler"
238 )->submit()->toToolbar(
true);
241 $tpl->
setContent($table->getHTML() . $this->footer);
246 switch ($this->std_request->getAction()) {
250 $this->
ctrl->redirectByClass(
"ilsingleusersharegui");
252 $this->
ctrl->setParameterByClass(
"ilmailsearchgui",
"ref",
"wsp");
253 $this->
ctrl->redirectByClass(
"ilmailsearchgui");
258 $this->
ctrl->setParameterByClass(
"ilmailsearchgroupsgui",
"ref",
"wsp");
259 $this->
ctrl->redirectByClass(
"ilmailsearchgroupsgui");
263 $this->
ctrl->setParameterByClass(
"ilmailsearchcoursesgui",
"ref",
"wsp");
264 $this->
ctrl->redirectByClass(
"ilmailsearchcoursesgui");
268 $this->
getAccessHandler()->addMissingPermissionForObjects($this->node_id, [self::PERMISSION_REGISTERED]);
269 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"wsp_share_success"),
true);
270 $this->
ctrl->redirect($this,
"share");
278 $this->
getAccessHandler()->addMissingPermissionForObjects($this->node_id, [self::PERMISSION_ALL]);
279 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"wsp_permission_all_info"),
true);
280 $this->
ctrl->redirect($this,
"share");
286 $obj_id = $this->std_request->getObjId();
289 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"wsp_permission_removed"),
true);
292 $this->
ctrl->redirect($this,
"share");
298 $form->setFormAction($this->
ctrl->getFormAction($this));
299 $form->setTitle($this->
lng->txt(
"wsp_set_permission_all_password"));
302 $password->setRequired(
true);
303 $form->addItem($password);
305 $form->addCommandButton(
'savepasswordform', $this->
lng->txt(
"save"));
306 $form->addCommandButton(
'share', $this->
lng->txt(
"cancel"));
324 if ($form->checkInput()) {
327 self::PERMISSION_ALL_PASSWORD,
328 md5($form->getInput(
"password"))
330 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"wsp_permission_all_pw_info"),
true);
331 $this->
ctrl->redirect($this,
"share");
334 $form->setValuesByPost();
GUI class for public user profile presentation.
Class ilCtrl provides processing control methods.
static _lookupTitle(int $obj_id)
static _getMembershipByType(int $a_usr_id, array $a_type, bool $a_only_member_role=false)
get membership by type Get course or group membership
Access handler for portfolio NOTE: This file needs to stay in the classes directory,...
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...
showPasswordForm(?ilPropertyFormGUI $a_form=null)
const PERMISSION_REGISTERED
__construct(int $a_node_id, ilPortfolioAccessHandler|ilWorkspaceAccessHandler $a_access_handler, bool $a_is_portfolio=false, string $a_footer="")
setBlockingMessage(string $a_val)
StandardGUIRequest $std_request
ILIAS PersonalWorkspace InternalGUIService $gui
ilPortfolioAccessHandler ilWorkspaceAccessHandler $access_handler
ilGlobalTemplateInterface $tpl
const PERMISSION_ALL_PASSWORD
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...
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setContent(string $a_html)
Sets content for standard template.