A friend used ChatGPT (I know, I know) to create a wide variety of questions for a Geography Bee for school. The questions are all Michigan based questions. ChatGPT created a wide variety of questions. However, these need to go into Moodle.

Moodle has a great quiz question import format (GIFT format). This allows one to write questions in a text editor and import into Moodle. The format is pretty easy, but does require a bit of learning.

Attempts to have ChatGPT export the file as GIFT format were unsuccessful. So, the teachers are doing a good bit of copying/pasting. While this is still WAY faster than writing and typing, I thought that there had to be a better way.

I made a copy of the file that was downloaded from ChatGPT. Then I took the following steps:

Open Ended Questions:

  • I used Find/Replace function by Finding ” Answer:” and replacing that with “{}”.

Example:
What is the capital of Michigan? Answer: Lansing
Becomes:
What is the capital of Michigan? {Lansing}

I then also added a “}” at the end of each line (manually, need to figure out how to automate that). Plus, I made sure that there was a blank line between each question.

Multiple Choice Questions:

  • I used Find/Replace to Find: “ A)” and Replace that with “{~“ . This creates the opening bracket for answers (and also marks the first answer as “incorrect” but that will be fixed next.
  • Next, I added“=” in front of the correct answer AND “~” in front of incorrect answers. This was done manually
  • I deleted the answer line by triple-clicking it and hitting “Return/Enter”.*This creates the necessary blank line between questions.
  • Then I used Find/Replace to change the letters to ~ (e.g. “B -> “~”, then “C” ->”~, “D” ->”~). This works as we’ve already removed the A and we’ve replaced letters if the answer is correct.

Example:
What is the capital of Michigan? A) Detroit B) Grand Rapids C) Lansing D) Ann Arbor
Answer: C) Lansing
Becomes:
What is the capital of Michigan? {~Detroit ~ Grand Rapids =Lansing ~ Ann Arbor}

Categories:

Next, I added Categories by adding “$CATEGORY: Geography Bee” to create a Category of “Geography Bee” Make sure there is a blank line after this line.
In another section, I added “$CATEGORY:Geography Bee/Counties” to create a sub-category of Counties under Geography Bee.

Export:

I then exported (downloaded) the document as a text file (.txt).

Moodle

Next, I went to the Moodle Course where I wanted the quiz.

  • I clicked on More…| Question Bank.
  • I clicked on The Questions button to select “Import”
  • I picked “GIFT format”
  • I dragged the file into the “Import questions from a file” box.
  • I clicked the “Import” button

This creates all of the questions in Moodle under the appropriate categories. Now you could edit, assign, move any and all of the questions as you like.

That’s it. I know that it may sound like a lot, but once you understand what is happening, this is really pretty quick.

Special Note:

If there is anything that you don’t want to be included in the import, simply add “//” at the beginning of that line. I used this to explain what was happening to the others involved. This is called commenting something out.