46 $this->
ctrl = $DIC->ctrl();
47 $this->tpl =
$DIC->ui()->mainTemplate();
48 $this->
locator = $DIC[
"ilLocator"];
49 $this->
user = $DIC->user();
50 $this->
lng = $DIC->language();
51 $this->obj_definition =
$DIC[
"objDefinition"];
52 $this->
tabs = $DIC->tabs();
53 $ilCtrl =
$DIC->ctrl();
60 $ilCtrl->saveParameter($this,
"wsp_id");
61 $ilCtrl->saveParameter($this,
"prt_id");
62 $this->node_id = $this->request->getWspId();
63 $this->portfolio_id = $this->request->getPrtId();
74 $next_class = $ilCtrl->getNextClass($this);
75 $cmd = $ilCtrl->getCmd();
82 !in_array($next_class, array(
"ilobjbloggui",
"ilobjportfoliogui"))) {
85 $owner_id = $tree->lookupOwner($this->node_id);
86 $obj_id = $tree->lookupObjectId($this->node_id);
91 if ($owner_id != $ilUser->getId()) {
92 $ilCtrl->setParameterByClass(
"ildashboardgui",
"dsh", $owner_id);
93 $link = $ilCtrl->getLinkTargetByClass(
"ildashboardgui",
"jumptoworkspace");
94 $ilLocator->addItem(
$lng->
txt(
"wsp_tab_shared"), $link);
98 $link = $ilCtrl->getLinkTargetByClass(
"ildashboardgui",
"jumptoworkspace");
99 $ilLocator->addItem(
$lng->
txt(
"wsp_tab_personal"), $link);
102 $link = $access_handler->getGotoLink($this->node_id, $obj_id);
107 switch ($next_class) {
110 $ilCtrl->forwardCommand($bgui);
115 $ilCtrl->forwardCommand($fgui);
118 case "ilobjtestverificationgui":
120 $ilCtrl->forwardCommand($tgui);
123 case "ilobjexerciseverificationgui":
125 $ilCtrl->forwardCommand($egui);
128 case "ilobjlinkresourcegui":
130 $ilCtrl->forwardCommand($lgui);
133 case "ilobjportfoliogui":
135 $ilCtrl->forwardCommand($pgui);
150 if (!$this->node_id && !$this->portfolio_id) {
155 if ($this->node_id) {
156 if (!self::hasAccess($this->node_id)) {
161 if (!self::hasAccess($this->portfolio_id,
true)) {
170 bool $a_is_portfolio =
false
173 $ilUser =
$DIC->user();
178 if (!$a_is_portfolio) {
184 if ($access_handler->checkAccess(
"read",
"", $a_node_id)) {
189 if (!$a_is_portfolio) {
212 if (!$a_is_portfolio) {
213 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&wsp_id=" . $a_node_id);
215 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&prt_id=" . $a_node_id);
224 bool $a_is_portfolio =
false
226 $ilCtrl = $this->
ctrl;
227 $objDefinition = $this->obj_definition;
229 if (!$a_is_portfolio) {
231 if (!$object_data[
"obj_id"]) {
238 $object_data[
"obj_id"] = $a_node_id;
239 $object_data[
"type"] =
"prtf";
242 $class = $objDefinition->getClassName($object_data[
"type"]);
243 $gui =
"ilobj" . $class .
"gui";
245 switch ($object_data[
"type"]) {
247 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
248 $ilCtrl->setParameterByClass($gui,
"gtp", $this->request->getBlogGtp());
249 $ilCtrl->setParameterByClass($gui,
"edt", $this->request->getBlogEdt());
250 $ilCtrl->redirectByClass($gui,
"preview");
259 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
260 $ilCtrl->redirectByClass($gui,
"deliver");
265 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
266 $ilCtrl->redirectByClass($gui);
270 $ilCtrl->setParameterByClass($gui,
"prt_id", $a_node_id);
271 $ilCtrl->setParameterByClass($gui,
"gtp", $this->request->getBlogGtp());
272 if ($this->request->getBackUrl()) {
273 $ilCtrl->setParameterByClass($gui,
"back_url", rawurlencode($this->request->getBackUrl()));
275 $ilCtrl->redirectByClass($gui,
"preview");
279 exit(
"invalid object type");
288 $lng->loadLanguageModule(
"wsp");
290 $tpl->
setTitle(
$lng->txt(
"wsp_password_protected_resource"));
294 $form = $this->initPasswordForm();
302 $ilCtrl = $this->ctrl;
304 $ilUser = $this->user;
305 $ilTabs = $this->tabs;
307 if ($this->node_id) {
314 $form->setFormAction($ilCtrl->getFormAction($this,
"checkPassword"));
315 $form->setTitle(
$lng->txt(
"wsp_password_for") .
": " . $object_data[
"title"]);
318 $password->setRetype(
false);
319 $password->setRequired(
true);
320 $password->setSkipSyntaxCheck(
true);
321 $form->addItem($password);
323 $form->addCommandButton(
"checkPassword",
$lng->txt(
"submit"));
326 $ilTabs->setBackTarget(
$lng->txt(
"back"), $ilCtrl->getLinkTarget($this,
"cancelPassword"));
327 $form->addCommandButton(
"cancelPassword",
$lng->txt(
"cancel"));
335 $ilUser = $this->user;
338 if ($this->node_id) {
340 $owner = $tree->lookupOwner($this->node_id);
341 ilUtil::redirect(
"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace&dsh=" . $owner);
344 $owner = $prtf->getOwner();
345 ilUtil::redirect(
"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToPortfolio&dsh=" . $owner);
354 $lng->loadLanguageModule(
"wsp");
356 $form = $this->initPasswordForm();
357 if ($form->checkInput()) {
358 $input = md5($form->getInput(
"password"));
359 if ($this->node_id) {
364 if ($input == $password) {
365 if ($this->node_id) {
367 $this->redirectToResource($this->node_id);
370 $this->redirectToResource($this->portfolio_id,
true);
373 $item = $form->getItemByPostVar(
"password");
374 $item->setAlert(
$lng->txt(
"wsp_invalid_password"));
375 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"form_input_not_valid"));
379 $form->setValuesByPost();
380 $this->passwordForm($form);
Class ilCtrl provides processing control methods.
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
@ilCtrl_Calls ilObjBlogGUI: ilBlogPostingGUI, ilWorkspaceAccessGUI @ilCtrl_Calls ilObjBlogGUI: ilInfo...
GUI class for exercise verification.
GUI class for file objects.
Class ilObjLinkResourceGUI.
@ilCtrl_Calls ilObjPortfolioGUI: ilPortfolioPageGUI, ilPageObjectGUI @ilCtrl_Calls ilObjPortfolioGUI:...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for test verification.
parses the objects.xml it handles the xml-description of all ilias objects
static _lookupType(int $id, bool $reference=false)
static _lookupTitle(int $obj_id)
static lookupOfflineStatus(int $obj_id)
Lookup offline status using objectDataCache.
Access handler for portfolio NOTE: This file needs to stay in the classes directory,...
static keepSharedSessionPassword(int $a_node_id, string $a_password)
static getSharedNodePassword(int $a_node_id)
static _getPermissions(int $a_node_id)
Get all permissions to node.
Workspace deep link handler GUI.
static hasAccess(int $a_node_id, bool $a_is_portfolio=false)
redirectToResource(int $a_node_id, bool $a_is_portfolio=false)
ilObjectDefinition $obj_definition
StandardGUIRequest $request
ilGlobalTemplateInterface $tpl
passwordForm(?ilPropertyFormGUI $form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
static redirect(string $a_script)
const PERMISSION_ALL_PASSWORD
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getSharedNodePassword(int $a_node_id)
static getObjectDataFromNode(int $a_node_id)
static _getPermissions(int $a_node_id)
Get all permissions to node.
static keepSharedSessionPassword(int $a_node_id, string $a_password)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLocator()
Insert locator.
setDescription(string $a_descr)
Sets description below title in standard template.
loadStandardTemplate()
This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STA...
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
setContent(string $a_html)
Sets content for standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...