Adding custom fields in question to display on quiz page?

Adding custom fields in question to display on quiz page?

by Advait Nandeshwar -
Number of replies: 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.

Average of ratings: -
In reply to Advait Nandeshwar

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

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 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)
In reply to Tim Hunt

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

by 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.
Average of ratings: Useful (1)