Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6586

Custom mod's restore broken after 2.5.3 upgrade

$
0
0
by Matt Burica.  

I have a custom module that was working fine on 2.2.3. After an upgrade to 2.5.3 my restore for a certain part is no longer functioning.

I have a table that contains a cmid as a reference to the module that I am setting a date for.

I use the after_restore() function to get the mapping for the new cmid.

Since the update my cmid mapping is coming back as Null.

Was wondering if anyone knew of anything that changed with the get_mapping in 2.5 that could be causing this.

This is the line I am using to get the new cmid with get_mapping:

$newcm = restore_structure_step::get_mapping('course_module', $info->cmid);

Then I just update the cmid in the record that was restored:

$info->cmid = $newcm->newitemid;

$DB->update_record('duedate_info', $info);

Any advice or insight would be welcome


Viewing all articles
Browse latest Browse all 6586

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>