ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilPortfolioRepositoryGUI Class Reference

Portfolio repository gui class. More...

+ Collaboration diagram for ilPortfolioRepositoryGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 setTabs ()
 

Protected Member Functions

 setLocator ()
 
 checkAccess ($a_permission, $a_portfolio_id=null)
 
 show ()
 
 getPortfolioList ()
 Get portfolio list. More...
 
 setOnline ()
 Set online. More...
 
 setOffline ()
 Set offline. More...
 
 saveTitles ()
 
 confirmPortfolioDeletion ()
 
 deletePortfolios ()
 
 unsetDefault ()
 
 setDefaultConfirmation ()
 Confirm sharing when setting default. More...
 
 setDefaultGlobal ()
 
 setDefaultRegistered ()
 
 setDefault ($a_prtf_id)
 
 showOtherFilter ()
 
 showOther ($a_load_data=true)
 
 applyShareFilter ()
 
 resetShareFilter ()
 

Protected Attributes

 $lng
 
 $user
 
 $ctrl
 
 $tpl
 
 $tabs
 
 $help
 
 $locator
 
 $toolbar
 
 $settings
 
 $user_id
 
 $access_handler
 
 $ui
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilPortfolioRepositoryGUI::__construct ( )

Definition at line 66 of file class.ilPortfolioRepositoryGUI.php.

References $DIC, $ilUser, $lng, help(), settings(), ui(), and user().

67  {
68  global $DIC;
69 
70  $this->lng = $DIC->language();
71  $this->user = $DIC->user();
72  $this->ctrl = $DIC->ctrl();
73  $this->tpl = $DIC["tpl"];
74  $this->tabs = $DIC->tabs();
75  $this->help = $DIC["ilHelp"];
76  $this->locator = $DIC["ilLocator"];
77  $this->toolbar = $DIC->toolbar();
78  $this->settings = $DIC->settings();
79  $this->ui = $DIC->ui();
80  $lng = $DIC->language();
81  $ilUser = $DIC->user();
82 
83  $lng->loadLanguageModule("prtf");
84  $lng->loadLanguageModule("user");
85 
86  $this->access_handler = new ilPortfolioAccessHandler();
87 
88  $this->user_id = $ilUser->getId();
89  }
settings()
Definition: settings.php:2
user()
Definition: user.php:4
help()
Definition: help.php:2
$ilUser
Definition: imgupload.php:18
ui()
Definition: ui.php:5
Access handler for portfolio.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ applyShareFilter()

ilPortfolioRepositoryGUI::applyShareFilter ( )
protected

Definition at line 596 of file class.ilPortfolioRepositoryGUI.php.

References showOther().

597  {
598  $tbl = new ilWorkspaceShareTableGUI($this, "showOther", $this->access_handler);
599  $tbl->resetOffset();
600  $tbl->writeFilterToSession();
601 
602  $this->showOther();
603  }
Workspace share handler table GUI class.
+ Here is the call graph for this function:

◆ checkAccess()

ilPortfolioRepositoryGUI::checkAccess (   $a_permission,
  $a_portfolio_id = null 
)
protected

Definition at line 178 of file class.ilPortfolioRepositoryGUI.php.

Referenced by deletePortfolios(), saveTitles(), setDefault(), setDefaultConfirmation(), setDefaultGlobal(), setDefaultRegistered(), and unsetDefault().

179  {
180  if ($a_portfolio_id) {
181  return $this->access_handler->checkAccess($a_permission, "", $a_portfolio_id);
182  }
183  // currently only object-based permissions
184  return true;
185  }
+ Here is the caller graph for this function:

◆ confirmPortfolioDeletion()

ilPortfolioRepositoryGUI::confirmPortfolioDeletion ( )
protected

Definition at line 414 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $ilCtrl, $lng, $tpl, ilObject2\_lookupTitle(), and ilUtil\sendInfo().

415  {
417  $tpl = $this->tpl;
418  $lng = $this->lng;
419 
420  $prtfs = $_REQUEST["prtfs"];
421 
422  if (!is_array($prtfs) || count($prtfs) == 0) {
423  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
424  $ilCtrl->redirect($this, "show");
425  } else {
426  $cgui = new ilConfirmationGUI();
427  $cgui->setFormAction($ilCtrl->getFormAction($this));
428  $cgui->setHeaderText($lng->txt("prtf_sure_delete_portfolios"));
429  $cgui->setCancel($lng->txt("cancel"), "show");
430  $cgui->setConfirm($lng->txt("delete"), "deletePortfolios");
431 
432  foreach ($prtfs as $id) {
433  $cgui->addItem("prtfs[]", $id, ilObjPortfolio::_lookupTitle($id));
434  }
435 
436  $tpl->setContent($cgui->getHTML());
437  }
438  }
static _lookupTitle($a_id)
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:

◆ deletePortfolios()

ilPortfolioRepositoryGUI::deletePortfolios ( )
protected

Definition at line 440 of file class.ilPortfolioRepositoryGUI.php.

References $_POST, $ctrl, $ilCtrl, $lng, $user_id, and checkAccess().

441  {
442  $lng = $this->lng;
444 
445  if (is_array($_POST["prtfs"])) {
446  foreach ($_POST["prtfs"] as $id) {
447  if ($this->checkAccess("write", $id)) {
448  $portfolio = new ilObjPortfolio($id, false);
449  if ($portfolio->getOwner() == $this->user_id) {
450  $this->access_handler->removePermission($id);
451  $portfolio->delete();
452  }
453  }
454  }
455  }
456  ilUtil::sendSuccess($lng->txt("prtf_portfolio_deleted"), true);
457  $ilCtrl->redirect($this, "show");
458  }
checkAccess($a_permission, $a_portfolio_id=null)
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ executeCommand()

ilPortfolioRepositoryGUI::executeCommand ( )

Definition at line 91 of file class.ilPortfolioRepositoryGUI.php.

References $_GET, $ctrl, $ilCtrl, $lng, $tabs, $tpl, ilLink\_getLink(), ilUtil\getImagePath(), setLocator(), and setTabs().

92  {
94  $lng = $this->lng;
95  $tpl = $this->tpl;
96  $ilTabs = $this->tabs;
97 
98  if (!$this->access_handler->editPortfolios()) {
99  throw new ilException($this->lng->txt("no_permission"));
100  }
101 
102  $next_class = $ilCtrl->getNextClass($this);
103  $cmd = $ilCtrl->getCmd("show");
104 
105  $tpl->setTitle($lng->txt("portfolio"));
106  $tpl->setTitleIcon(
107  ilUtil::getImagePath("icon_prtf.svg"),
108  $lng->txt("portfolio")
109  );
110 
111  switch ($next_class) {
112  case "ilobjportfoliogui":
113 
114  $gui = new ilObjPortfolioGUI((int) $_REQUEST["prt_id"]);
115 
116  if ($cmd != "preview") {
117  $this->setLocator();
118 
119  if ((int) $_GET["exc_back_ref_id"] > 0) {
120  $ilTabs->setBack2Target($lng->txt("obj_exc"), ilLink::_getLink((int) $_GET["exc_back_ref_id"]));
121  } else {
122  $ilTabs->setBack2Target($lng->txt("prtf_tab_portfolios"), $ilCtrl->getLinkTarget($this, "show"));
123  }
124  }
125 
126  $ilCtrl->forwardCommand($gui);
127  break;
128 
129  default:
130  $this->setLocator();
131  $this->setTabs();
132  $this->$cmd();
133  break;
134  }
135 
136  return true;
137  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Portfolio view gui class.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

◆ getPortfolioList()

ilPortfolioRepositoryGUI::getPortfolioList ( )
protected

Get portfolio list.

Parameters

Definition at line 214 of file class.ilPortfolioRepositoryGUI.php.

References $access_handler, $ctrl, Vendor\Package\$f, $lng, $ui, ilPortfolioExerciseGUI\checkExercise(), ilUtil\getImagePath(), and ilObjPortfolio\getPortfoliosOfUser().

Referenced by show().

215  {
216  $ui = $this->ui;
217  $f = $ui->factory();
218  $renderer = $ui->renderer();
219  $lng = $this->lng;
220  $ctrl = $this->ctrl;
221 
223 
224  $shared_objects = $access_handler->getObjectsIShare(false);
225 
226  $items = [];
227 
228  foreach (ilObjPortfolio::getPortfoliosOfUser($this->user_id) as $port) {
229  // icon
230  $icon = $f->symbol()->icon()->custom(
231  ilUtil::getImagePath("icon_prtf.svg"),
232  $lng->txt("obj_portfolio"),
233  "medium"
234  );
235  if (!$port["is_online"] || !in_array($port["id"], $shared_objects)) {
236  $icon = $icon->withDisabled(true);
237  }
238 
239  // actions
240  $prtf_path = array(get_class($this), "ilobjportfoliogui");
241  $action = [];
242  // ... preview
243  $ctrl->setParameterByClass("ilobjportfoliogui", "prt_id", $port["id"]);
244  $preview_action = $ctrl->getLinkTargetByClass($prtf_path, "preview");
245  $action[] = $f->button()->shy($lng->txt("user_profile_preview"), $preview_action);
246  // ... edit content
247  $action[] = $f->button()->shy(
248  $lng->txt("prtf_edit_content"),
249  $ctrl->getLinkTargetByClass($prtf_path, "view")
250  );
251  $ctrl->setParameter($this, "prt_id", $port["id"]);
252  if ($port["is_online"]) {
253  // ... set offline
254  $action[] = $f->button()->shy(
255  $lng->txt("prtf_set_offline"),
256  $ctrl->getLinkTarget($this, "setOffline")
257  );
258  } else {
259  // ... set online
260  $action[] = $f->button()->shy(
261  $lng->txt("prtf_set_online"),
262  $ctrl->getLinkTarget($this, "setOnline")
263  );
264  }
265  $ctrl->setParameter($this, "prt_id", "");
266  // ... settings
267  $action[] = $f->button()->shy(
268  $lng->txt("settings"),
269  $ctrl->getLinkTargetByClass($prtf_path, "edit")
270  );
271  // ... sharing
272  $action[] = $f->button()->shy(
273  $lng->txt("wsp_permissions"),
274  $ctrl->getLinkTargetByClass(array(get_class($this), "ilobjportfoliogui", "ilWorkspaceAccessGUI"), "share")
275  );
276  $ctrl->setParameterByClass("ilobjportfoliogui", "prt_id", "");
277 
278  if ($port["is_online"]) {
279  if (!$port["is_default"]) {
280  // ... set as default
281  $ctrl->setParameter($this, "prt_id", $port["id"]);
282 
283  $action[] = $f->button()->shy(
284  $lng->txt("prtf_set_as_default"),
285  $ctrl->getLinkTarget($this, "setDefaultConfirmation")
286  );
287 
288  $ctrl->setParameter($this, "prt_id", "");
289  } else {
290  // ... unset as default
291  $action[] = $f->button()->shy(
292  $lng->txt("prtf_unset_as_default"),
293  $ctrl->getLinkTarget($this, "unsetDefault")
294  );
295  }
296  }
297  // ... delete
298  $ctrl->setParameter($this, "prtfs[]", $port["id"]);
299  $action[] = $f->button()->shy(
300  $lng->txt("delete"),
301  $ctrl->getLinkTarget($this, "confirmPortfolioDeletion")
302  );
303  $ctrl->setParameter($this, "prtfs[]", "");
304  $actions = $f->dropdown()->standard($action);
305 
306 
307  // properties
308  $props = [];
309  // ... online
310  $props[$lng->txt("online")] = ($port["is_online"])
311  ? $lng->txt("yes")
312  : "<span class='il_ItemAlertProperty'>" . $lng->txt("no") . "</span>";
313  // ... shared
314  $props[$lng->txt("wsp_status_shared")] = (in_array($port["id"], $shared_objects))
315  ? $lng->txt("yes")
316  : "<span class='il_ItemAlertProperty'>" . $lng->txt("no") . "</span>";
317  // ... default (my profile)
318  if ($port["is_default"]) {
319  $props[$lng->txt("prtf_default_portfolio")] = $lng->txt("yes");
320  }
321  // ... handed in
322  // exercise portfolio?
323  $exercises = ilPortfolioExerciseGUI::checkExercise($this->user_id, $port["id"], false, true);
324  foreach ($exercises as $exinfo) {
325  if ($exinfo["submitted"]) {
326  $props[$exinfo["ass_title"]] =
327  str_replace("$1", $exinfo["submitted_date"], $lng->txt("prtf_submission_on"));
328  } else {
329  $props[$exinfo["ass_title"]] = "<span class='il_ItemAlertProperty'>" . $lng->txt("prtf_no_submission") . "</span>";
330  }
331  }
332 
333 
334  $items[] = $f->item()->standard($f->button()->shy($port["title"], $preview_action))
335  ->withActions($actions)
336  ->withProperties($props)
337  ->withLeadIcon($icon);
338  }
339 
340 
341  $std_list = $f->panel()->listing()->standard($lng->txt("prtf_portfolios"), array(
342  $f->item()->group("", $items)
343  ));
344 
345  return $renderer->render($std_list);
346  }
static getPortfoliosOfUser($a_user_id)
Get views of user.
static checkExercise($a_user_id, $a_obj_id, $a_add_submit=false, $as_array=false)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Access handler for portfolio.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetShareFilter()

ilPortfolioRepositoryGUI::resetShareFilter ( )
protected

Definition at line 605 of file class.ilPortfolioRepositoryGUI.php.

References showOther().

606  {
607  $tbl = new ilWorkspaceShareTableGUI($this, "showOther", $this->access_handler);
608  $tbl->resetOffset();
609  $tbl->resetFilter();
610 
611  $this->showOther();
612  }
Workspace share handler table GUI class.
+ Here is the call graph for this function:

◆ saveTitles()

ilPortfolioRepositoryGUI::saveTitles ( )
protected

Definition at line 388 of file class.ilPortfolioRepositoryGUI.php.

References $_POST, $ctrl, $ilCtrl, $lng, checkAccess(), and ilUtil\stripSlashes().

389  {
391  $lng = $this->lng;
392 
393  foreach ($_POST["title"] as $id => $title) {
394  if (trim($title)) {
395  if ($this->checkAccess("write", $id)) {
396  $portfolio = new ilObjPortfolio($id, false);
397  $portfolio->setTitle(ilUtil::stripSlashes($title));
398 
399  if (is_array($_POST["online"]) && in_array($id, $_POST["online"])) {
400  $portfolio->setOnline(true);
401  } else {
402  $portfolio->setOnline(false);
403  }
404 
405  $portfolio->update();
406  }
407  }
408  }
409 
410  ilUtil::sendSuccess($lng->txt("saved_successfully"), true);
411  $ilCtrl->redirect($this, "show");
412  }
checkAccess($a_permission, $a_portfolio_id=null)
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ setDefault()

ilPortfolioRepositoryGUI::setDefault (   $a_prtf_id)
protected

Definition at line 552 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $ilCtrl, $ilUser, $lng, $user, checkAccess(), and ilObjPortfolio\setUserDefault().

Referenced by setDefaultConfirmation(), setDefaultGlobal(), and setDefaultRegistered().

553  {
555  $lng = $this->lng;
557 
558  if ($a_prtf_id && $this->checkAccess("write")) {
559  // #12845
560  if ($this->access_handler->hasGlobalPermission($a_prtf_id)) {
561  $ilUser->setPref("public_profile", "g");
562  $ilUser->writePrefs();
563  } elseif ($this->access_handler->hasRegisteredPermission($a_prtf_id)) {
564  $ilUser->setPref("public_profile", "y");
565  $ilUser->writePrefs();
566  } else {
567  return;
568  }
569  ilObjPortfolio::setUserDefault($this->user_id, $a_prtf_id);
570  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
571  }
572  $ilCtrl->redirect($this, "show");
573  }
checkAccess($a_permission, $a_portfolio_id=null)
global $ilCtrl
Definition: ilias.php:18
static setUserDefault($a_user_id, $a_portfolio_id=null)
Set the user default portfolio.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDefaultConfirmation()

ilPortfolioRepositoryGUI::setDefaultConfirmation ( )
protected

Confirm sharing when setting default.

Definition at line 485 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $ilCtrl, $ilSetting, $lng, $settings, $tabs, $tpl, checkAccess(), and setDefault().

486  {
488  $lng = $this->lng;
489  $tpl = $this->tpl;
490  $ilTabs = $this->tabs;
492 
493  $prtf_id = (int) $_REQUEST["prt_id"];
494 
495  if ($prtf_id && $this->checkAccess("write")) {
496  // if already shared, no need to ask again
497  if ($this->access_handler->hasRegisteredPermission($prtf_id) ||
498  $this->access_handler->hasGlobalPermission($prtf_id)) {
499  return $this->setDefault($prtf_id);
500  }
501 
502  $ilTabs->clearTargets();
503  $ilTabs->setBackTarget(
504  $lng->txt("cancel"),
505  $ilCtrl->getLinkTarget($this, "show")
506  );
507 
508  $ilCtrl->setParameter($this, "prt_id", $prtf_id);
509 
510  // #20310
511  if (!$ilSetting->get("enable_global_profiles")) {
512  $ilCtrl->redirect($this, "setDefaultRegistered");
513  }
514 
515  $cgui = new ilConfirmationGUI();
516  $cgui->setFormAction($ilCtrl->getFormAction($this));
517  $cgui->setHeaderText($lng->txt("prtf_set_default_publish_confirmation"));
518  $cgui->setCancel($lng->txt("prtf_set_default_publish_global"), "setDefaultGlobal");
519  $cgui->setConfirm($lng->txt("prtf_set_default_publish_registered"), "setDefaultRegistered");
520  $tpl->setContent($cgui->getHTML());
521 
522  return;
523  }
524 
525  $ilCtrl->redirect($this, "show");
526  }
checkAccess($a_permission, $a_portfolio_id=null)
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
Confirmation screen class.
+ Here is the call graph for this function:

◆ setDefaultGlobal()

ilPortfolioRepositoryGUI::setDefaultGlobal ( )
protected

Definition at line 528 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $ilCtrl, checkAccess(), ilWorkspaceAccessGUI\PERMISSION_ALL, and setDefault().

529  {
531 
532  $prtf_id = (int) $_REQUEST["prt_id"];
533  if ($prtf_id && $this->checkAccess("write")) {
534  $this->access_handler->addPermission($prtf_id, ilWorkspaceAccessGUI::PERMISSION_ALL);
535  $this->setDefault($prtf_id);
536  }
537  $ilCtrl->redirect($this, "show");
538  }
checkAccess($a_permission, $a_portfolio_id=null)
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ setDefaultRegistered()

ilPortfolioRepositoryGUI::setDefaultRegistered ( )
protected

Definition at line 540 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $ilCtrl, checkAccess(), ilWorkspaceAccessGUI\PERMISSION_REGISTERED, and setDefault().

541  {
543 
544  $prtf_id = (int) $_REQUEST["prt_id"];
545  if ($prtf_id && $this->checkAccess("write")) {
546  $this->access_handler->addPermission($prtf_id, ilWorkspaceAccessGUI::PERMISSION_REGISTERED);
547  $this->setDefault($prtf_id);
548  }
549  $ilCtrl->redirect($this, "show");
550  }
checkAccess($a_permission, $a_portfolio_id=null)
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ setLocator()

ilPortfolioRepositoryGUI::setLocator ( )
protected

Definition at line 163 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $ilCtrl, $lng, $locator, and $tpl.

Referenced by executeCommand().

164  {
165  $ilLocator = $this->locator;
166  $lng = $this->lng;
168  $tpl = $this->tpl;
169 
170  $ilLocator->addItem(
171  $lng->txt("portfolio"),
172  $ilCtrl->getLinkTarget($this, "show")
173  );
174 
175  $tpl->setLocator();
176  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ setOffline()

ilPortfolioRepositoryGUI::setOffline ( )
protected

Set offline.

Definition at line 371 of file class.ilPortfolioRepositoryGUI.php.

References $_GET, $ctrl, $ilCtrl, $lng, $user_id, and ilObject2\_lookupOwner().

372  {
374  $lng = $this->lng;
375 
376  $prt_id = (int) $_GET["prt_id"];
378  $portfolio = new ilObjPortfolio($prt_id, false);
379  $portfolio->setOnline(false);
380  $portfolio->update();
381  ilUtil::sendSuccess($lng->txt("saved_successfully"), true);
382  $ilCtrl->redirect($this, "show");
383  }
384  $ilCtrl->redirect($this, "show");
385  }
$_GET["client_id"]
static _lookupOwner($a_id)
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ setOnline()

ilPortfolioRepositoryGUI::setOnline ( )
protected

Set online.

Definition at line 352 of file class.ilPortfolioRepositoryGUI.php.

References $_GET, $ctrl, $ilCtrl, $lng, $user_id, and ilObject2\_lookupOwner().

353  {
355  $lng = $this->lng;
356 
357  $prt_id = (int) $_GET["prt_id"];
359  $portfolio = new ilObjPortfolio($prt_id, false);
360  $portfolio->setOnline(true);
361  $portfolio->update();
362  ilUtil::sendSuccess($lng->txt("saved_successfully"), true);
363  $ilCtrl->redirect($this, "show");
364  }
365  $ilCtrl->redirect($this, "show");
366  }
$_GET["client_id"]
static _lookupOwner($a_id)
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ setTabs()

ilPortfolioRepositoryGUI::setTabs ( )

Definition at line 139 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $help, $ilCtrl, $lng, and $tabs.

Referenced by executeCommand().

140  {
141  $ilTabs = $this->tabs;
142  $lng = $this->lng;
144  $ilHelp = $this->help;
145 
146  $ilHelp->setScreenIdComponent("prtf");
147 
148  $ilTabs->addTab(
149  "mypf",
150  $lng->txt("prtf_tab_portfolios"),
151  $ilCtrl->getLinkTarget($this)
152  );
153 
154  $ilTabs->addTab(
155  "otpf",
156  $lng->txt("prtf_tab_other_users"),
157  $ilCtrl->getLinkTarget($this, "showotherFilter")
158  );
159 
160  $ilTabs->activateTab("mypf");
161  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ show()

ilPortfolioRepositoryGUI::show ( )
protected

Definition at line 192 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $ilCtrl, $lng, $toolbar, $tpl, ilLinkButton\getInstance(), getPortfolioList(), and ilDiskQuotaHandler\getStatusLegend().

193  {
194  $tpl = $this->tpl;
195  $lng = $this->lng;
196  $ilToolbar = $this->toolbar;
198 
199  $button = ilLinkButton::getInstance();
200  $button->setCaption("prtf_add_portfolio");
201  $button->setUrl($ilCtrl->getLinkTargetByClass("ilObjPortfolioGUI", "create"));
202  $ilToolbar->addButtonInstance($button);
203  $portfolio_list = $this->getPortfolioList();
204 
205  $tpl->setContent($portfolio_list . ilDiskQuotaHandler::getStatusLegend());
206  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ showOther()

ilPortfolioRepositoryGUI::showOther (   $a_load_data = true)
protected

Definition at line 585 of file class.ilPortfolioRepositoryGUI.php.

References $tabs, and $tpl.

Referenced by applyShareFilter(), resetShareFilter(), and showOtherFilter().

586  {
587  $tpl = $this->tpl;
588  $ilTabs = $this->tabs;
589 
590  $ilTabs->activateTab("otpf");
591 
592  $tbl = new ilWorkspaceShareTableGUI($this, "showOther", $this->access_handler, null, $a_load_data);
593  $tpl->setContent($tbl->getHTML());
594  }
Workspace share handler table GUI class.
+ Here is the caller graph for this function:

◆ showOtherFilter()

ilPortfolioRepositoryGUI::showOtherFilter ( )
protected

Definition at line 580 of file class.ilPortfolioRepositoryGUI.php.

References showOther().

581  {
582  $this->showOther(false);
583  }
+ Here is the call graph for this function:

◆ unsetDefault()

ilPortfolioRepositoryGUI::unsetDefault ( )
protected

Definition at line 465 of file class.ilPortfolioRepositoryGUI.php.

References $ctrl, $ilCtrl, $ilUser, $lng, $user, checkAccess(), and ilObjPortfolio\setUserDefault().

466  {
468  $lng = $this->lng;
470 
471  if ($this->checkAccess("write")) {
472  // #12845
473  $ilUser->setPref("public_profile", "n");
474  $ilUser->writePrefs();
475 
476  ilObjPortfolio::setUserDefault($this->user_id);
477  ilUtil::sendSuccess($lng->txt("prtf_unset_default_share_info"), true);
478  }
479  $ilCtrl->redirect($this, "show");
480  }
checkAccess($a_permission, $a_portfolio_id=null)
global $ilCtrl
Definition: ilias.php:18
static setUserDefault($a_user_id, $a_portfolio_id=null)
Set the user default portfolio.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

Field Documentation

◆ $access_handler

ilPortfolioRepositoryGUI::$access_handler
protected

Definition at line 59 of file class.ilPortfolioRepositoryGUI.php.

Referenced by getPortfolioList().

◆ $ctrl

◆ $help

ilPortfolioRepositoryGUI::$help
protected

Definition at line 41 of file class.ilPortfolioRepositoryGUI.php.

Referenced by setTabs().

◆ $lng

◆ $locator

ilPortfolioRepositoryGUI::$locator
protected

Definition at line 46 of file class.ilPortfolioRepositoryGUI.php.

Referenced by setLocator().

◆ $settings

ilPortfolioRepositoryGUI::$settings
protected

Definition at line 56 of file class.ilPortfolioRepositoryGUI.php.

Referenced by setDefaultConfirmation().

◆ $tabs

ilPortfolioRepositoryGUI::$tabs
protected

◆ $toolbar

ilPortfolioRepositoryGUI::$toolbar
protected

Definition at line 51 of file class.ilPortfolioRepositoryGUI.php.

Referenced by show().

◆ $tpl

ilPortfolioRepositoryGUI::$tpl
protected

◆ $ui

ilPortfolioRepositoryGUI::$ui
protected

Definition at line 64 of file class.ilPortfolioRepositoryGUI.php.

Referenced by getPortfolioList().

◆ $user

ilPortfolioRepositoryGUI::$user
protected

Definition at line 21 of file class.ilPortfolioRepositoryGUI.php.

Referenced by setDefault(), and unsetDefault().

◆ $user_id

ilPortfolioRepositoryGUI::$user_id
protected

Definition at line 58 of file class.ilPortfolioRepositoryGUI.php.

Referenced by deletePortfolios(), setOffline(), and setOnline().


The documentation for this class was generated from the following file: