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"])
143 #$start = new ilDateTime($a_set["EventStart"], IL_CAL_DATETIME);
144 #$a_set["EventStart"] = $start->get(IL_CAL_DATETIME,'','UTC');
145 #$end = new ilDateTime($a_set["EventEnd"], IL_CAL_DATETIME);
146 #$a_set["EventEnd"] = $end->get(IL_CAL_DATETIME,'','UTC');
149 if ($a_entity ==
"sess_item")
168 "sess_item" => array(
"ids" => $a_rec[
"Id"])
182 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
187 include_once(
"./Modules/Session/classes/class.ilObjSession.php");
188 include_once(
"./Modules/Session/classes/class.ilSessionAppointment.php");
190 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'Id']))
197 $newObj->setType(
"sess");
198 $newObj->create(
true);
200 $newObj->setTitle($a_rec[
"Title"]);
201 $newObj->setDescription($a_rec[
"Description"]);
202 $newObj->setLocation($a_rec[
"Location"]);
203 $newObj->setName($a_rec[
"TutorName"]);
204 $newObj->setPhone($a_rec[
"TutorPhone"]);
205 $newObj->setEmail($a_rec[
"TutorEmail"]);
206 $newObj->setDetails($a_rec[
"Details"]);
207 $newObj->enableRegistration($a_rec[
"Registration"]);
215 $app->setStart($a_rec[
"EventStart"]);
216 $app->setEnd($a_rec[
"EventEnd"]);
219 $app->toggleFullTime($a_rec[
"Fulltime"]);
220 $app->setSessionId($newObj->getId());
226 $this->current_obj = $newObj;
227 $a_mapping->addMapping(
"Modules/Session",
"sess", $a_rec[
"Id"], $newObj->getId());
233 if($obj_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'ItemId']))
236 include_once
'./Modules/Session/classes/class.ilEventItems.php';