4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
25 return array(
"4.3.0");
36 return "http://www.ilias.de/xml/Services/Notes/".$a_entity;
45 protected function getTypes($a_entity, $a_version)
48 if ($a_entity ==
"user_notes")
55 "RepObjId" =>
"integer",
60 "Author" =>
"integer",
61 "CreationDate" =>
"timestamp",
65 "NoRepository" =>
"integer"
77 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
81 if (!is_array($a_ids))
83 $a_ids = array($a_ids);
87 if ($a_entity ==
"user_notes")
93 " author, note_text, creation_date, label, subject, no_repository ".
96 $ilDB->in(
"author", $a_ids,
false,
"integer").
97 " AND obj_type = ".$ilDB->quote(
"pd" ,
"text"));
122 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
127 $usr_id = $a_mapping->getMapping(
"Services/User",
"usr", $a_rec[
"Author"]);
130 include_once(
"./Services/Notes/classes/class.ilNote.php");
134 if ((
int) $a_rec[
"RepObjId"] == 0 &&
135 $a_rec[
"ObjId"] == $a_rec[
"Author"] &&
137 $a_rec[
"ObjType"] ==
"pd")
140 $note->setObject(
"pd", 0, $usr_id);
142 $note->setAuthor($usr_id);
143 $note->setText($a_rec[
"NoteText"]);
144 $note->setSubject($a_rec[
"Subject"]);
145 $note->setCreationDate($a_rec[
"CreationDate"]);
146 $note->setLabel($a_rec[
"Label"]);