4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
23 return array(
"4.1.0");
34 return "http://www.ilias.de/xml/Modules/Session/".$a_entity;
43 protected function getTypes($a_entity, $a_version)
45 if ($a_entity ==
"sess")
53 "Description" =>
"text",
55 "TutorName" =>
"text",
56 "TutorEmail" =>
"text",
57 "TutorPhone" =>
"text",
59 "Registration" =>
"integer",
60 "EventStart" =>
"text",
62 "StartingTime" =>
"integer",
63 "EndingTime" =>
"integer",
64 "Fulltime" =>
"integer"
69 if ($a_entity ==
"sess_item")
75 "SessionId" =>
"integer",
89 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
93 if (!is_array($a_ids))
95 $a_ids = array($a_ids);
98 if ($a_entity ==
"sess")
104 " location, tutor_name, tutor_email, tutor_phone, details, registration, ".
105 " e_start event_start, e_end event_end, starting_time, ending_time, fulltime ".
106 " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) ".
107 " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) ".
109 $ilDB->in(
"ev.obj_id", $a_ids,
false,
"integer"));
114 if ($a_entity ==
"sess_item")
120 " FROM event_items ".
122 $ilDB->in(
"event_id", $a_ids,
false,
"integer"));
137 if ($a_entity ==
"sess")
140 if(!$a_set[
"Fulltime"])
148 if ($a_entity ==
"sess_item")
167 "sess_item" => array(
"ids" => $a_rec[
"Id"])
181 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
186 include_once(
"./Modules/Session/classes/class.ilObjSession.php");
187 include_once(
"./Modules/Session/classes/class.ilSessionAppointment.php");
189 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'Id']))
196 $newObj->setType(
"sess");
197 $newObj->create(
true);
199 $newObj->setTitle($a_rec[
"Title"]);
200 $newObj->setDescription($a_rec[
"Description"]);
201 $newObj->setLocation($a_rec[
"Location"]);
202 $newObj->setName($a_rec[
"TutorName"]);
203 $newObj->setPhone($a_rec[
"TutorPhone"]);
204 $newObj->setEmail($a_rec[
"TutorEmail"]);
205 $newObj->setDetails($a_rec[
"Details"]);
206 $newObj->enableRegistration($a_rec[
"Registration"]);
214 $app->setStart($a_rec[
"EventStart"]);
215 $app->setEnd($a_rec[
"EventEnd"]);
218 $app->toggleFullTime($a_rec[
"Fulltime"]);
219 $app->setSessionId($newObj->getId());
225 $this->current_obj = $newObj;
226 $a_mapping->addMapping(
"Modules/Session",
"sess", $a_rec[
"Id"], $newObj->getId());
232 if($obj_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'ItemId']))
235 include_once
'./Modules/Session/classes/class.ilEventItems.php';