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")
53 "Description" =>
"text",
54 "Comments" =>
"integer",
56 "FontColor" =>
"text",
64 if ($a_entity ==
"portfolio_page")
72 "PortfolioId" =>
"integer",
74 "OrderNr" =>
"integer",
87 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
91 if (!is_array($a_ids))
93 $a_ids =
array($a_ids);
96 if ($a_entity ==
"prtt")
102 "prtf.comments,prtf.bg_color,prtf.font_color,prtf.img,prtf.ppic".
103 " FROM usr_portfolio prtf".
104 " JOIN object_data od ON (od.obj_id = prtf.id)".
105 " WHERE ".$ilDB->in(
"prtf.id", $a_ids,
false,
"integer").
106 " AND od.type = ".$ilDB->quote(
"prtt",
"text"));
111 "prtf.bg_color,prtf.font_color,prtf.img,prtf.ppic".
112 " FROM usr_portfolio prtf".
113 " JOIN object_data od ON (od.obj_id = prtf.id)".
114 " WHERE ".$ilDB->in(
"prtf.id", $a_ids,
false,
"integer").
115 " AND od.type = ".$ilDB->quote(
"prtt",
"text"));
120 if ($a_entity ==
"portfolio_page")
127 " FROM usr_portfolio_page".
128 " WHERE ".$ilDB->in(
"portfolio_id", $a_ids,
false,
"integer"));
143 "portfolio_page" =>
array(
"ids" => $a_rec[
"Id"])
157 if ($a_entity ==
"prtt")
159 include_once(
"./Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php");
161 $a_set[
"Dir"] = $dir;
163 include_once(
"./Services/Notes/classes/class.ilNote.php");
176 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
181 include_once(
"./Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php");
184 if($new_id = $a_mapping->getMapping(
"Services/Container",
"objs", $a_rec[
"Id"]))
194 $newObj->setTitle($a_rec[
"Title"]);
195 $newObj->setDescription($a_rec[
"Description"]);
196 $newObj->setPublicComments($a_rec[
"Comments"]);
197 $newObj->setBackgroundColor($a_rec[
"BgColor"]);
198 $newObj->setFontColor($a_rec[
"FontColor"]);
199 $newObj->setProfilePicture($a_rec[
"Ppic"]);
200 $newObj->setImage($a_rec[
"Img"]);
206 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
215 $a_mapping->addMapping(
"Modules/Portfolio",
"prtt", $a_rec[
"Id"], $newObj->getId());
216 $a_mapping->addMapping(
"Services/Object",
"obj", $a_rec[
"Id"], $newObj->getId());
219 case "portfolio_page":
220 $prtt_id = (int)$a_mapping->getMapping(
"Modules/Portfolio",
"prtt", $a_rec[
"PortfolioId"]);
223 include_once(
"./Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php");
225 $newObj->setPortfolioId($prtt_id);
226 $newObj->setTitle($a_rec[
"Title"]);
227 $newObj->setType($a_rec[
"Type"]);
228 $newObj->setOrderNr($a_rec[
"OrderNr"]);
229 $newObj->create(
true);
231 $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...