How to make specific multiple choice?

How to make specific multiple choice?

by drift drift -
Number of replies: 20

Hello everybody,

I just start using moodle and have a specific situation. 

I am working on a quiz and would like to setup a question with 4 choices - 3 answers are correct and 1 answer is wrong. So if student mark 3 choices he would pass (he gets 100%). If student mark just 2 of them or any other combination he is completely wrong (he gets 0%). So I need that the result in multiple choice be 100% or 0%.

Is it possible to achieve this with moodle?  

Thank you in advance.

Average of ratings: -
In reply to drift drift

Re: How to make specific multiple choice?

by Daniel McCloy -
I don't think what you want is possible. See some related discussions here and here.

One workaround would be to make it a single answer multiple choice question, and include "A, B, & C" types of answer choices, though sometimes that makes the answer too obvious. Example:

which words have two syllables?
a) seven
b) bluebird
c) backpack
d) free
e) A, B, and C
In reply to Daniel McCloy

Ats: Re: How to make specific multiple choice?

by drift drift -
Do you maybe know is this functionality in Moodle 2.0?
In reply to drift drift

Re: Ats: Re: How to make specific multiple choice?

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 isn't.

There have been lots of changes in how the quiz works in Moodle 2.0 (hopefully for the better) but very few changes in how the individual questions work.
In reply to Tim Hunt

Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -
It's very sad. Moodle has the greatest LMS features, but can not handle such simple task.

Does someone know another open source LMS system that will manage such requirement?
In reply to drift drift

Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What you are asking for is not something that has to wait for a major release like 2.0 or 2.1. It is just a new question type that anyone could create at any time and plug into whatever version of Moodle.

And since it could share most of the code from the standard MC question type, it would not even require a lot of code.
In reply to Tim Hunt

Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by Adriane Boyd -
Here is an initial version of this question type for 1.9, which I decided to call multichoiceset / "Multiple Choice Set" for lack of any better ideas. It does share a lot of code with multichoice and making the necessary changes only took a couple hours. The most annoying part was implementing import/export (thus far only for Moodle XML) that's different for non-core questions.

It can't share a whole lot of code with multichoice because of the database table names (at least not without a lot of changes to multichoice), but having it extend multichoice instead of the default question type saves about 175 lines of code. I think I had to change or add about 200 lines of code total, but of course most of the changes were trivial and I probably only had to really think about 50 lines of code for import/export, grading, and the question editing form.

I thought about just adding an option to multichoice, but I think there are too many little differences, like not having the grades as percentages and removing the single answer option and the partially correct feedback field. I think it'd be nicer to have it all as part of multichoice, but I think it might require too many adjustments for people who are used to the current multichoice and don't want this functionality.

I've only tested with 1.9.7. I've tried it out in quizzes and done basic tests for backup/restore and import/export, but nothing exhaustive. It would be great if people who are interested in using this kind of question type could try it out and let me know when they find bugs! If it works okay, I think this could be added to contrib, but I wanted to see if I could find a couple people to test it first.

-Adriane
In reply to Adriane Boyd

Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Wow! I thought it would not be too hard to do, but I was not expecting someone to do it that quickly. smile
In reply to Adriane Boyd

Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -
Thank you very much! I am new in Moodle. Could you tell how can I import these files to Moodle? What is the installation procedure?
In reply to drift drift

Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by Adriane Boyd -
  1. Copy the zip file above to /yourmoodlesite/question/type.
  2. Unzip it there.
  3. Go to http://yourmoodlesite/admin/ to complete the install. It should automatically detect that there's a new question type and show messages about adding relevant database tables.
In reply to Adriane Boyd

Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -
Thanks for very clear explanation, I installed the plugin. And it seems everything working properly. I use Moodle 1.9.8 and I made about a ten questions from admin then I had a couple of test with student users.

I agree that this feature must be at stable version too. I am doing testing at the momement and I will report if something goes wrong.

One more question about quiz gradding. I am trying to implement the quiz with 2 attempts. Student should get 75% for passing from the first time and 80% of correct answers from the second trie. In this situation penalties for each questions are not suiteable.

Is this possible to implement?
In reply to drift drift

Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by Adriane Boyd -
I'm glad to hear that the question type worked for your students!

I'm not totally sure, but I don't think that you can make the passing grade depend on which attempt number is being graded. You might be able to get a similar effect with adaptive mode and only one quiz attempt, but it wouldn't be exactly what you're asking for.
In reply to Adriane Boyd

Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -
Adriane, as I have said, I tested this functionality in different ways. And.. it is working perfectly! Exept there is a small isue with IE8. Then I created multiple choice questions, near by every title is displayed <!--[endif]-->
I tried to find it but I got no luck. Maybe it is not in files but list in database. It would be great to solve this problem.

Thanks.
In reply to drift drift

Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -
Does someone can help me with this?
In reply to drift drift

Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by Adriane Boyd -
Hmm, I doubt this is related to the quiz or question because a multichoiceset question should be displayed exactly like a multichoice question, which has been widely tested as part of the main moodle distribution. Definitely take a look at the question tables in your database (maybe in the column questiontext in mdl_question?) to see if you've accidentally saved/imported unexpected strings as part of your questions. Did you write the question text by copying and pasting from another editor like Word? Do you still have the problem if you type the text directly into the editor?

If you don't find anything in the database, my initial guess for the source of the problem would be a typo in a theme somewhere. Some questions to help track this down:

What do you mean by "nearby every title"? Could you attach a screenshot of the problem? Does the same thing happen in normal multiple choice questions? Does it still show up if you switch to a different theme?

(Please keep in mind that many people in the forum are volunteers, so it might take a day or two for someone to respond. Please be patient when waiting for a response!)
In reply to Adriane Boyd

Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -
Adriane, thank you for very useful answer and I am sorry for my rush. I searched through the all Moodle catalog for this code snipet, but I didn't find this. Then I tried to search with phpmyadmin in database and I successed. You were right, this was the mistake of mine - I copied code from MS Word together with MS code garbage.
Thank you one more time.
In reply to drift drift

Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by Adriane Boyd -
Glad to hear you found the problem! If you look near the top right corner of the editor, there's a "Clean Word HTML" button that might help you fix some of the problems with pasted HTML.
In reply to Adriane Boyd

Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -
Yes, thanks, I have already done that and it seems work perfect!
In reply to Adriane Boyd

Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -

As I said plugin works perfectly, but is it possible to install in moodle 2.0 release? Or some custom modification is needed?

In reply to drift drift

Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by Adriane Boyd -

No, it's not yet possible to install it in 2.0.  There are a lot of modifications that need to be made for any 1.9 question type to work with 2.0 due to changes/improvements to quizzes/questions and the libraries that deal with database queries, file handling, web forms, etc.  I am unfortunately really busy right now and probably won't be able to look at this until December at the earliest.  Hopefully there will be a final release for 2.0 by then!

In reply to Adriane Boyd

Ats: Re: Ats: Re: Ats: Re: Ats: Re: How to make specific multiple choice?

by drift drift -

Ok, I understood, Adriane. Thanks. This type of questions is vital to my system, so I will stay in 1.9 until this module will be released to 2.0. Unfortunately, I do not have such programming skills to do it by myself. One thing is not clear. This capability is very important, I think, to everyone. Why it is not just default feature of Moodle 2.0?