This is a tutorial on having ChatGPT write questions to be imported into Moodle using the GIFT format. I’m going to use BBEdit as my text editor, but you can use a different one. The free version of BBEdit should do everything in these steps (* NOTE: Google Docs won’t work for the Regular Expression Find and Replace (Step 3). Microsoft Word will.)

Step 1:


Have ChatGPT write your multiple choice questions and format them in a specific way. The key is to include this sentence at the end of your request:

…Use the following format:
{1. MCVS:=Right answer/Wrong answer/Wrong answer/Wrong answer}

So, in my example, the search criteria was:

Write 50 Multiple-Choice Question about Maine. Use the following format:
{1. MCVS:=Right answer/Wrong answer/Wrong answer/Wrong answer}

This resulted in the following:

Sure, here are 50 multiple-choice questions about the state of Maine:

What is the capital city of Maine?
{MCVS:=Augusta/Portland/Bangor/Lewiston}
Which river flows through the city of Augusta?
{MCVS:=Kennebec River/Androscoggin River/Penobscot River/Saint John River}

So far so good. However, you need to do some formatting.

  • GIFT needs a blank line between questions.
  • Wrong answers need to be marked by an “~” (right answers need an “=”, but we’ve got that already).
  • “MCVS:” needs to be removed

Step 2: Copy/Paste the questions.

Highlight the questions in ChatGPT and copy them.

Paste the questions into your text editor (preferable over a word processor).

BBEdit:

Since I’m using BBEdit, you can use File | New> (with Clipboard).

Pages, Word, Google Docs

Paste the questions into a blank document.

Step 3: Add a blank line between questions:

No matter how you do this, it is just important that there is a blank line between each question. This is how questions are delineated. You should visually inspect the text to make sure that there is blank line.

BBEdit:

  • Click on Search | Find…
  • in the Find box, type: }
  • In the Replace box, type: }\r
  • Click the Replace All button.

This will find and replace all of those instances quickly.

Google Docs

This must be done manually in Google Docs. There is not currently an easy way to script this. You’ll need to set the cursor at the end of each answer line and press the return/enter key.

Manually place your cursor and hit return/enter after each “}” at the end of each answer line. This can take a while based on the number of questions.

Step 4: Remove the MCVS:

  • Click back into the Find window
  • In the Find box enter: MCVS:
  • In the Replace box – delete all text so that there is nothing in it
  • Click Replace All

Step 5: Add an “~” in front of the incorrect answers:

BBEdit:

  • Click back into the Find window
  • In the Find box enter: /
  • In the Replace box, you need two characters: (type a space)~
  • Click Replace All

Google Docs:

  • Click on Edit in the Menu bar
  • Choose Find and Replace
  • In the Find window, enter: /
  • In the Replace box, you need two characters: (type a space)~
  • Click Replace All

Optional
Add a category for the quiz questions. This means that in Moodle, these questions will all be identified in a specific category.

  • Scroll to the very top of the document.
  • Set the cursor and create a new blank line.
  • Type “$CATEGORY:XXXX” (Replace XXXX with the category name that you want).*Bonus, you can also create subcategories by adding a “/Subcategory” after your category. Thus, If you wanted a category of World War I, it would look like this:

$CATEGORY: World War I

If you wanted a sub-category of “allies” in World War I, it would look like this:

$CATEGORY: World War I/allies

  • Create a blank line below the category line.
  • Save the file

Moodle

Open your Moodle instance. Go to the course that you want to put the questions in.

  • Click on the More link in the top sub-menu
  • Select “Question Bank”
  • Click on the Questions button and select “Import”
  • Select “GIFT format” radio button
  • Drag and drop the file (or use the “Choose a file button”) to add the file that you previously saved.
  • Click “Import” button at the bottom
  • Read through the questions, scroll down and click “Continue”

That’s it. You’ve now created a bunch of questions and imported them into Moodle, ready to go.

Check the Questions

Please remember the ChatGPT is NOT programmed to be right. It will be confident, but maybe not right. It is crucial to check all the questions for accuracy.

In Moodle, you can utilize the Preview function. You may want to review the questions prior to import. Either will work, it depends on your preference. Do make sure to review the questions though.