4 include_once(
'./Modules/Portfolio/classes/class.ilObjPortfolio.php');
25 $lng->loadLanguageModule(
"prtf");
26 $lng->loadLanguageModule(
"user");
28 include_once(
'./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
31 $this->user_id = $ilUser->getId();
38 $next_class = $ilCtrl->getNextClass($this);
39 $cmd = $ilCtrl->getCmd(
"show");
41 $tpl->setTitle($lng->txt(
"portfolio"));
43 $lng->txt(
"portfolio"));
47 case "ilobjportfoliogui":
52 $ilTabs->setBack2Target($lng->txt(
"prtf_tab_portfolios"),
53 $ilCtrl->getLinkTarget($this,
"show"));
55 include_once(
'./Modules/Portfolio/classes/class.ilObjPortfolioGUI.php');
57 $ilCtrl->forwardCommand($gui);
74 $ilHelp->setScreenIdComponent(
"prtf");
76 $ilTabs->addTab(
"mypf", $lng->txt(
"prtf_tab_portfolios"),
77 $ilCtrl->getLinkTarget($this));
79 $ilTabs->addTab(
"otpf", $lng->txt(
"prtf_tab_other_users"),
80 $ilCtrl->getLinkTarget($this,
"showotherFilter"));
82 $ilTabs->activateTab(
"mypf");
89 $ilLocator->addItem($lng->txt(
"portfolio"),
90 $ilCtrl->getLinkTarget($this,
"show"));
95 protected function checkAccess($a_permission, $a_portfolio_id = null)
99 return $this->access_handler->checkAccess($a_permission,
"", $a_portfolio_id);
114 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
116 $button->setCaption(
"prtf_add_portfolio");
117 $button->setUrl($ilCtrl->getLinkTargetByClass(
"ilObjPortfolioGUI",
"create"));
118 $ilToolbar->addButtonInstance($button);
120 include_once
"Modules/Portfolio/classes/class.ilPortfolioTableGUI.php";
123 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
125 $tpl->setContent($table->getHTML().ilDiskQuotaHandler::getStatusLegend());
141 if(is_array(
$_POST[
"online"]) && in_array($id,
$_POST[
"online"]))
143 $portfolio->setOnline(
true);
147 $portfolio->setOnline(
false);
150 $portfolio->update();
156 $ilCtrl->redirect($this,
"show");
163 if (!is_array(
$_POST[
"prtfs"]) || count(
$_POST[
"prtfs"]) == 0)
166 $ilCtrl->redirect($this,
"show");
170 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
172 $cgui->setFormAction($ilCtrl->getFormAction($this));
173 $cgui->setHeaderText($lng->txt(
"prtf_sure_delete_portfolios"));
174 $cgui->setCancel($lng->txt(
"cancel"),
"show");
175 $cgui->setConfirm($lng->txt(
"delete"),
"deletePortfolios");
177 foreach (
$_POST[
"prtfs"] as $id)
182 $tpl->setContent($cgui->getHTML());
190 if (is_array(
$_POST[
"prtfs"]))
192 foreach (
$_POST[
"prtfs"] as $id)
199 $this->access_handler->removePermission($id);
200 $portfolio->delete();
206 $ilCtrl->redirect($this,
"show");
221 $ilUser->setPref(
"public_profile",
"n");
222 $ilUser->writePrefs();
227 $ilCtrl->redirect($this,
"show");
237 $prtf_id = (int)$_REQUEST[
"prt_id"];
242 if($this->access_handler->hasRegisteredPermission($prtf_id) ||
243 $this->access_handler->hasGlobalPermission($prtf_id))
248 $ilTabs->clearTargets();
249 $ilTabs->setBackTarget($lng->txt(
"cancel"),
250 $ilCtrl->getLinkTarget($this,
"show"));
252 $ilCtrl->setParameter($this,
"prt_id", $prtf_id);
255 if(!$ilSetting->get(
"enable_global_profiles"))
257 $ilCtrl->redirect($this,
"setDefaultRegistered");
260 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
262 $cgui->setFormAction($ilCtrl->getFormAction($this));
263 $cgui->setHeaderText($lng->txt(
"prtf_set_default_publish_confirmation"));
264 $cgui->setCancel($lng->txt(
"prtf_set_default_publish_global"),
"setDefaultGlobal");
265 $cgui->setConfirm($lng->txt(
"prtf_set_default_publish_registered"),
"setDefaultRegistered");
266 $tpl->setContent($cgui->getHTML());
271 $ilCtrl->redirect($this,
"show");
278 $prtf_id = (int)$_REQUEST[
"prt_id"];
284 $ilCtrl->redirect($this,
"show");
291 $prtf_id = (int)$_REQUEST[
"prt_id"];
297 $ilCtrl->redirect($this,
"show");
307 if($this->access_handler->hasGlobalPermission($a_prtf_id))
309 $ilUser->setPref(
"public_profile",
"g");
310 $ilUser->writePrefs();
312 else if($this->access_handler->hasRegisteredPermission($a_prtf_id))
314 $ilUser->setPref(
"public_profile",
"y");
315 $ilUser->writePrefs();
324 $ilCtrl->redirect($this,
"show");
339 global
$tpl, $ilTabs;
341 $ilTabs->activateTab(
"otpf");
343 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceShareTableGUI.php";
345 $tpl->setContent(
$tbl->getHTML());
350 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceShareTableGUI.php";
353 $tbl->writeFilterToSession();
360 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)
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.
Confirmation screen class.
setDefaultConfirmation()
Confirm sharing when setting default.
showOther($a_load_data=true)