Import quiz feature

Import quiz feature

by Claudio Tavares -
Number of replies: 18
Hi developers smile

The new import quiz feature just allow to import the missing word quiz format.

Do someone of you wrote a similar script for multiple choice quizes or other quizes format?

I'll apreciate so much.

Thanks
Average of ratings: -
In reply to Claudio Tavares

Re: Import quiz feature

by Henrik Kaipe -

I don't get it. As it says in the help section about the missing the word format:

This format only supports multiple choice questions. Each answer is separated with a tilde (~), and the correct answer is prefixed with an equals sign (=). Here is an example:

As soon as we begin to explore our body parts as infants we become students of {=anatomy and physiology ~reflexology ~science ~experiment}, and in a sense we remain students for life.

---
So, isn't this what you are looking for or has there been any recent changes that I am not updated with?

In reply to Henrik Kaipe

Re: Import quiz feature

by Claudio Tavares -
Yes, it is what I'm looking for.
But for traditional multiple choice, there is no way to eliminate the underline?

Regards smile
In reply to Claudio Tavares

Re: Import quiz feature

by Henrik Kaipe -

I am working on a new import format where I try to exchange the underline with a drop-down containing the multiple-choice alternatives. The underline will be eliminated but a drop-down will appear in its place. However, you will get the chance to position the drop-down yourself.

Check out
http://moodle.org/mod/forum/discuss.php?d=1658
for details. Scroll down to see my post.

I have barely started this work so it will take another couple of weeks before it is done.

In reply to Henrik Kaipe

Re: Import quiz feature

by Claudio Tavares -
Great, but I've noticed that just modifying the missinword format at line 125 replacing "______" for "" it works great for traditional multiple choice questions.
Isn't better just put an option to choose missingword or multiple choice?

I can't do this because I'm not a programmer.

What I have is a modificated one and I'm using it, but is not big deal put another import script that have the same content in Moodle distribution.

What do you think?
In reply to Claudio Tavares

Re: Import quiz feature

by Henrik Kaipe -

Seems like you already have the solution but in my missingword.php you need to change line 63 - we might have different versions. In order to eliminate all traces of missingword you just need to change the translation for missingword smiley.gif

What you wish to accomplish can be implemented with a very small hack:
In moodle/mod/quiz/lib.php at line 36 (among the other formats) you insert this line:
                            "multiplechoice" => get_string("multichoice", "quiz"),

Then you make a copy of the file moodle/mod/quiz/format/missingword.php. You name the copy multiplechoice.php. In multiplechoice.php you then make your hack replacing "_____" with ""

It should not be much of a problem for you to use this on your local installation but I doubt that this patch will be included in the official moodle edition. Apart from it being an ugly hack, I believe that the motto "less is more" rules when it comes to new upload formats. In that case, each new format needs to be a significant improvement compared to the existing ones. Implementing support for generally accepted formats, like WebCT and IMS QTI, is right now favoured.

In reply to Henrik Kaipe

Re: Import quiz feature

by Claudio Tavares -
Hi, I agree absolutely with you: "the less the better", it will be not an advantage have two times the same code in the oficial distribution. That's why I suggest you just to make a modification in the interface were we can choice between missingword or multiple choice, a radio button or something like that.
Anyway, I asume you must be right because you know more than me about this, so tell me something: with WebCT or IMS QTI formats can I import quizes from text?
In reply to Claudio Tavares

Re: Import quiz feature

by Henrik Kaipe -

The formats WebCT and IMS QTI cannot be used before anyone has implemented support for them. So far, I do not think anyone has done anything.

But as soon as the support has been implemented, WebCT is a rather simple format for importing quizes from text. Have a look at this link:
http://www.chariot.com/mtwct/webct_format.htm

Creating text files with the IMS QTI format is not easily done with an ordinary text editor. It takes a separate application.

In reply to Henrik Kaipe

Re: Import quiz feature

by Kenny Kins -
It sure would be nice to have a button for "delete" for the questions that are available to be added to a quiz.  There is a button to "select all", and it is a real pain to have to iteratively select each question for deletion and then confirm that you want to delete it.....  Similarly, it sure would be nice to have a button to "select all" questions in a quiz, and a "delete" button that operates on all of the selected questions.......
In reply to Henrik Kaipe

Re: Import quiz feature

by Terri Teacher -
Hi,

I've tried to import the above format & it works fine.
I'll like to know if there's a way to import the feedback as well?
In reply to Terri Teacher

Re: Import quiz feature

by Thomas Robb -
I've modified the Missingword.php module to make the import of feedback possible.

Look about 2/3 down the postings in the discussion on Surveys for a description and the code. As described therein, feedback can be entered after a "#" mark with this revised version.

http://moodle.org/mod/forum/discuss.php?d=1347

I'd appreciate any feedback you might have on this.
In reply to Thomas Robb

Re: Import quiz feature

by Ph Ho -

I've tried importing the following format:-

This is {=the best answer#comment on the best answer ~75%a good answer#comment on the good answer ~a wrong one#comment on the bad answer}

The feedback works perfectly well. However, the weightings does not seem to work. The 75% becomes a choice together with the second option. mixed.gif

In reply to Ph Ho

Re: Import quiz feature

by Thomas Robb -
Please send the file you are attempting to import to me as an attachment. I'll try to find out what the problem is.

tom@robb.net
In reply to Thomas Robb

Re: Import quiz feature

by Ph Ho -

Attached is the question that I've imported to moodle.
It consists of the weightings of each choice....not sure if the format is right.

Thanks!

In reply to Ph Ho

Re: Import quiz feature

by Thomas Robb -
There was a bug in the program which I have fixed in the attached file. If you can replace the mod/quiz/format/missingword.php file with the attached one, you should be in business.

Also, however, there is no need to label the answers "a." "b." etc. because Moodle adds its own item "numbering", so you will end up with duplicates. (This allows the possible answers to be randomized and still be properly labelled -- if you select that option, of course.)

One more thing, if you select "In feedback, show correct answers" when creatng the question, then there should be no need to say whether answers are correct or incorrect in your feedback itself.
In reply to Ph Ho

Re: Import quiz feature

by Timothy Takemoto -

Wandering around the Internet I saw somewhere a quiz definition grammar (perhaps in the moodle competitor called "eduventure"?) that used DHTML (is that the right word?) with definable tags. Up to now the formats developers have been sharing quiz importation grammars using tags like "=," "~" and "#" but I was impressed by the DHTML approach. Perhaps one day it might be a good idea to use a format that looks more like this:

<quentsions number=10 questiontype="cloze">
<question numofanswers=4>
<answer grade=75% comment="comment on best answer">
     the best answer</answer>
<answer grade=25% comment="comment on an okay answer">
   an okay answer</answer>
</question>
<question>
....
</questions>

Is this even called "DHTML"? Anwway, this is proabably a pretty obvious suggestion.
This sort of grammar seemed somehow futuristic and graceful.

Tim 

In reply to Timothy Takemoto

Re: Import quiz feature

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This is basically XML, and is what IMS QTI (the biggest chance for a standard) is based on.

http://moodle.org/mod/forum/discuss.php?d=1658&parent=7354

If you can find a link for that page you found it might be interesting.
In reply to Martin Dougiamas

Re: Import quiz feature

by Timothy Takemoto -

Thanks Martin,
I found the page again. It was not Eduventure but Edventure, another open source (inferior type of) moodle. And yes thank you/sorry it is XML not DHTML
http://emergent.brynmawr.edu/index.cgi/EdventureXMLFormat
It seems pretty complex. Perhaps seeing as how Moodle is popular, we can compete with the QTI standard by producing a simpler  semi-compatible (backward compatible?) version based on the functions that Moodle accomodates.

In reply to Timothy Takemoto

Re: Import quiz feature

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
There are two goals here: easy entry; and interoperability/sharing of questions.

The extensions to the missing word format are (I think) mostly focussed on the first, while an XML format addresses the second.

I don't think anyone could reasonably be expected to hand-type an XML file, so I can't really see the advantage of inventing a proprietary standard for this, given the advantages of supporting something that can truly interoperate with other software.