4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
 
   26                 return array(
"4.3.0");
 
   34                 return "http://www.ilias.de/xml/Modules/Poll/".$a_entity;
 
   40         protected function getTypes($a_entity, $a_version)
 
   42                 if ($a_entity == 
"poll")
 
   50                                                 "Description" => 
"text",                                        
 
   53                                                 "ViewResults" => 
"integer",
 
   59                 if ($a_entity == 
"poll_answer")
 
   66                                                 "PollId" => 
"integer",
 
   80         function readData($a_entity, $a_version, $a_ids, $a_field = 
"")
 
   84                 if (!is_array($a_ids))
 
   86                         $a_ids = array($a_ids);
 
   89                 if ($a_entity == 
"poll")
 
   95                                                 "pl.question,pl.image,pl.view_results".
 
   97                                                 " JOIN object_data od ON (od.obj_id = pl.id)".
 
   98                                                 " WHERE ".$ilDB->in(
"pl.id", $a_ids, 
false, 
"integer").
 
   99                                                 " AND od.type = ".$ilDB->quote(
"poll", 
"text"));
 
  104                 if ($a_entity == 
"poll_answer")
 
  110                                                 " FROM il_poll_answer WHERE ".
 
  111                                                 $ilDB->in(
"poll_id", $a_ids, 
false, 
"integer"));
 
  126                                         "poll_answer" => array(
"ids" => $a_rec[
"Id"])
 
  140                 if ($a_entity == 
"poll")
 
  142                         include_once(
"./Modules/Poll/classes/class.ilObjPoll.php");
 
  144                         $a_set[
"Dir"] = $dir;
 
  156         function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 
  161                                 include_once(
"./Modules/Poll/classes/class.ilObjPoll.php");
 
  164                                 if($new_id = $a_mapping->getMapping(
"Services/Container", 
"objs", $a_rec[
"Id"]))
 
  174                                 $newObj->setTitle($a_rec[
"Title"]);
 
  175                                 $newObj->setDescription($a_rec[
"Description"]);                                                                                         
 
  176                                 $newObj->setQuestion($a_rec[
"Question"]);                               
 
  177                                 $newObj->setImage($a_rec[
"Image"]);
 
  178                                 $newObj->setViewResults($a_rec[
"ViewResults"]);
 
  184                                         $dir = str_replace(
"..", 
"", $a_rec[
"Dir"]);                                                                            
 
  193                                 $a_mapping->addMapping(
"Modules/Poll", 
"poll", $a_rec[
"Id"], $newObj->getId());
 
  197                                 $poll_id = (int) $a_mapping->getMapping(
"Modules/Poll", 
"poll", $a_rec[
"PollId"]);
 
  201                                         $poll->saveAnswer($a_rec[
"Answer"], $a_rec[
"pos"]);