4include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
 
   23                return array(
"4.1.0", 
"5.0.0", 
"5.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" 
   70                                                        "Description" => 
"text",
 
   72                                                        "TutorName" => 
"text",
 
   73                                                        "TutorEmail" => 
"text",
 
   74                                                        "TutorPhone" => 
"text",
 
   76                                                        "Registration" => 
"integer",
 
   77                                                        "EventStart" => 
"text",
 
   79                                                        "StartingTime" => 
"integer",
 
   80                                                        "EndingTime" => 
"integer",
 
   81                                                        "Fulltime" => 
"integer",
 
   82                                                        "LimitedRegistration" => 
"integer",
 
   83                                                        "WaitingList" => 
"integer",
 
   84                                                        "LimitUsers" => 
"integer" 
   90                                                "Description" => 
"text",
 
   92                                                "TutorName" => 
"text",
 
   93                                                "TutorEmail" => 
"text",
 
   94                                                "TutorPhone" => 
"text",
 
   96                                                "Registration" => 
"integer",
 
   97                                                "EventStart" => 
"text",
 
   99                                                "StartingTime" => 
"integer",
 
  100                                                "EndingTime" => 
"integer",
 
  101                                                "Fulltime" => 
"integer",
 
  102                                                "LimitedRegistration" => 
"integer",
 
  103                                                "WaitingList" => 
"integer",
 
  104                                                "AutoWait" => 
"integer",
 
  105                                                "LimitUsers" => 
"integer",
 
  106                                                "MinUsers" => 
"integer" 
  111                if ($a_entity == 
"sess_item")
 
  119                                                "SessionId" => 
"integer",
 
  133        function readData($a_entity, $a_version, $a_ids, $a_field = 
"")
 
  137                if (!is_array($a_ids))
 
  139                        $a_ids = array($a_ids);
 
  142                if ($a_entity == 
"sess")
 
  148                                                " location, tutor_name, tutor_email, tutor_phone, details, registration, ".
 
  149                                                " e_start event_start, e_end event_end, starting_time, ending_time, fulltime ".
 
  150                                                " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) ".
 
  151                                                " JOIN event_appointment ea ON (ev.obj_id = ea.event_id)  ".
 
  153                                                $ilDB->in(
"ev.obj_id", $a_ids, 
false, 
"integer"));
 
  157                                                        " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, ".
 
  158                                                        " reg_limited limited_registration, reg_waiting_list waiting_list, ".
 
  159                                                        " reg_limit_users limit_users, ".
 
  160                                                        " e_start event_start, e_end event_end, starting_time, ending_time, fulltime ".
 
  161                                                        " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) ".
 
  162                                                        " JOIN event_appointment ea ON (ev.obj_id = ea.event_id)  ".
 
  163                                                        " JOIN object_description odes ON (ev.obj_id = odes.obj_id) ".
 
  165                                                        $ilDB->in(
"ev.obj_id", $a_ids, 
false, 
"integer"));
 
  169                                                " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, ".
 
  170                                                " reg_limited limited_registration, reg_waiting_list waiting_list, reg_auto_wait auto_wait, ".
 
  171                                                " reg_limit_users limit_users, reg_min_users min_users, ".
 
  172                                                " e_start event_start, e_end event_end, starting_time, ending_time, fulltime ".
 
  173                                                " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) ".
 
  174                                                " JOIN event_appointment ea ON (ev.obj_id = ea.event_id)  ".
 
  175                                                " JOIN object_description odes ON (ev.obj_id = odes.obj_id) ".
 
  177                                                $ilDB->in(
"ev.obj_id", $a_ids, 
false, 
"integer"));
 
  182                if ($a_entity == 
"sess_item")
 
  190                                                " FROM event_items ".
 
  192                                                $ilDB->in(
"event_id", $a_ids, 
false, 
"integer"));
 
  207                if ($a_entity == 
"sess")
 
  210                        if(!$a_set[
"Fulltime"])
 
  213                                #$start = new ilDateTime($a_set["EventStart"], IL_CAL_DATETIME);
 
  214                                #$a_set["EventStart"] = $start->get(IL_CAL_DATETIME,'','UTC');
 
  215                                #$end = new ilDateTime($a_set["EventEnd"], IL_CAL_DATETIME);
 
  216                                #$a_set["EventEnd"] = $end->get(IL_CAL_DATETIME,'','UTC');
 
  219                if ($a_entity == 
"sess_item")
 
  238                                        "sess_item" => array(
"ids" => $a_rec[
"Id"])
 
  252        function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 
  257                                include_once(
"./Modules/Session/classes/class.ilObjSession.php");
 
  258                                include_once(
"./Modules/Session/classes/class.ilSessionAppointment.php");
 
  260                                if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'Id']))
 
  267                                        $newObj->setType(
"sess");
 
  268                                        $newObj->create(
true);
 
  270                                $newObj->setTitle($a_rec[
"Title"]);
 
  271                                $newObj->setDescription($a_rec[
"Description"]);
 
  272                                $newObj->setLocation($a_rec[
"Location"]);
 
  273                                $newObj->setName($a_rec[
"TutorName"]);
 
  274                                $newObj->setPhone($a_rec[
"TutorPhone"]);
 
  275                                $newObj->setEmail($a_rec[
"TutorEmail"]);
 
  276                                $newObj->setDetails($a_rec[
"Details"]);
 
  278                                switch ($a_schema_version)
 
  282                                                $newObj->setRegistrationType($a_rec[
"Registration"]);
 
  284                                                $newObj->enableRegistrationUserLimit($a_rec[
"LimitedRegistration"]);
 
  285                                                $newObj->setRegistrationMaxUsers($a_rec[
"LimitUsers"]);
 
  286                                                $newObj->enableRegistrationWaitingList($a_rec[
"WaitingList"]);
 
  288                                                if(isset($a_rec[
"MinUsers"])) {
 
  289                                                        $newObj->setRegistrationMinUsers($a_rec[
"MinUsers"]);
 
  292                                                if(isset($a_rec[
"AutoWait"])) {
 
  293                                                        $newObj->setWaitingListAutoFill($a_rec[
"AutoWait"]);
 
  305                                $app->setStart($a_rec[
"EventStart"]);
 
  306                                $app->setEnd($a_rec[
"EventEnd"]);
 
  309                                $app->toggleFullTime($a_rec[
"Fulltime"]);
 
  310                                $app->setSessionId($newObj->getId());
 
  316                                $this->current_obj = $newObj;
 
  317                                $a_mapping->addMapping(
"Modules/Session", 
"sess", $a_rec[
"Id"], $newObj->getId());
 
  323                                if($obj_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'ItemId']))
 
  326                                        include_once 
'./Modules/Session/classes/class.ilEventItems.php';
 
An exception for terminatinating execution or to throw for unit testing.
A dataset contains in data in a common structure that can be shared and transformed for different pur...
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true, $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
@classDescription Date and time handling
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupObjId($a_id)
static _getAllReferences($a_id)
get all reference ids of object
class ilSessionAppointment
getTypes($a_entity, $a_version)
Get field types for entity.
getSupportedVersions()
Get supported versions.
readData($a_entity, $a_version, $a_ids, $a_field="")
Read data.
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Determine the dependent sets of data.
getXmlRecord($a_entity, $a_version, $a_set)
Get xml record (export)
getXmlNamespace($a_entity, $a_schema_version)
Get xml namespace.
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
Import record.