Adding custom fields in question to display on quiz page?

Adding custom fields in question to display on quiz page?

بواسطة - Advait Nandeshwar
عدد الردود: 2

Hi,

I'm sorry if this has been asked earlier.

I want to have an additional field named Hint for every question and it should display as the question displays on the quiz page.

In the latest 3.7, Custom Fields API is introduced, since I was not very clear to use the API or not for such case, I didn't focus

Is there anything documented about creating custom fields on activities or is there anyway I can bring up a Hint Box on my quiz page?

Thank you.

Regards.

متوسط التقييمات: -
رداً على Advait Nandeshwar

Re: Adding custom fields in question to display on quiz page?

بواسطة - Tim Hunt
صورة Core developers صورة Documentation writers صورة Particularly helpful Moodlers صورة Peer reviewers صورة Plugin developers
Custom fields in 3.7 was just for courses.

If you always want the hint to appear on the quiz page, why not just adde it to the question text (perhaps with suitable formatting)?

(Or, if you want the hint to appear when the student asks for it, for example by clicking a button, then that is the sort of thing that requires a question behaviour plugin - https://docs.moodle.org/dev/Question_behaviours)
رداً على Tim Hunt

Re: Adding custom fields in question to display on quiz page?

بواسطة - Advait Nandeshwar
Hi Tim,

Thank you for your response.

Yes I am going for that method only but my client wants me to have a different field for that, his reasons are uncertain to me, haha.

I have however made an Excel sheet to create GIFT import code, that may help them to import questions quickly.