/**
  * Get current id for an import id
  *
  * @param	string		$a_type			target type ("PageObject" | "StructureObject" |
  *										"GlossaryItem" | "MediaObject")
  * @param	string		$a_target		import target id (e.g. "il_2_pg_22")
  *
  * @return	string		current target id (e.g. "il__pg_244")
  */
 function _getIdForImportId($a_type, $a_target)
 {
     switch ($a_type) {
         case "PageObject":
             $id = ilLMObject::_getIdForImportId($a_target);
             if ($id > 0) {
                 return "il__pg_" . $id;
             }
             break;
         case "StructureObject":
             $id = ilLMObject::_getIdForImportId($a_target);
             if ($id > 0) {
                 return "il__st_" . $id;
             }
             break;
         case "GlossaryItem":
             $id = ilGlossaryTerm::_getIdForImportId($a_target);
             if ($id > 0) {
                 return "il__git_" . $id;
             }
             break;
         case "WikiPage":
             // no import IDs for wiki pages (yet)
             //$id = ilGlossaryTerm::_getIdForImportId($a_target);
             $id = 0;
             if ($id > 0) {
                 return "il__wpage_" . $id;
             }
             break;
         case "MediaObject":
             $id = ilObjMediaObject::_getIdForImportId($a_target);
             if ($id > 0) {
                 return "il__mob_" . $id;
             }
             break;
         case "RepositoryItem":
             $tarr = explode("_", $a_target);
             $import_id = $a_target;
             // if a ref id part is given, strip this
             // since this will not be part of an import id
             if ($tarr[4] != "") {
                 $import_id = $tarr[0] . "_" . $tarr[1] . "_" . $tarr[2] . "_" . $tarr[3];
             }
             if (ilInternalLink::_extractInstOfTarget($a_target) == IL_INST_ID && IL_INST_ID > 0) {
                 // does it have a ref id part?
                 if ($tarr[4] != "") {
                     return "il__obj_" . $tarr[4];
                 }
             }
             $id = ilObject::_getIdForImportId($import_id);
             //echo "-$a_target-$id-";
             // get ref id for object id
             // (see ilPageObject::insertInstIntoIDs for the export procedure)
             if ($id > 0) {
                 $refs = ilObject::_getAllReferences($id);
                 //var_dump($refs);
                 foreach ($refs as $ref) {
                     return "il__obj_" . $ref;
                 }
             }
             break;
     }
     return false;
 }
 /**
  * get current id for an import id
  *
  * @param	string		$a_type			target type ("PageObject" | "StructureObject" |
  *										"GlossaryItem" | "MediaObject")
  * @param	string		$a_target		import target id (e.g. "il_2_pg_22")
  *
  * @return	string		current target id (e.g. "il__pg_244")
  */
 function _getIdForImportId($a_type, $a_target)
 {
     switch ($a_type) {
         case "PageObject":
             $id = ilLMObject::_getIdForImportId($a_target);
             if ($id > 0) {
                 return "il__pg_" . $id;
             }
             break;
         case "StructureObject":
             $id = ilLMObject::_getIdForImportId($a_target);
             if ($id > 0) {
                 return "il__st_" . $id;
             }
             break;
         case "GlossaryItem":
             $id = ilGlossaryTerm::_getIdForImportId($a_target);
             if ($id > 0) {
                 return "il__git_" . $id;
             }
             break;
         case "MediaObject":
             $id = ilObjMediaObject::_getIdForImportId($a_target);
             if ($id > 0) {
                 return "il__mob_" . $id;
             }
             break;
         case "RepositoryItem":
             $id = ilObject::_getIdForImportId($a_target);
             //echo "-$a_target-$id-";
             // get ref id for object id
             // (see ilPageObject::insertInstIntoIDs for the export procedure)
             if ($id > 0) {
                 $refs = ilObject::_getAllReferences($id);
                 //var_dump($refs);
                 foreach ($refs as $ref) {
                     return "il__obj_" . $ref;
                 }
             }
             break;
     }
     return false;
 }