Educator, Thinker, Consultant

Author: Troy (Page 16 of 40)

Educator, Thinker, Moodler, Podcaster, Open-source advocate. Check out the world's longest running middle school focused podcast at https://middleschoolmatters.com

Using ChatGPT to Create Multiple Choice Questions to Put into Moodle

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.

AI -> Moodle Questions

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.

Week Note 2023-02

Snow Day (s)

Friday was a snow day. We ended up with about 4 inches of snow.
Now, Monday is another snow day. The weekend was cold, but no additional snow. This will be our last traditional snow day. From here on out, we will be utilizing remote learning days.

Heatrak

I purchased some Heatrak mats for the stairs going out the back door (not cheap, but the stairs are seriously dangerous when iced). These have been a great investment. However, one of them has stopped working. (Good news, it is really obvious which one). A call to the company and a replacement is on the way.

NOLEJ

Because of the Snow Day, I finally got a chance to play around with NOLEJ a bit. NOLEJ authors materials (quizzes, flashcards,glossaries, etc) based on a resource. So, I took a YouTube video (Gettysburg: Animated Map) and let it create material. The material is created as H5P resources. I then put that into Moodle. You can check it out in the MasterMoodle course (no registration required, but you may have to click on the Login as Guest button). These are the raw files, no additional editing. Obviously, they can (and should be edited). The questions fall into basic knowledge category and some grammar needs to be corrected. This could be a way to quickly create some of the basics of a course though. The teacher would need to add higher level thinking material, questions, and learning opportunities.

Free to Use Browser Extension

I’m enjoying the Free to Use Browser Extension even more than I thought that I would. Basically, this extension displays a Public Domain image in your browser window whenever you open a new tab.

Extension sets the background of blank tabs to a photo from the Library of Congress collections that is free to use and reuse.

I just find these random pictures a source of great joy. I frequently pause for just a minute to wonder what is going on in the picture.

Books

I’ve finished “Poguemahone” by Patrick McCabe. I liked it a ton. This is really different than most of the books that I’ve been reading. It is written in free-verse focusing around the 1970’s and music. Kind of. Sort of. Largely the story of Una and her reflections.

I’m starting Frederick Backman’s Us Against You. This is a follow up to the wonderful “Beartown”. Fredrick Backman is one of my favorite authors. He has several books out. I recommend all of them that I’ve read so far.

Cover of US AGAINST YOU by Fredrick Backman. The cover shows two hockey players (one a small girl with two braids, one teenage sized with short hair under a helmet) backs standing again a blue sky with a town in the distance.

Weekly Note 2023-01

COVID

COVID finally caught up with me. Thankfully, I’m fully vaccinated, so the disease wasn’t fatal for me. Relatively, this was a like a pretty bad head cold for me. Be safe, and take precautions.

More AI

Tami Brass has a neat write-up about AI, teaching, and middle school. It is definitely worth a read.

Christmas

We got to spend some times with the kids around Christmas. This is one of the biggest reasons that we moved to Maine. It is great to have those opportunities.

We also got to spend some time with some new good friends.

Christmas with Kennerly

We did attend “Christmas with Kennerly” at the Portland Symphony. It was a good show and help us get into the Christmas mood.

After Twitter

“The internet’s town square should never have been one specific website with its own specific rules and incentives. It should have been, and should be, the web itself.”
Brent Simmons

I’ve pretty consistently heard Twitter referred to as the digital “Town Square”. However, Town Square as a privately owned rather than a publicly available place seems to be heading in the wrong direction. Whenever one person has complete control of the Town Square, it no longer becomes the Town Square, but a Square of an individual.

This is part of the balance that should be in America. America should really be reflective of three different components: People, Business, Goverment. There should be tension amongst those three. However, far too many people believe that Business (this is often pushed in terms of “freedom”), should be the default for everything. This leads to abuse by businesses. Business is designed to make money. This is partly why the stratification of wealth is continuing to be skewed. Business has managed to bake into the American psyche that freedom, letting business do what it wants, is what makes America great.

Twitter is proving to be a place that I don’t want to be. I’m working at making sure that I control my information. This is another thing that sounds great but takes effort. Mastodon is having a moment, but there are issues with Mastodon as well. Lots of people have moved to Mastodon, many looking for it to be “Twitter”, but the experience is different.

At the end of the day, people tend to want easy. Dr. Doug Belshaw and I have had a couple of conversations about this. I still believe that people want things to be very obvious and don’t want to learn how to control things. Dr. Belshaw is more optimistic.

With people moving to Mastodon, there is talk about the “return of the web”. This refers to blogging, and really people owning their own data. I’m still not convinced. The smallest roadblocks can be experience enders for many. People need to have something clear and easy to start with.

As one example, I’ve been hearing about how Linux is going to be the big thing this year.

Linux

I heard for years about how “this year is going to be the year of Linux”. It is finally as easy to use as Windows, gives you much more power, you can do so much, …. And, yet, we still haven’t gotten to the “year of Linux”. Yes, Linux is just about everywhere. But, it is “unseen”. Linux is used as an embedded system.

People clearly don’t want the maintenance and effort that Linux requires. People seem to want things that are familiar, and “easy”.

Other Software

Recently, I posted on the software that I use. I know that I left some valuable resources out. It’s funny how you can use something tons and then not even really think about it when asked.

In some conversations, I realized that I had left out at least one resource that I really like. I’ve received lots of praise for implementing this one. It replaces expensive software that doesn’t work as well.

  • BookStack – This is wiki software that you can host. It is free and open source. It produces a beautiful site. I use this for documentation sites. (In my job, documentation is undervalued but crucial.) Lots of customization options. Lots of controls. It also supports Markdown (though I leave it at the default of WYSIWYG for others.)

Just thought that I’d add it to the list.

Students Prioritize Using Moodle

I posted about having students prioritize choices (Ranking The Bill of Rights). I’ve now created a Comic with instructions on how to do this. Although I’ve used the Bill of Rights, this could easily be done with a wide variety of topics.

For example, you could have students prioritize study skills, Presidents, financial goals, geologic characteristics, and more. This is limited only by your content.

Students Prioritizing is also posted on my MoodleNet account.

Software That I Use

I thought that I’d share some of the applications that I use regularly. Most of these are Mac-centric, but many are cross-platform.

Open Source:

  • Clipy – ClipBoard manager that builds on the open-source ClipMenu. This is a MUST have for me.
  • Maestral – allows you to sync with DropBox – without counting as a device and much more.
  • Joplin – Note taking (supports Markdown) and encrypted syncing.
  • DarkTable– Photo organization and editing. Completely replaces Adobe Lightroom for me.
  • RawTherapee – Photo editing
  • Manager – Business Accounting. Terrific for consultants who need to create professional looking invoices.
  • NetNewsWire – RSS reader.
  • OnyX – System cleaning and “fixing”. Get it before you need it.
  • OBS – Advanced screen recording. A little bit of a learning curve, but you can do nice recordings.
  • GNUCash – Accounting software. Great for checkbook and financial tracking.
  • GRAMPS Genealogical Research Software

Paid Apps:

  • 1Password – password manager
  • Audio HiJack – Record audio with lots of features.
  • BBEdit – Lots of great features for free, but I support the software by purchasing.
  • Comic Life 3 – bought it once and use it regularly. Plus, phenomenal support.

Other Things That I use:

  • Hypothesis – Social Bookmarking and Annotation. Technically, this is open source. However, I don’t host this myself, I use the public version.
  • App Cleaner – Not open source, but free. Removes the dependencies along with the application.
  • Moodle – Learning Management Software. I host this on a server.
  • WordPress – Web development platform.
  • Mastodon – Social Networking site. Currently, I’m on Scholar Social.

AI Text Thoughts

I’ve been having conversations about AI text (Chat GPT being the most popular currently). Here is a follow-up to a conversation that I thought I’d share.

Having taught writing in middle school and high school, my first thought was “wow, I’m glad that I’m not teaching 8th or 9th-grade writing“. The AI writing is frequently on par with some of the writing that was turned in to me. 

I’ve been thinking about this for a while though. I’ve lived through the “calculator wars” (where educators argued about whether students should ever use calculators in school).  I also lived through the time of “turning off spell check” on computers. Those have now passed. I also watch adults (and students) type on computers. When the squiggly red line comes up, users (adults and kids), look back and fix those issues. I personally have a tendency to think faster than I type. I frequently leave words out. I know of a district that has purchased Grammarly Premium for all of the administrators.

This technology isn’t going away. I’ve adjusted my thoughts from the original “How would I ever teach writing?” to a much more nuanced view. 

  • Are there times when we need to teach writing without AI? Sure
  • Are there times when we need to teach how to expand writing using AI? Sure.
  • Is there value in writing things out longhand? I believe so
  • Are all kids going to be the same? No.

Writing is a special process. But not all writing is the same. Some kids really struggle with how to write. It isn’t really the way that their brain works. (Temple Grandin has a new book called Visual Thinking which is on my list. If you aren’t familiar with Temple Grandin, she has some fascinating perspectives.) Sadly to me, some people never write for the joy of writing. Some people never paint for the joy of painting. Some people never learn to play music. 

So, what can AI text do beyond providing a thoughtless copy/paste assignment? Well, AI text can provide another avenue to take the writing. Having AI provide some feedback may give the writer something else to think about. AI text could also act like a “peer editor”. AI text can take out some of the monotonous parts of writing. Heck, at a minimum, it may encourage kids to check out the thesaurus (*attempted humor). There are still definitely going to be times to have students write without AI. I will argue though, that we should also teach kids how to write with it.

How is AI text being used now?
I’ve been working with some educators and others, and have found the following use cases:

  • Peer feedback
  • Rough draft
  • Writing test questions
  • Reflection
  • Lesson plans
  • OER Resources
  • Writing code
  • IEP goals

AI text isn’t going away. It will get better and better. It still won’t replace great writers.

Weekly Thoughts 50

Kottke

Jason Kottke is back to posting. Jason has a long history of discovering and sharing truly interesting things. If you don’t follow him, fire up your RSS reader and add his site.

Thoughts

I believe that it was the wonderful Bob Harrison who posted the following:

COMPUTERS ARE A TOOL THAT ARE UBIQUITOUS IN THE REAL WORLD (SO WHY NOT IN THE CLASSROOM)

I’m still hearing lots of pushback about using computers. I do truly agree that kids shouldn’t be on computers all the time, but frequently I hear reports of full on blocking.

Summarizer & Voices

Two things that I got to pull from my head this week. One was when I was asked if there was a replacement for a website that a teacher was using to “provide accommodations” for students. Since the students have MacBooks, I suggested using Summarizer built into the System. I obviously hadn’t used this in a while as it wasn’t turned on. So, a quick trip to the new System Settings, turning on the Summarize feature (Keyboard | Keyboard Shortcuts | Services | Summarize) and we were ready to go. My Tech Integrator and I talked about the importance of empowering the students by teaching them, and we were ready to go.
The next day, the question of the day was, “Are there better voices available? They all sound very robotic.” The teacher was using a Google extension. Back to System Settings where we explored the variety of built-in Apple Voices (I still enjoy the South African dialect voices).

Hearing Aids

I had a follow-up on my hearing aids. Hearing aids have been a struggle for me. I’m not sure if it’s the general stigma, the relation to being old, or just the acknowledgment that I need them, but I’ve struggled with having to have them. The reality is that I hear much better with them. I don’t miss out on nearly as much sound. However, they still need to be adjusted. Getting the setting right is a challenge.

7th Grade Art

I’ve been co-teaching a 7th-grade Art class. The 7th graders have been just a ton of fun.

The project centered around AI art. Specifically, we’ve been using Diffusion Bee, an open-source version of Stable Diffusion that can be run on our computers. We’ve talked about why we are using this on computers instead of a website.

The project started with a board overview of AI art. The students identified a landscape (or seascape, this is Maine after all) and brought in a picture. The Art teacher worked on Foreground, Midground, and Background. The students did a pencil drawing of their picture. They also described it in words. They would bring their descriptions up and enter that into Diffusion Bee. The result would be compared to their picture. There was a lot of discussion about why they got the picture that they did. This was also a lot of fun (the pictures didn’t always match their expectations). Finally, the students created a watercolor version of their image.

Once we’d been through all of the students, we talked again, as a class about what the images were and how they were created. I then let them know that they could download Diffusion Bee and generate images as well.

We are talking about how to use the program, similar programs, and the future of AI.

The Art teacher wants to repeat the project with some adjustments with the 8th grade.

Amendments

I did a separate write-up on Ranking the Bill of Rights. I have found that future me generally appreciates when past me has written up steps and procedures. Thus, I wrote this up as a full post instead of just sharing here.

ChatGPT

I also did a full write up on AI and text (again, I’ve learned that future me appreciates full write-ups). Generated text is interesting and will continue to be so.

ChatGPT can detect when text is likely to have been generated by large language models, but you can also use prompts for it to generate text that is specifically designed to not be easily detected.

“Generate 200 words on Macbeth in a style that would make it difficult for the text to be detected by a large language model as having been generated by a large language model.”

Social Media & Teachers

I’m really struggling with this one:

But straight up: any person telling other teachers to use Twitter for PD is sending people into harms way.

The US rightwing crowd are targeting teachers. They are using Twitter (and FB, and Insta, and TikTok) to do this.

Sending educators to Twitter now is straight up malpractice. It’s a hostile place, run by bad stewards of data.

This is at least an interesting thought. I’m not sure that I’m ready to go that far, but education is really under attack these days.

*Post image is Lost in thought by @hefedute (https://openclipart.org/detail/223115/multiple-thoughts-man-line-art)

Ranking the Bill of Rights

The teacher wanted the students to rank the Bill of Rights. This can be a great discussion exercise. The students decide which of the first ten amendments to the Constitution are “most important”.

The teacher had used a site in the past. However, since it had been used in the past, the stated that voting had already occurred.

Moodle to the rescue. Well, Moodle and Questionnaire.

Moodle -> Questionnaire and 3 minutes of copy/paste, the teacher now has the activity completely under control. No external website needed.

Plus, Questionnaire has awesome reporting. The teacher can decide if the kids do it once or more often.

So our use case is that the teacher is talking about the Bill of Rights in general. Then the teacher will then have the kids rank the Bill of Rights in terms of importance. Once all of the students have ranked them, the class will discuss their rankings and why. Then the students will rank the Bill of Rights again.

This activity uses Moodle and the Questionnaire Module.

Here are the settings that I used:

These Settings are for the Questionnaire as a whole. Thus, these will be set up when you create the Questionnaire. You must give the questionnaire a Name. The Name is what the students will see. You can provide directions in the

Response Options:

Type: I set this to “respond many”. This could easily be set to “respond once”.

Respondent Type: “full name”. This could be set to “anonymous”, but I’d want to see if student answers change.

Students can view ALL responses: Never. If you’ve set the Respondent Type to anonymous, you could let the students see the results. However, I would share the results via the projector.

Save/Resume answers: I almost always set this to “yes”. This is a quick poll, so it doesn’t have to be “yes”.

Activity Completion

The default on Activity Completion is “Student can manually mark the activity as completed”, but I almost always (and out of habit), change this to “Show activity as complete when conditions are met” (and then tick the box for “Students must submit this questionnaire to complete it”

I generally avoid adding dates on activities as that can come back and be an issue in the future. Naturally, you could set the Availability for Allow responses from and Allow responses until if you wish.

I added a question of the type [Rate (scale 1..5)]

Question Settings

I clicked the tick box to make “Response required”

I also changed the scale (Nb of scale items) to 10 since there are 10 Amendments in the Bill of Rights.

I chose “No duplicate choices” as the teacher wants the Amendments ranked.

Question Text is where you enter the question/directions. We entered

“Rank the Amendments. 10 is the MOST important, 1 is the LEAST important. Please note that each column can have only ONE choice. Thus, if you rank Amendment I as the Most Important clicking on Most Important for another Amendment would remove the ranking from Amendment I. “

Next, I copied and pasted each Amendment in the Possible Answers box (make sure that each Amendment is one line – i.e. there are no “hard returns”).

Then I added the Named Degrees:

1=LEAST important
2=2
3=3
4=4
5= Mid-point of importance
6=6
7=7
8=8
9=9
10= MOST important

Save the question. Then use the Preview link to view your awesomeness.

Since this is a questionnaire, we do have lots of options that we could add. For example, we could have students explain why they ranked the Amendments where they did. However, this will be done as a class as a whole group discussion.

« Older posts Newer posts »

© 2026 Troy Patterson

Theme by Anders NorenUp ↑