Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marxjohnson
Copy link
Contributor

This describes the required updates to qtype plugins following to implementation of MDL-83541 to avoid duplication of questions during restores.

Copy link

netlify bot commented Mar 6, 2025

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9b6f5e6
🔍 Latest deploy log https://app.netlify.com/sites/moodledevdocs/deploys/67cacb3751d3770007b34629
😎 Deploy Preview https://deploy-preview-1280--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@marxjohnson marxjohnson force-pushed the MDL-83541-qtype-restore-changes branch 3 times, most recently from e75d180 to 5722e90 Compare March 6, 2025 14:50
@timhunt
Copy link
Collaborator

timhunt commented Mar 6, 2025

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.

@andrewnicols
Copy link
Member

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

@timhunt
Copy link
Collaborator

timhunt commented Mar 7, 2025

I like Andrew's suggestion. Feel free to updated qbank/filters while you are at it Mark (he suggested cheekily :-))

@marxjohnson marxjohnson force-pushed the MDL-83541-qtype-restore-changes branch from 5722e90 to 9b6f5e6 Compare March 7, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants