4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
28 return array(
"4.4.0",
"5.0.0");
36 return "http://www.ilias.de/xml/Modules/Portfolio/" . $a_entity;
42 protected function getTypes($a_entity, $a_version)
44 if ($a_entity ==
"prtt") {
51 "Description" =>
"text",
52 "Comments" =>
"integer",
54 "FontColor" =>
"text",
62 if ($a_entity ==
"portfolio_page") {
68 "PortfolioId" =>
"integer",
70 "OrderNr" =>
"integer",
83 public function readData($a_entity, $a_version, $a_ids, $a_field =
"")
87 if (!is_array($a_ids)) {
88 $a_ids =
array($a_ids);
91 if ($a_entity ==
"prtt") {
95 "prtf.comments,prtf.bg_color,prtf.font_color,prtf.img,prtf.ppic" .
96 " FROM usr_portfolio prtf" .
97 " JOIN object_data od ON (od.obj_id = prtf.id)" .
98 " WHERE " .
$ilDB->in(
"prtf.id", $a_ids,
false,
"integer") .
99 " AND od.type = " .
$ilDB->quote(
"prtt",
"text"));
104 "prtf.bg_color,prtf.font_color,prtf.img,prtf.ppic" .
105 " FROM usr_portfolio prtf" .
106 " JOIN object_data od ON (od.obj_id = prtf.id)" .
107 " WHERE " .
$ilDB->in(
"prtf.id", $a_ids,
false,
"integer") .
108 " AND od.type = " .
$ilDB->quote(
"prtt",
"text"));
113 if ($a_entity ==
"portfolio_page") {
114 switch ($a_version) {
118 " FROM usr_portfolio_page" .
119 " WHERE " .
$ilDB->in(
"portfolio_id", $a_ids,
false,
"integer"));
133 "portfolio_page" =>
array(
"ids" => $a_rec[
"Id"])
147 if ($a_entity ==
"prtt") {
148 include_once(
"./Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php");
150 $a_set[
"Dir"] = $dir;
152 include_once(
"./Services/Notes/classes/class.ilNote.php");
165 public function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
169 include_once(
"./Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php");
172 if ($new_id = $a_mapping->getMapping(
"Services/Container",
"objs", $a_rec[
"Id"])) {
179 $newObj->setTitle($a_rec[
"Title"]);
180 $newObj->setDescription($a_rec[
"Description"]);
181 $newObj->setPublicComments($a_rec[
"Comments"]);
182 $newObj->setBackgroundColor($a_rec[
"BgColor"]);
183 $newObj->setFontColor($a_rec[
"FontColor"]);
184 $newObj->setProfilePicture($a_rec[
"Ppic"]);
185 $newObj->setImage($a_rec[
"Img"]);
190 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
198 $a_mapping->addMapping(
"Modules/Portfolio",
"prtt", $a_rec[
"Id"], $newObj->getId());
199 $a_mapping->addMapping(
"Services/Object",
"obj", $a_rec[
"Id"], $newObj->getId());
202 case "portfolio_page":
203 $prtt_id = (int) $a_mapping->getMapping(
"Modules/Portfolio",
"prtt", $a_rec[
"PortfolioId"]);
205 include_once(
"./Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php");
207 $newObj->setPortfolioId($prtt_id);
208 $newObj->setTitle($a_rec[
"Title"]);
209 $newObj->setType($a_rec[
"Type"]);
210 $newObj->setOrderNr($a_rec[
"OrderNr"]);
211 $newObj->create(
true);
213 $a_mapping->addMapping(
"Services/COPage",
"pg",
"prtt:" . $a_rec[
"Id"],
"prtt:" . $newObj->getId());
getXmlRecord($a_entity, $a_version, $a_set)
Get xml record.
getTypes($a_entity, $a_version)
Get field types for entity.
readData($a_entity, $a_version, $a_ids, $a_field="")
Read data.
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true, $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static initStorage($a_id, $a_subdir=null)
Init file system storage.
Portfolio Data set class.
getImportDirectory()
Get import directory.
getXmlNamespace($a_entity, $a_schema_version)
Get xml namespace.
Page for portfolio template.
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Determine the dependent sets of data.
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
Import record.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
getSupportedVersions()
Get supported versions.
static commentsActivated($a_rep_obj_id, $a_obj_id, $a_obj_type)
Are comments activated for object?
A dataset contains in data in a common structure that can be shared and transformed for different pur...