/** * Import record * * @param * @return */ function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version) { //echo $a_entity; //var_dump($a_rec); switch ($a_entity) { case "rating_category": if ($parent_id = $a_mapping->getMapping('Services/Rating', 'rating_category_parent_id', $a_rec['ParentId'])) { include_once "./Services/Rating/classes/class.ilRatingCategory.php"; $newObj = new ilRatingCategory(); $newObj->setParentId($parent_id); $newObj->save(); $newObj->setTitle($a_rec["Title"]); $newObj->setDescription($a_rec["Description"]); $newObj->setPosition($a_rec["Pos"]); $newObj->update(); } break; } }