by Pixel Belen.
Using Moodle 4.4, I have a created a local plugin that stores the quiz id to a table quiz_progress. It stores the quiz id in the quizid field.
I am using define_module_plugin_structure() method to define the backup and restore structures.
In the backup class, I set the source table to be
$quizprogress->set_source_table('local_quiz_progress', array('quizid' => backup::VAR_MODID));
But during restore process, when I call the get_mappingid() function to get the new quiz id,
$this->get_mappingid('quiz', $data->quizid);
It always returns FALSE.
It always returns FALSE.
I tried using after_restore_module() but the returned value for the get_mappingid() is still FALSE.
Needs help. Thank you.