4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
26 return array(
"4.1.0");
29 return array(
"4.1.0");
42 return "http://www.ilias.de/xml/Modules/Session/".$a_entity;
51 protected function getTypes($a_entity, $a_version)
53 if ($a_entity ==
"sess")
61 "Description" =>
"text",
63 "TutorName" =>
"text",
64 "TutorEmail" =>
"text",
65 "TutorPhone" =>
"text",
67 "Registration" =>
"integer",
68 "EventStart" =>
"text",
70 "StartingTime" =>
"integer",
71 "EndingTime" =>
"integer",
72 "Fulltime" =>
"integer"
77 if ($a_entity ==
"sess_item")
83 "SessionId" =>
"integer",
97 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
101 if (!is_array($a_ids))
103 $a_ids = array($a_ids);
106 if ($a_entity ==
"sess")
112 " location, tutor_name, tutor_email, tutor_phone, details, registration, ".
113 " e_start event_start, e_end event_end, starting_time, ending_time, fulltime ".
114 " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) ".
115 " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) ".
117 $ilDB->in(
"ev.obj_id", $a_ids,
false,
"integer"));
122 if ($a_entity ==
"sess_item")
128 " FROM event_items ".
130 $ilDB->in(
"event_id", $a_ids,
false,
"integer"));
145 if ($a_entity ==
"sess")
148 if(!$a_set[
"Fulltime"])
156 if ($a_entity ==
"sess_item")
175 "sess_item" => array(
"ids" => $a_rec[
"Id"])
189 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
194 include_once(
"./Modules/Session/classes/class.ilObjSession.php");
195 include_once(
"./Modules/Session/classes/class.ilSessionAppointment.php");
197 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'Id']))
204 $newObj->setType(
"sess");
205 $newObj->create(
true);
207 $newObj->setTitle($a_rec[
"Title"]);
208 $newObj->setDescription($a_rec[
"Description"]);
209 $newObj->setLocation($a_rec[
"Location"]);
210 $newObj->setName($a_rec[
"TutorName"]);
211 $newObj->setPhone($a_rec[
"TutorPhone"]);
212 $newObj->setEmail($a_rec[
"TutorEmail"]);
213 $newObj->setDetails($a_rec[
"Details"]);
214 $newObj->enableRegistration($a_rec[
"Registration"]);
222 $app->setStart($a_rec[
"EventStart"]);
223 $app->setEnd($a_rec[
"EventEnd"]);
226 $app->toggleFullTime($a_rec[
"Fulltime"]);
227 $app->setSessionId($newObj->getId());
233 $this->current_obj = $newObj;
234 $a_mapping->addMapping(
"Modules/Session",
"sess", $a_rec[
"Id"], $newObj->getId());
240 if($obj_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'ItemId']))
243 include_once
'./Modules/Session/classes/class.ilEventItems.php';