4 include_once(
'./Modules/Portfolio/classes/class.ilObjPortfolio.php');
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();
79 $lng = $DIC->language();
82 $lng->loadLanguageModule(
"prtf");
83 $lng->loadLanguageModule(
"user");
85 include_once(
'./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
88 $this->user_id =
$ilUser->getId();
98 $next_class =
$ilCtrl->getNextClass($this);
101 $tpl->setTitle(
$lng->txt(
"portfolio"));
104 $lng->txt(
"portfolio")
107 switch ($next_class) {
108 case "ilobjportfoliogui":
110 include_once(
'./Modules/Portfolio/classes/class.ilObjPortfolioGUI.php');
113 if ($cmd !=
"preview") {
116 if ((
int)
$_GET[
"exc_back_ref_id"] > 0) {
117 include_once(
"./Services/Link/classes/class.ilLink.php");
120 $ilTabs->setBack2Target(
$lng->txt(
"prtf_tab_portfolios"),
$ilCtrl->getLinkTarget($this,
"show"));
144 $ilHelp->setScreenIdComponent(
"prtf");
148 $lng->txt(
"prtf_tab_portfolios"),
154 $lng->txt(
"prtf_tab_other_users"),
155 $ilCtrl->getLinkTarget($this,
"showotherFilter")
158 $ilTabs->activateTab(
"mypf");
169 $lng->txt(
"portfolio"),
170 $ilCtrl->getLinkTarget($this,
"show")
176 protected function checkAccess($a_permission, $a_portfolio_id = null)
178 if ($a_portfolio_id) {
179 return $this->access_handler->checkAccess($a_permission,
"", $a_portfolio_id);
197 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
199 $button->setCaption(
"prtf_add_portfolio");
200 $button->setUrl(
$ilCtrl->getLinkTargetByClass(
"ilObjPortfolioGUI",
"create"));
201 $ilToolbar->addButtonInstance($button);
203 include_once
"Modules/Portfolio/classes/class.ilPortfolioTableGUI.php";
206 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
223 $portfolio->setOnline(
true);
225 $portfolio->setOnline(
false);
228 $portfolio->update();
234 $ilCtrl->redirect($this,
"show");
243 if (!is_array(
$_POST[
"prtfs"]) || count(
$_POST[
"prtfs"]) == 0) {
245 $ilCtrl->redirect($this,
"show");
247 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
249 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
250 $cgui->setHeaderText(
$lng->txt(
"prtf_sure_delete_portfolios"));
251 $cgui->setCancel(
$lng->txt(
"cancel"),
"show");
252 $cgui->setConfirm(
$lng->txt(
"delete"),
"deletePortfolios");
258 $tpl->setContent($cgui->getHTML());
267 if (is_array(
$_POST[
"prtfs"])) {
272 $this->access_handler->removePermission($id);
273 $portfolio->delete();
279 $ilCtrl->redirect($this,
"show");
295 $ilUser->setPref(
"public_profile",
"n");
301 $ilCtrl->redirect($this,
"show");
315 $prtf_id = (int) $_REQUEST[
"prt_id"];
319 if ($this->access_handler->hasRegisteredPermission($prtf_id) ||
320 $this->access_handler->hasGlobalPermission($prtf_id)) {
324 $ilTabs->clearTargets();
325 $ilTabs->setBackTarget(
327 $ilCtrl->getLinkTarget($this,
"show")
330 $ilCtrl->setParameter($this,
"prt_id", $prtf_id);
333 if (!
$ilSetting->get(
"enable_global_profiles")) {
334 $ilCtrl->redirect($this,
"setDefaultRegistered");
337 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
339 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
340 $cgui->setHeaderText(
$lng->txt(
"prtf_set_default_publish_confirmation"));
341 $cgui->setCancel(
$lng->txt(
"prtf_set_default_publish_global"),
"setDefaultGlobal");
342 $cgui->setConfirm(
$lng->txt(
"prtf_set_default_publish_registered"),
"setDefaultRegistered");
343 $tpl->setContent($cgui->getHTML());
348 $ilCtrl->redirect($this,
"show");
355 $prtf_id = (int) $_REQUEST[
"prt_id"];
360 $ilCtrl->redirect($this,
"show");
367 $prtf_id = (int) $_REQUEST[
"prt_id"];
372 $ilCtrl->redirect($this,
"show");
383 if ($this->access_handler->hasGlobalPermission($a_prtf_id)) {
384 $ilUser->setPref(
"public_profile",
"g");
386 } elseif ($this->access_handler->hasRegisteredPermission($a_prtf_id)) {
387 $ilUser->setPref(
"public_profile",
"y");
395 $ilCtrl->redirect($this,
"show");
413 $ilTabs->activateTab(
"otpf");
415 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceShareTableGUI.php";
422 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceShareTableGUI.php";
425 $tbl->writeFilterToSession();
432 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceShareTableGUI.php";
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkAccess($a_permission, $a_portfolio_id=null)
static _lookupTitle($a_id)
if(!array_key_exists('StateId', $_REQUEST)) $id
const PERMISSION_REGISTERED
Portfolio repository gui class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Workspace share handler table GUI class.
Portfolio view gui class.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static setUserDefault($a_user_id, $a_portfolio_id=null)
Set the user default portfolio.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
confirmPortfolioDeletion()
Access handler for portfolio.
if(empty($password)) $table
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Confirmation screen class.
setDefaultConfirmation()
Confirm sharing when setting default.
showOther($a_load_data=true)