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
174 $ilUser =
$DIC->user();
179 if (!$a_is_portfolio) {
185 if ($access_handler->checkAccess(
"read",
"", $a_node_id)) {
190 if (!$a_is_portfolio) {
200 if (!$prtf->isOnline()) {
214 if (!$a_is_portfolio) {
215 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&wsp_id=" . $a_node_id);
217 ilUtil::redirect(
"ilias.php?baseClass=ilSharedResourceGUI&cmd=passwordForm&prt_id=" . $a_node_id);
226 bool $a_is_portfolio =
false
228 $ilCtrl = $this->
ctrl;
229 $objDefinition = $this->obj_definition;
231 if (!$a_is_portfolio) {
233 if (!$object_data[
"obj_id"]) {
240 $object_data[
"obj_id"] = $a_node_id;
241 $object_data[
"type"] =
"prtf";
244 $class = $objDefinition->getClassName($object_data[
"type"]);
245 $gui =
"ilobj" . $class .
"gui";
247 switch ($object_data[
"type"]) {
249 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
250 $ilCtrl->setParameterByClass($gui,
"gtp", $this->request->getBlogGtp());
251 $ilCtrl->setParameterByClass($gui,
"edt", $this->request->getBlogEdt());
252 $ilCtrl->redirectByClass($gui,
"preview");
261 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
262 $ilCtrl->redirectByClass($gui,
"deliver");
267 $ilCtrl->setParameterByClass($gui,
"wsp_id", $a_node_id);
268 $ilCtrl->redirectByClass($gui);
272 $ilCtrl->setParameterByClass($gui,
"prt_id", $a_node_id);
273 $ilCtrl->setParameterByClass($gui,
"gtp", $this->request->getBlogGtp());
274 if ($this->request->getBackUrl()) {
275 $ilCtrl->setParameterByClass($gui,
"back_url", rawurlencode($this->request->getBackUrl()));
277 $ilCtrl->redirectByClass($gui,
"preview");
281 exit(
"invalid object type");
290 $lng->loadLanguageModule(
"wsp");
292 $tpl->
setTitle(
$lng->txt(
"wsp_password_protected_resource"));
296 $form = $this->initPasswordForm();
304 $ilCtrl = $this->ctrl;
306 $ilUser = $this->user;
307 $ilTabs = $this->tabs;
309 if ($this->node_id) {
316 $form->setFormAction($ilCtrl->getFormAction($this,
"checkPassword"));
317 $form->setTitle(
$lng->txt(
"wsp_password_for") .
": " . $object_data[
"title"]);
320 $password->setRetype(
false);
321 $password->setRequired(
true);
322 $password->setSkipSyntaxCheck(
true);
323 $form->addItem($password);
325 $form->addCommandButton(
"checkPassword",
$lng->txt(
"submit"));
328 $ilTabs->setBackTarget(
$lng->txt(
"back"), $ilCtrl->getLinkTarget($this,
"cancelPassword"));
329 $form->addCommandButton(
"cancelPassword",
$lng->txt(
"cancel"));
337 $ilUser = $this->user;
340 if ($this->node_id) {
342 $owner = $tree->lookupOwner($this->node_id);
343 ilUtil::redirect(
"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace&dsh=" . $owner);
346 $owner = $prtf->getOwner();
347 ilUtil::redirect(
"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToPortfolio&dsh=" . $owner);
356 $lng->loadLanguageModule(
"wsp");
358 $form = $this->initPasswordForm();
359 if ($form->checkInput()) {
360 $input = md5($form->getInput(
"password"));
361 if ($this->node_id) {
366 if ($input == $password) {
367 if ($this->node_id) {
369 $this->redirectToResource($this->node_id);
372 $this->redirectToResource($this->portfolio_id,
true);
375 $item = $form->getItemByPostVar(
"password");
376 $item->setAlert(
$lng->txt(
"wsp_invalid_password"));
377 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"form_input_not_valid"));
381 $form->setValuesByPost();
382 $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)
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...