How to import all-or-nothing multichoiceset questions by GIFT format or other?

How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Skyler Wang -
Number of replies: 10
Hi

After I installed multichoiceset.zip ,
I want to import all-or-nothing multichoice questions by GIFT format .

Do anyone know what format is for all-or-nothing multichoice questions?

Or , how to import this type of questions by other way ?


Thanks !!
Average of ratings: -
In reply to Skyler Wang

Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Adriane Boyd -
Hi,

Right now, the all-or-nothing multiple choice currently only supports import/export in Moodle XML format. If you create a question in moodle and export it in Moodle XML format, you can see what's required. The XML format would be easy to generate from a database of questions using a macro, but it is not so easy/practical to write by hand.

With the limited number of special characters available to distinguish question types in GIFT, it's a little tricky to implement GIFT import/export. I'd have to think about it a bit to see if there's an easy way to distinguish it from normal multiple choice without making it too hard to type or having it conflict with any other existing GIFT formats.

Thanks,
Adriane
In reply to Adriane Boyd

回應: Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Chiu Charlie -
May I suggest the following format:

What two people are entombed in Grant's tomb? { ~0* No one ~1* Grant ~1* Grant's wife ~0* Grant's father } 
The "*" can be any other special character that is not conflicted with current syntax. I suggest it for it usually stands for "multiple" in math notation.

What I have in mind is that such notation can match with the way this type of question is graded:
  • the portion of the 0 or 1 (wrong or correct answers) multiple together with the grades the question is assigned.
  • So any wrong answers, multiple 0, will make it "nothing" and only the 1 correct answers will keep the "all" points.

So, now if anyone can write the parser for this format or someone can direct me how to modified it.

In reply to Chiu Charlie

Re: 回應: Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Yulia I -

Check here

In reply to Yulia I

回應: Re: 回應: Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Chiu Charlie -

Thanks for the direction of the parser! A great resource to convert quiz questions. However, the site does not state the support of "All-or-nothing" question type.

Will it be supported sonn?

 

In reply to Chiu Charlie

Re: 回應: Re: 回應: Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Yulia I -

Let me see examples for this type of question

In reply to Yulia I

回應: Re: 回應: Re: 回應: Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Chiu Charlie -

The following is the example export from My test question using Moodle XML


<?xml version="1.0" encoding="UTF-8"?>
<quiz>


<!-- question: 0  -->
<question type="category">
<category>
<text>$course$/test01/A-NTest</text>

</category>
</question>



<!-- question: 53145  -->
<question type="multichoiceset">
<name><text>Example of All or Nothing</text>
</name>
<questiontext format="html">
<text>This is an example question of All or Nothing, the question: what answers will make the score is 0?</text>
</questiontext>
<image></image>
<generalfeedback>
<text>General Response</text>
</generalfeedback>
<defaultgrade>1</defaultgrade>
<penalty>0.1</penalty>
<hidden>0</hidden>
<shuffleanswers>1</shuffleanswers>
<correctfeedback>      <text></text>
</correctfeedback>
<incorrectfeedback>      <text></text>
</incorrectfeedback>
<answernumbering>abc</answernumbering>
<answer fraction="0">
<text>
Every correct answer is checked
</text>
<feedback>
<text>
this will have 100% grades
</text>
</feedback>
</answer>
<answer fraction="100">
<text>
get only one of correct answers
</text>
<feedback>
<text>
Yes, if correct answers are more than 1
</text>
</feedback>
</answer>
<answer fraction="100">
<text>
check all answers
</text>
<feedback>
<text>
yes, if check all answers, even include the correct ones, the grade will still 0
</text>
</feedback>
</answer>
<answer fraction="100">
<text>
check no answers
</text>
<feedback>
<text>
certainly!
</text>
</feedback>
</answer>
</question>


</quiz>


In reply to Chiu Charlie

Re: 回應: Re: 回應: Re: 回應: Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Yulia I -

This type of question isn't core quiz Moodle type and requires additional plugin.

In reply to Chiu Charlie

Re: 回應: Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Adriane Boyd -

I think it might look more like multiple choice and be easier to implement if we use a special character at the beginning of the question text.  I did this for the order question.  It has some drawbacks, because it could cause problems for questions where the question text starts with that character.  I chose '>' for order and no one has complained about it in the last three years, although I have no idea how many people are using GIFT import for the order question type.  I think '*' might be too common, but we could choose something like '&' or '^' that's less likely to occur at the beginning of someone's question text.  Then the format would look like percentage-less multiple choice:

&Question text. {~Distractor 1 ~Distractor 2 =Correct 1 =Correct 2 =Correct 3}

It won't be quite standard GIFT, but I think that's okay and it makes it easier to implement.  I don't think I'll have a chance to work on this in the next few weeks, but if anyone wanted to try to write the gift import/export functions, I'd be happy to review them.  To get an idea of where to start, look at the gift import/export functions in the contributed order question type (which uses the extra character) and look at how multiple choice is read in in the core code (in the directory questions/format/gift/).  A few things to keep in mind:

  • As a holdover from how multichoice percentages are stored, it's necessary to have the distractors have grade 0 and the correct answers have grade 100 (not 1).
  • GIFT import tries all import functions from contrib question types one after the other to see if any of them can read in the question successfully.  Because of how this works, the multichoiceset GIFT import function needs to return false when it hasn't found the special character that indicates that this is a multichoiceset question.  If you don't return false in the right cases, you can screw up GIFT import for other question types, including core question types.
In reply to Adriane Boyd

Re: 回應: Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Julien Cros -

Hi Adriane,

Firstly, thanks a lot for this question type, we were really looking forward to be able to propose it..!

I was wondering if the GIFT's handler has progressed or if you had received contributions since your last message ?

Thanks in advance, Julien

In reply to Skyler Wang

Re: How to import all-or-nothing multichoiceset questions by GIFT format or other?

by Yulia I -
You can import all types of questions with Moodle XML format.