Importing Embedded Cloze

Importing Embedded Cloze

by Nathan Hammond -
Number of replies: 5
How do I import and Embedded Cloze question. I've searched the forums for about 2 hours but must be blind wink. I'm using Moodle 1.6.1 (2006050510)

Here's the format I've been trying (saved as a txt file):

Conjugate kommen
ich {:SHORTANSWER:=komme}
du {:SHORTANSWER:=kommst}
er {:SHORTANSWER:=kommt}
wir {:SHORTANSWER:=kommen}
ihr {:SHORTANSWER:=kommt}
sie {:SHORTANSWER:=kommen}

This code works fine if I use the create embedd cloze question interface. But if I try to import it, it doesn't work.
Average of ratings: -
In reply to Nathan Hammond

Re: Importing Embedded Cloze

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Nathan,

There is no problem importing your Cloze question into Moodle 1.6+ (I'm using 1.6.3).

Create a text file with your question text in it, and call it for example Conjugate.txt.

In your Moodle course, Administration / Questions, go to any category and click on the Import question from file link. In the File format field, select Embedded Answers (Cloze), upload your Conjugate.txt file. Click the Upload this file button. You can see this message:

Importing 1 questions from file

1. Conjugate kommen ich du {:SHORTANSWER:=kommst} er {:SHORTANSWER:=kommt} wir {:SHORTANSWER:=kommen} ihr {:SHORTANSWER:=kommt} sie {:SHORTANSWER:=kommen}

Your question has been correctly imported into your question bank.

Can you please follow all these steps and report back if you still have a problem? Please note that you can have only one Cloze type question in an import file. I do not know exactly why you would want to do that. What is the advantage over typing the question directly in question edit mode?

Joseph

Average of ratings:Useful (1)
In reply to Joseph Rézeau

Re: Importing Embedded Cloze

by Nathan Hammond -
I tried those steps exactly. I did it on two different moodle installs (my school's and my webdomain's). Attached is my text file.

On my school's moodle I get a blank screen after the upload (the status bar in Ffox says Done)

On my moodle I got the following error upon trying to upload:
Fatal error: Call to undefined function quiz_qtype_multianswer_extract_question() in /home/mrhammon/public_html/moodle/question/format/multianswer/format.php on line 26

You are right though...there is no advantage to doing it this way since I can't upload more than one question at a time. I'll do it the other way for now. If you know why it's not working I'd like to fix it, but don't have to.

By the way, is being able to upload multiple cloze questions an upcoming feature?

Nathan


In reply to Nathan Hammond

Re: Importing Embedded Cloze

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Nathan,

I just used your komme.txt file and imported it without any problems into my Moodle 1.6.3 question bank.

Which Moodle version(s) are you using (on your two Moodle sites)?

What is the version of file moodle/question/format/multianswer/format.php?

Mine has this first line in it:

$Id: format.php,v 1.2.2.1 2006/08/17 17:37:54 tjhunt Exp $

>is being able to upload multiple cloze questions an upcoming feature?

There is little chance of that happening any time soon.

Joseph

Average of ratings:Useful (1)
In reply to Joseph Rézeau

Re: Importing Embedded Cloze

by Nathan Hammond -
Hi,

Part1
I'm running Moodle 1.6.1 (2006050510) on both my test server and my school's server.

I only have access to my test server (I'm working on getting access to the other one now smile )

Here's the first line
<?php // $Id: format.php,v 1.2 2006/03/01 07:36:09 gustav_delius Exp $

I see it's outdated. I'm guessing you're going to tell me how to get the newest one. I've not done that.

Part2
Using moodle XML allows for multiple CLOZE questions to be uploaded at the same time, am I right? I believe that's what I did when I exported 20 some CLOZE questions out of one course and then uploaded them into another one. I looked at the moodle xml code and it looked like I could use the existing code and replace the text of the questions (as they are all similarly structured)

Part3 New Question
Do you have time to point me in the right direction for this question. How do I get the students CLOZE answers to show up red for wrong. It used to do it on my older version (1.5.?). I searched for "green red" in the moodle.org's search bar and looked at all the articles there that looked relevant (about an hour) and I couldn't find anything that looked like it was what I needed.

Thanks so much for any help you can offer.
In reply to Nathan Hammond

Re: Importing Embedded Cloze

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Nathan,

Part1
I'm running Moodle 1.6.1 (2006050510) on both my test server and my school's server. Here's the first line <?php // $Id: format.php,v 1.2 2006/03/01 07:36:09 gustav_delius Exp $

I don't know if that older file is the reason for your current problem. I would certainly advise you to upgrade your Moodle to the latest stable distribution (currently 1.6.3).

Part2
Using moodle XML allows for multiple CLOZE questions to be uploaded at the same time, am I right? I believe that's what I did when I exported 20 some CLOZE questions out of one course and then uploaded them into another one. I looked at the moodle xml code and it looked like I could use the existing code and replace the text of the questions (as they are all similarly structured)

Of course, the Moodle XML format allows you to export/import any number of Cloze type questions residing within one category of your course question bank. I would certainly not recommend modifying the code of an XML file thus generated to add your new questions, as all sorts of errors can happen, especially the dreaded "invisible line-end mark". However, if you are familiar with XML, you can build an XML schema (*.XSD) and use an XML editor to edit your questions. I use Oxygen.

Part3 New Question
Do you have time to point me in the right direction for this question. How do I get the students CLOZE answers to show up red for wrong. It used to do it on my older version (1.5.?). I searched for "green red" in the moodle.org's search bar and looked at all the articles there that looked relevant (about an hour) and I couldn't find anything that looked like it was what I needed.

Try this discussion thread. Which theme are you using? This is very important, as the formatting of the correct/incorrect response is dependant on your theme. Also, a screen shot showing what you are getting at the moment and what you would like to get would help a lot.

Hope that helps,

Joseph