How to import questions with custom fields?

How to import questions with custom fields?

by wz z -
Number of replies: 6

I created a dropdown custom field of difficulty for questions on page /question/bank/customfields/customfield.php

But I don't know how to import the custom field value in Moodle XML file. I mannually set the value for the custom field of a question, then exported it in Moodle XML format, however, there was no related information of the custom field in the file.

Average of ratings: -
In reply to wz z

Re: How to import questions with custom fields?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Custom fields are not currently included in the import/export. Obviously, they should be, but no one has had time to fix it yet. Sorry.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: How to import questions with custom fields?

by wz z -
Thank you for letting me know, Tim.
In reply to Tim Hunt

Re: How to import questions with custom fields?

by Coral Zawadzki -
Hi Tim. Is this still the case now? Would be good to mention in my training if so.
In reply to Coral Zawadzki

Re: How to import questions with custom fields?

by Eoin Campbell -
Picture of Core developers Picture of Plugin developers
It seems to me that for question meta-information of this nature ("Difficulty", "Blooms taxonomy", "Subject", etc.), it would be better to use the standard question Tags facility rather than defining custom fields. The Tags are searchable in the Question selection user interface.
Average of ratings: Useful (3)
In reply to Coral Zawadzki

Re: How to import questions with custom fields?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think that no work has been done on it. I think there is not even an issue for it in the Moodle bug tracker. ... OK, so I just created MDL-78520. This needs to be sorted out, but not sure when someone will get the time to look at it.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: How to import questions with custom fields?

by Coral Zawadzki -
Thanks Tim. I will keep an eye out for any updates there.