4 require_once
"Modules/Portfolio/classes/class.ilObjPortfolioBase.php";
34 $this->
default = (bool)$a_value;
76 include_once
"Modules/Portfolio/classes/class.ilPortfolioPage.php";
78 foreach($pages as $page)
81 $page_obj->setPortfolioId($this->
id);
102 foreach(self::getPortfoliosOfUser($a_user_id) as $item)
104 $all[] = $item[
"id"];
108 $ilDB->manipulate(
"UPDATE usr_portfolio".
109 " SET is_default = ".$ilDB->quote(
false,
"integer").
110 " WHERE ".$ilDB->in(
"id", $all,
"",
"integer"));
115 $ilDB->manipulate(
"UPDATE usr_portfolio".
116 " SET is_default = ".$ilDB->quote(
true,
"integer").
117 " WHERE id = ".$ilDB->quote($a_portfolio_id,
"integer"));
131 $set = $ilDB->query(
"SELECT up.*,od.title,od.description".
132 " FROM usr_portfolio up".
133 " JOIN object_data od ON (up.id = od.obj_id)".
134 " WHERE od.owner = ".$ilDB->quote($a_user_id,
"integer").
135 " AND od.type = ".$ilDB->quote(
"prtf",
"text").
136 " ORDER BY od.title");
138 while ($rec = $ilDB->fetchAssoc($set))
155 if(!$ilSetting->get(
'user_portfolios'))
160 $set = $ilDB->query(
"SELECT up.id FROM usr_portfolio up".
161 " JOIN object_data od ON (up.id = od.obj_id)".
162 " WHERE od.owner = ".$ilDB->quote($a_user_id,
"integer").
163 " AND up.is_default = ".$ilDB->quote(1,
"integer"));
164 $res = $ilDB->fetchAssoc($set);
178 $all = self::getPortfoliosOfUser($a_user_id);
181 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
184 foreach($all as $item)
186 $access_handler->removePermission($item[
"id"]);
188 $portfolio =
new self($item[
"id"],
false);
189 $portfolio->delete();
198 parent::deleteImage();
205 if(parent::uploadImage($a_upload))
215 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
227 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
236 include_once
"Services/Link/classes/class.ilLink.php";
237 foreach($access_handler->getShardObjectsDataForUserIds($a_owner_ids) as $owner_id => $items)
static getAllPortfolioPages($a_portfolio_id)
Get pages of portfolio.
setDefault($a_value)
Set default.
doReadCustom(array $a_row)
uploadImage(array $a_upload)
doUpdateCustom(array &$a_fields)
static getPortfoliosOfUser($a_user_id)
Get views of user.
static initStorage($a_id, $a_subdir=null)
Init file system storage.
static setUserDefault($a_user_id, $a_portfolio_id=null)
Set the user default portfolio.
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, $a_back_url=null)
Create styles array
The data for the language used.
static dirsize($directory)
get size of a directory or a file.
static handleUpdatedSourceObject($a_src_obj_type, $a_src_obj_id, $a_src_filesize, $a_owner_obj_ids=null, $a_is_prtf=false)
Find and update/create all related entries for source object.
Access handler for portfolio.
static getDefaultPortfolio($a_user_id)
Get default portfolio of user.
static deleteUserPortfolios($a_user_id)
Delete all portfolio data for user.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")