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 $ilToolbar->addButton($lng->txt(
"prtf_add_portfolio"),
115 $ilCtrl->getLinkTargetByClass(
"ilObjPortfolioGUI",
"create"));
117 include_once
"Modules/Portfolio/classes/class.ilPortfolioTableGUI.php";
120 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
122 $tpl->setContent($table->getHTML().ilDiskQuotaHandler::getStatusLegend());
129 foreach(
$_POST[
"title"] as $id => $title)
136 $portfolio->setTitle($title);
138 if(is_array(
$_POST[
"online"]) && in_array($id,
$_POST[
"online"]))
140 $portfolio->setOnline(
true);
144 $portfolio->setOnline(
false);
147 $portfolio->update();
153 $ilCtrl->redirect($this,
"show");
160 if (!is_array(
$_POST[
"prtfs"]) || count(
$_POST[
"prtfs"]) == 0)
163 $ilCtrl->redirect($this,
"show");
167 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
169 $cgui->setFormAction($ilCtrl->getFormAction($this));
170 $cgui->setHeaderText($lng->txt(
"prtf_sure_delete_portfolios"));
171 $cgui->setCancel($lng->txt(
"cancel"),
"show");
172 $cgui->setConfirm($lng->txt(
"delete"),
"deletePortfolios");
174 foreach (
$_POST[
"prtfs"] as $id)
179 $tpl->setContent($cgui->getHTML());
187 if (is_array(
$_POST[
"prtfs"]))
189 foreach (
$_POST[
"prtfs"] as $id)
196 $this->access_handler->removePermission($id);
197 $portfolio->delete();
203 $ilCtrl->redirect($this,
"show");
218 $ilUser->setPref(
"public_profile",
"n");
219 $ilUser->writePrefs();
224 $ilCtrl->redirect($this,
"show");
239 if($this->access_handler->hasRegisteredPermission($prtf_id) ||
240 $this->access_handler->hasGlobalPermission($prtf_id))
245 $ilCtrl->setParameter($this,
"prt_id", $prtf_id);
247 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
249 $cgui->setFormAction($ilCtrl->getFormAction($this));
250 $cgui->setHeaderText($lng->txt(
"prtf_set_default_publish_confirmation"));
251 $cgui->setCancel($lng->txt(
"yes"),
"setDefaultGlobal");
252 $cgui->setConfirm($lng->txt(
"no"),
"setDefaultRegistered");
254 $tpl->setContent($cgui->getHTML());
258 $ilCtrl->redirect($this,
"show");
271 $ilCtrl->redirect($this,
"show");
284 $ilCtrl->redirect($this,
"show");
294 if($this->access_handler->hasGlobalPermission($a_prtf_id))
296 $ilUser->setPref(
"public_profile",
"g");
297 $ilUser->writePrefs();
299 else if($this->access_handler->hasRegisteredPermission($a_prtf_id))
301 $ilUser->setPref(
"public_profile",
"y");
302 $ilUser->writePrefs();
311 $ilCtrl->redirect($this,
"show");
326 global
$tpl, $ilTabs;
328 $ilTabs->activateTab(
"otpf");
330 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceShareTableGUI.php";
332 $tpl->setContent($tbl->getHTML());
337 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceShareTableGUI.php";
340 $tbl->writeFilterToSession();
347 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.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
confirmPortfolioDeletion()
Access handler for portfolio.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Confirmation screen class.
setDefaultConfirmation()
Confirm sharing when setting default.
showOther($a_load_data=true)