Backup plugin development question

Backup plugin development question

by Cameron Smith -
Number of replies: 1
Hi,

I'm new to Moodle and i'm developing a plugin for it. I have a question in relation to the docs that i'm hoping someone can help elaborate.

At the page here: https://docs.moodle.org/dev/Backup_2.0_for_developers#Introduction

At the section: Not needed elements


I'm having a hard time understanding that part. It states that you do not need child references to the parent for example:

choice table:

id (attr)


choice options table:

id (attr)

choiceid (not needed)


choice answers table:

id (attr)

choiceid (not needed)

optionid (needed)


My questions are why do you not need the choiceid in the backup? Wouldn't it fail if those references were not saved? Also, why is the optionid a required field? I don't seem to see the difference?

Can anyone help?

Thanks,

Cameron.

Average of ratings: -
In reply to Cameron Smith

Re: Backup plugin development question

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Moved to the Developer forum in the hope that you find some help there.