-
Notifications
You must be signed in to change notification settings - Fork 498
MDL-83541 Add qtype restore code documentation #1280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDL-83541 Add qtype restore code documentation #1280
Conversation
✅ Deploy Preview for moodledevdocs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
e75d180 to
5722e90
Compare
|
Thanks Mark. That looks like a really good new docs page. The only bit I don't really like is the use of $name for the plugin name. Is this a convention used elsewhere in the docs? I managed to avoid it comletely on https://moodledev.io/docs/5.0/apis/plugintypes/qtype/newquestiondefaults. On https://moodledev.io/docs/5.0/apis/plugintypes/qbank/filters we use qbank_myplugin. Up to you to make a final call. |
|
I'd also second not making this a var. Another option would be to use a placeholder: In your `restore_qtype_<name>_plugin` class, add an override of the `remove_excluded_question_data()` method, which removes this |
|
I like Andrew's suggestion. Feel free to updated qbank/filters while you are at it Mark (he suggested cheekily :-)) |
5722e90 to
9b6f5e6
Compare
|
Thanks, Mark |
|
I have rebased the branch, and the failures are gone! |
|
Hi @marxjohnson, We’ve developed three new question types, and when I run the unit test located at mod/quiz/tests/backup/repeated_restore_test.php, no errors are reported — even though we added an additional path to the $paths[] array in the define_question_plugin_structure() method. My question is: should we still apply the changes described in this documentation, even if no errors are currently detected? |
This describes the required updates to qtype plugins following to implementation of MDL-83541 to avoid duplication of questions during restores.