Defining question type for import

Defining question type for import

by Adam Funiok -
Number of replies: 2

Hi,

I recently started creating a moodle e-learning system for a company I work at and I am wondering about the possibility of defining a specific question type, an essay + the requirement to add 1-3 attachments in pdf or picture formats.


I did this by creating it in a question bank, but I'd actually like to do this by importing it through moodle xml. Is that possible? 

Therefore, the actual question is: Is it possible to define a specific question type so that when I upload moodle xml with the questions, it would work? How exactly would the xml look like? The idea can be seen down below

<question type="essay_attachment">
      <name>
      <text>Name of question</text>
      </name>
      <questiontext format="html">
            <text>What is the answer to this question?</text>
      </questiontext> . . .
</question>


Thank you!

Average of ratings: -
In reply to Adam Funiok

Re: Defining question type for import

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If I understand your requirement correctly, I think the standard Moodle essay question type already has enough options to support this. And, anthing you can create in the question bank, you can create with Moodle XML import. (The easiest way to work out how is to make one example in the question bank, then export it.)