Additional difficulty field in all question types

Additional difficulty field in all question types

by Jaime Andrés Sánchez Vélez -
Number of replies: 3

Hi there,

How can i add an additional dropdown field in all the questions types forms. This is an user requirement. Can it be done in a safe way?

Thanks in advance.

Average of ratings: -
In reply to Jaime Andrés Sánchez Vélez

Re: Additional difficulty field in all question types

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It could be done, and is not too dangerous until you want to upgrade do a new version of Moodle.

Well, in Moodle 2.0, you can tag questions, which would be a good way to implement this without any code. Just use tags for the extra information.

But I assume you want to do this in Moodle 1.9.

All the question type forms inherit from question_edit_form, so just add the dropdown there, and add a corresponding column to the mdl_question table. And then arrange to display the information in the extra column in the places you want it to be displayed.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Additional difficulty field in all question types

by Jaime Andrés Sánchez Vélez -

Thank you so much for you help,

I got it working now smile

Greetings.

In reply to Jaime Andrés Sánchez Vélez

Απάντηση: Re: Additional difficulty field in all question types

by Marigianna Skouradaki -

Hello,

I am trying to do the exact same thing. However, I am total new at moodle developing and everything seems chaotic.

would it be possible for you to share the code, or could i have some extended directions?

thank you in advance

Marigianna