Help for restoring associations with course_modules

Help for restoring associations with course_modules

by Valery Fremaux -
Number of replies: 0

Hi,

the problem is :

I've got a module that performes its own restore as required :

  • restores main record (mymodule table)
  • restores linked sub-records (other mymodule_tables)
  • remaps some foreign key from sub-records to newer records (users, mymodule new instance)

Now I need to remap references to some course_modules within the course, potentially inserted after this module in the course sequence. I need also to grep/replace some known expression within the content of restored resources in the course.

The fear I have is that the backup_ids table do not already have the new ids for these course_modules, nor can be aware of the future renumbering of resources.

Does someone have any strategy for this ? Is it reasonable to make changes directly in $info extraction array ? Should we rely on a "post processing" of the course information using a cron job ?

Average of ratings: -