Create a quiz in ChatGPT and import it into Canvas

DrNufer
Community Coach
Community Coach
11
10388

Create a quiz in ChatGPT

It is very quick and simple to create a quiz in ChatGPT. Simply ask it to generate some quiz questions and it will do so. But today we are going to take another approach to simplify the process of converting the ChatGPT quiz questions into a fully-built Canvas quiz in minimal time and without having to copy/paste individual questions and answers. This is a game changer, and it all starts with the following prompt:

Create ten random multiple-choice, multiple response, and true/false questions worth 1 point each. The topic should be on the psychological principles of sensation and perception for an intro psychology college course.

Format the quiz into a table with the following format: Column A is the type of question: MC (multiple choice), MR (multiple response), and TF (true/false). Column B is not used but must be there. Column C is the point value of the questions. Column D is the question body. Column E is the correct answer. The numbers 1-5 each correspond to one of the possible answers listed in columns F-J. Use 1 to indicate a, 2 to indicate b, 3 to indicate c, 4 to indicate d, 5 to indicate e. For true/false questions, 1 is true and 0 is false. Clear any unused cells. All questions and answers must be accurate and not fabricated. Columns F-J are the possible answer choices. You can have 2 or more.

There are a few things you will want to modify in that prompt.

  • Specify the number of questions you want. I would actually err on generating more questions than you need - that way you can choose the best ones. If you want a 10 question quiz then perhaps request 20 questions. If you want 20 questions then ask for 40.

  • In this prompt, I chose MC, MR, and T/F questions. Perhaps you want only MC or MC and MR. It’s up to you.

  • Determine how many points each question is worth. This can easily be changed in the spreadsheet you’ll generate or in Canvas.

  • Choose your topic. I recommend being specific. Is it a general college course, an upper-level high school placement course, or a 5th grade class?

You’ll likely want to copy the instructions as is, but you may want to change the content of column A if you are not generating all three question types.

Create your CSV

Once you have your questions generated, you’ll want to review the questions and make sure that they are accurate. You can ask ChatGPT to modify individual questions, add or omit content, and generally modify the output until you are satisfied with the quiz. You can copy the table, but don’t copy the header row. Paste it (without formatting) into a spreadsheet. Verify that the content copied over correctly and clean up if there was extra content copied. Make sure the first row is deleted if it is blank. You will then save the file as a comma delineated file, CSV.

Convert to QTI

With your CSV file, you are now ready to convert the content to upload directly into Canvas. There are sites that will convert CSV into QTI, and I recommend (thank you Kansas):

https://canconvert.k-state.edu/qti/

Upload your file and click the “perform conversion” button and you’re good to go.

Upload quiz to Canvas

Head over to your Canvas course, click Settings, then Import Course Content.

From there you will select “QTI .zip file” from the Content Type dropdown menu. Upload your zip file that you created (not the CSV), and determine which question bank you want to add the questions to or create a new question bank.

course settings.jpg

It will take just a moment to upload and convert your file, but when it indicated “complete” then you can access your quiz and verify the content.

import qti.jpg

 

More tips and tricks

You may consider returning to ChatGPT to help generate feedback for students: explanations of the correct answers, commentary if the students answer questions correctly or incorrectly, etc. You can also ask ChatGPT to provide a quiz overview for you or even to suggest prompts for searching for or generating imagery. Some good sites to generate AI images:

 

This blog post was originally published on: https://www.howtocanvas.com/create-amazing-pages-in-canvas/chatgpt-quiz 

Tags (4)
11 Comments
mbaker
Community Explorer

Hi Sean,

Thank you for this, I'm playing with AI and this possibility.

Marti

Jon2000
Community Novice

Thank you for this! I was left a little uncertain about the next steps for the AI-generated feedback. Can this be added to the Excel document csv file and then converted to qti.zip? Is this something that would require copying and pasting into canvas? It would be awesome to automate the feedback as well as the questions and answers.  

KellieSteinmetz
Community Member

This is great, however, from what I can tell, it only works on the original quizzes format and not the new version?  Do you know of any tricks to import to the new version of Quizzes?  Thanks!

knowbd
Community Explorer

Trying REAL hard to make this work, but it is a "no-go" so far.  Words of wisdom appreciated.

  • ChatGPT does a fine job of creating questions in the correct format.
  • Copied into Excel on my MacBook without problem.
  • Discovered the K-State Converter's distaste for "CSV UTF-8" .csv files so I generated "Comma Separated Values," "Macintosh Comma Separated Values," and "MS-DOS Comma Separated Values" .csv files. 
  • K-State Converter ate those formats and provided .zip files.
  • When I tried to import them into a New Quiz Item Bank, I got the error below...

Error: there was a problem importing your file.
The qti import failed.\nERROR: Manifest not found at line:/home/docker/.gem/ruby/2.7.0/gems/qti-2.22.5/lib/qti.rb:38:in `manifest_path'

  • Tried the general import content approach (where you can pull from other courses or a variety of file formats), and it seemed to import the 1st of 20 questions only as a Quiz.
  • Peaking into the zip files, there seems to be only a single xml file within.  It is my understanding that a QTI zip file should contain several files, including one named "manifest.xml"... there was no manifest file in the zip file. 

Help would be greatly appreciated. (@DrNufer)

Regards,

Keith

JanetAdeyemi
Community Member

Thank you for the questions generated. I will need to settle down to really absorb them. However, I love the concept of AI. its a great catalyst for my work delivery. The pressure of work on me is drastically reduced.

JensRohleder
Community Explorer

I have experimented to avoid detours like csv-format and other services, such as the tool from Kansas State University, to create the QTI format. I have had success with the following procedure.
Create a quiz, e.g. with the following prompt:

You are an experienced [role]. You have to teach [target group] about [subject]. You must create a quiz with three questions for the lesson. It must be a multiple choice question with three answer options each. You must show the correct answer.

When you are satisfied with your quiz, copy this prompt in: 

Now you must format the questions into QTI format based on the example below. Write it in a code block.
Start the code with:

<?xml version="1.0" encoding="UTF-8"?>
    <questestinterop xmlns="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 http://www.imsglobal.org/xsd/ims_qtiasiv1p2p1.xsd">
        <assessment title="Quiz about [subject]">
            <qtimetadata>
                <qtimetadatafield>
                    <fieldlabel>cc_maxattempts</fieldlabel>
                    <fieldentry>1</fieldentry>
                </qtimetadatafield>
            </qtimetadata>
            <section ident="root_section">
***********

Each question must be in an item tag, and must be in the following format:


<item ident="question[plus a consecutive number]">
                    <itemmetadata>
                        <qtimetadata>
                            <qtimetadatafield>
                                <fieldlabel>question_type</fieldlabel>
                                <fieldentry>multiple_choice_question</fieldentry>
                            </qtimetadatafield>
                            <qtimetadatafield>
                                <fieldlabel>points_possible</fieldlabel>
                                <fieldentry>1</fieldentry>
                            </qtimetadatafield>
                        </qtimetadata>
                    </itemmetadata>
                    <presentation>
                        <material>
                            <mattext texttype="text/html">What is the largest living land animal?</mattext>
                        </material>
                        <response_lid ident="response[consecutive number]" rcardinality="Single">
                            <render_choice>
                                <response_label ident="[question1-a]">
                                    <material>
                                        <mattext texttype="text/html">Lion</mattext>
                                    </material>
                                </response_label>
                                <response_label ident="question1-b">
                                    <material>
                                        <mattext texttype="text/html">Elephant</mattext>
                                    </material>
                                </response_label>
                                <response_label ident="question1-c">
                                    <material>
                                        <mattext texttype="text/html">Blue whale</mattext>
                                    </material>
                                </response_label>
                            </render_choice>
                        </response_lid>
                    </presentation>
                    <resprocessing>
                        <respcondition continue="no">
                            <conditionvar>
                                <varequal respident="response1">question1-b</varequal>
                            </conditionvar>
                            <setvar action="Set">100</setvar>
                        </respcondition>
                    </resprocessing>
                </item>
*********
The value in response_label ident= must be unique.

End the code with:
		</section>
	</assessment>
</questestinterop>

The prompt contains instructions on the QTI format with an example.

The generated code must then be copied into Notepad or another text editor and saved as an XML file.
Then you have to zip this file.

The file can be uploaded into Canvas as a Classic quiz using the same procedure as described by Sean Nufer.

NOTE: as it is now, it only works with multiple-choice questions, but it can easily be expanded to also handle True/false and multiple answers. However, you must be aware of any limitations in the number of characters you can enter as a prompt in the various Generative AI tools.

ProfessorBeyrer
Community Coach
Community Coach

Thank you @JensRohleder for that prompt suggestion. I was able to use it successfully and create a QTI file that imported into a course as a Classic Quiz. I then tried importing the same file as a New Quiz but got an unspecified error on the Quizzes page (Oops! Something went wrong importing "Quiz about the American Revolution"). I then tried creating an Item Bank and doing the QTI import from there and got the same failure message that @knowbd reported. 

However, I was able to migrate the imported Classic Quiz into a New Quiz by using the migration process inside Canvas. 

Doc_Brown
Community Member

I tried this and got all the way to importing the QTI, but when I look at the quiz in Canvas it just has all of the possible MC and MR answers crammed in as one possible answer rather than separating them as 4 separate options. However, it did work fine for the True and False questions.

knowbd
Community Explorer

Doc_Brown --

Not sure this will solve your problem, but worth a try.

When you look in the Excel "save as" options, there are multiple ".csv" options. (Depending on your platform, you will see things like Windows, Macintosh, MS-DOS, etc.). Save a copy with each of the .csv options and see if one of them creates/solves your problem.  When I was struggling with .csv format problems, I got one of the MC/MR mashups like you describe.

(If memory serves, I found the MS-DOS option was the best choice from my Mac... YMMV).  

 

PaulFielding
Community Explorer

Haven't got it to work yet, but working on a prompt that will add individual question feedback (Jon2000 above).

Saving the QTI description here for when I come back, or if anyone beats me to it.

ChatGPT has a go at output format "use QTI format" but it doesn't import, so need to look into where Chat is going wrong or provide an example for it to follow.

https://digitaliser.getmarked.ai/blog/complete-guide-to-qti/

 

PaulFielding
Community Explorer

Thanks for the great ideas here. 

I have my QTI generated per JensRohleder above, but latest version of Windows notepad won't let me make an XML.

I pasted my QTI generated code into https://codebeautify.org/xmlvalidator that validated the code and then used the Download xml option on this site.

Zipped this file and imported to Canvas.

Worked a treat.

If I get MR or TF working code, I'll paste here.