4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
28 return array(
"4.4.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")
52 "Description" =>
"text",
53 "Comments" =>
"integer",
55 "FontColor" =>
"text",
63 if ($a_entity ==
"portfolio_page")
70 "PortfolioId" =>
"integer",
72 "OrderNr" =>
"integer",
85 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
89 if (!is_array($a_ids))
91 $a_ids = array($a_ids);
94 if ($a_entity ==
"prtt")
100 "prtf.comments,prtf.bg_color,prtf.font_color,prtf.img,prtf.ppic".
101 " FROM usr_portfolio prtf".
102 " JOIN object_data od ON (od.obj_id = prtf.id)".
103 " WHERE ".$ilDB->in(
"prtf.id", $a_ids,
false,
"integer").
104 " AND od.type = ".$ilDB->quote(
"prtt",
"text"));
109 if ($a_entity ==
"portfolio_page")
115 " FROM usr_portfolio_page".
116 " WHERE ".$ilDB->in(
"portfolio_id", $a_ids,
false,
"integer"));
131 "portfolio_page" => array(
"ids" => $a_rec[
"Id"])
145 if ($a_entity ==
"prtt")
147 include_once(
"./Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php");
149 $a_set[
"Dir"] = $dir;
161 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
166 include_once(
"./Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php");
168 if($new_id = $a_mapping->getMapping(
"Services/Container",
"objs", $a_rec[
"Id"]))
178 $newObj->setTitle($a_rec[
"Title"]);
179 $newObj->setDescription($a_rec[
"Description"]);
180 $newObj->setPublicComments($a_rec[
"Notes"]);
181 $newObj->setBackgroundColor($a_rec[
"BgColor"]);
182 $newObj->setFontColor($a_rec[
"FontColor"]);
183 $newObj->setProfilePicture($a_rec[
"Ppic"]);
184 $newObj->setImage($a_rec[
"Img"]);
190 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
199 $a_mapping->addMapping(
"Modules/Portfolio",
"prtt", $a_rec[
"Id"], $newObj->getId());
202 case "portfolio_page":
203 $prtt_id = (int)$a_mapping->getMapping(
"Modules/Portfolio",
"prtt", $a_rec[
"PortfolioId"]);
206 include_once(
"./Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php");
208 $newObj->setPortfolioId($prtt_id);
209 $newObj->setTitle($a_rec[
"Title"]);
210 $newObj->setType($a_rec[
"Type"]);
211 $newObj->setOrderNr($a_rec[
"OrderNr"]);
212 $newObj->create(
true);
214 $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.
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.
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
Page for portfolio template.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
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.
getSupportedVersions()
Get supported versions.
A dataset contains in data in a common structure that can be shared and transformed for different pur...