I have to develop a question , where a single question would have 2 true and false sub questions , and a multichoice question. Any ideas how can I go about this ?
I have to develop a question , where a single question would have 2 true and false sub questions , and a multichoice question. Any ideas how can I go about this ?
Re: Question about question types - multianswer / multichoice
Does the documentation on Multiple Choice question type help?
Re: Question about question types - multianswer / multichoice
I was asking from a developer perspective, I guess if we select multiple answers are allowed it uses the other table other than mdl_question_answer . I was wondering why do we have two separate folders in the question/type
Re: Question about question types - multianswer / multichoice
question/type/multichoice is the multiple choice question type. (Where the right answer can either involve selecting one, or many, choice.
question/type/multianswer is called the Embedded answer (Cloze) question type in the user interface.
Re: Question about question types - multianswer / multichoice
Thank you Tim,
Any suggestion on the first part, I see a similar plugin by OU https://docs.moodle.org/25/en/Combined_question_type but in my case I need to develop a question which will have fixed sub questions , even the text of these options is fixed, Basically the question text changes but all the options remain the same. How do you suggest will be the best way to go forward.
Re: Question about question types - multianswer / multichoice
Probably the simplest way to automate it a bit it to use Export and Import in the question bank.
- Create one question in Moodle with all the answers you want.
- Export it to a file (Moodle XML or GIFT).
- Edit that file in your text editor, and make many copies of the question. Change the question text in each copy, but leave the rest the same.
- Import the edited file.
An even more advanced option would be to create a custom question type plugin, but that is probably overkill.
Re: Question about question types - multianswer / multichoice
I need to go for the overkill thats what I was hired for . Made some progress thankfully , I just hope I am able to do it .
Thanks for your help
Re: Question about question types - multianswer / multichoice
There are some examples of question type plugins that inherit from qtype_multichoice, e.g.
- https://moodle.org/plugins/view.php?plugin=qtype_oumultiresponse
- https://moodle.org/plugins/view.php?plugin=qtype_multichoiceset
Try looking at the code for those.
Also, the docs for creating a question type plugin are at https://docs.moodle.org/dev/Question_types
Re: Question about question types - multianswer / multichoice
I need some help again, I tried looking a lot but couldn't find a question type that uses two different input elements . in my case I have to use 9 check boxes and 2 dropdowns . Your code for oucombined type question is good but I cannot use subquestions since I have to do it in one question itself . Any help would be appreciated on how do I modify the renderer.php
Re: Question about question types - multianswer / multichoice
Re: Question about question types - multianswer / multichoice
Re: Question about question types - multianswer / multichoice
Re: Question about question types - multianswer / multichoice
So if it works transparently for the front end users what exactly is the problem?
Or is this more of a university assignment - you have to work under certain restrictions to develop the code, rather than looking at the actual needs of the user, which would imply that if the front end works the soultion provided by Tim would be fine?
Or is the goal to make work just to fill the hours quoted for, rather than finding the best solution when that already exists?
If its a paid contract - then if I was in the organisation contracting and someone came back to me and said 'actually I can do this for half what was quoted because there's already a way to do it in the existing code/plugins' I'd be saying thank you very much and putting that guy at the top of my go to list for the next piece of work that needs contracting out. Not because they have proved themselves the most wonderful coder, but becuase they have proved themselves to be the most efficient at finding an appropriate solution to my front end user requirements. It would also save my time and allow me to move onto the next project sooner.
Provide a well reasoned accurate explanation of why the existing code/plugins already do the task needed and how and move on would be my suggestion, surely much better for everyone than reinventing the wheel!
Maybe its just me - but shouldn't those front-end users be the most important thing?
Re: Question about question types - multianswer / multichoice
Dear Richard.
I appreciate your comments and totally agree with them. This is a paid contract for which I have been assigned , Since the options are always fixed so to save the teachers the time of having to type the same options (9 checkboxes with fixed labels, and two fixed true / false dropdowns) , Or even copy paste a template each time they make a question would not be very fruitful , The client has already considered all these before deciding to get a new question type built.
Re: Question about question types - multianswer / multichoice
Did you actually check the link at the bottom of Cloze
https://docs.moodle.org/28/en/Cloze_editor_module
It's a simple tinymce plugin that creates Cloze code - no Atto plugin available yet but users (teachers) can change editor from their user profile. Our site is using it in moodle 2.8 so even if https://moodle.org/plugins/pluginversions.php?plugin=tinymce_clozeeditor does not tell that it is suitable for moodle versions 2.7 and 2.8 it works fine with these versions too - default editor is just Atto.
Re: Question about question types - multianswer / multichoice
Thank you Mauno,
However as described above, I really cannot use the cloze question type , no matter how much I would have loved to do that