I'm developing backup/restore for custom activity in Moodle 2.6 for collaborative work. This activity refers to 2 other activites (chat and forum) that exists in the course, so there are links to these activities inside of my activity. For both activities I have a a table that keeps a record in the form
(id, project_id, chat_id, chat_cm, forum_id, forum_mod)
Chat and Forum activities are restored by default restore features, but I'm not sure how to match that again to my restored activity, since ids are changed and I can't create mapppings to new ids as my restore code is not handling it.
I've tried something like this
$data->chat_id=$this->get_mappingid('chat',$data->chat_id);but it doesn't work seems chat and forum mappings are not set in core code.
$data->forum_id=$this->get_mappingid('forum',$data->forum_id);
Is there any solution to provide these mappings without changing the core code?
Thanks,
Zoran