Automatic Creation of H5P
H5P Quiz Content Type
The Quiz H5P Content type lets you specify a quiz in Respondus text format in the Textual editor. While it still involves a copy/paste operation, quizzes can be generated in ChatGPT using the H5P QuizCraft GPT and then pasted into the H5P Quiz Textual editor. The required format is as follows.
H5P Quiz Textual Editor Instructions
Use an empty line to separate each question. In multi-choice, the first line is the question, and the next lines are the answer alternatives. The correct alternatives are prefixed with an asterisk(*); tips and feedback can also be added: *alternative:tip: feedback if chosen: feedback if not chosen. Example:
What number is PI?
*3.14
9.82
What is 4 * 0?
1
4
*0
Sample ChatGPT Prompt – Quiz Generation
Here’s a sample prompt you can use in ChatGPT to generate the quiz input text to be used in the H5P Quiz content type:
Generate 10 multiple-choice questions that will test students on their comprehension of the textbook content following this paragraph. Each question must have a minimum of 3 possible answers and a maximum of 4 possible answers. Each question should be stated on its own line, followed by each answer on its own line, with the correct answer denoted by an asterisk ("*") preceding the answer wording. The last answer in each question set should be followed by a blank line before the next question, and there should be no blank line between each question and its corresponding set of answers. Do NOT label the answers with letters or numbers or use any text decoration other than the asterisk ("*") that indicates the correct answer. The format must be exactly as specified, because it will be used by another computer program that requires this specific format. Example of correct output format for two questions:
What number is PI?
*3.14
9.82
What is 4 * 0?
1
4
*0
Here's the textbook content:
[PASTE TEXTBOOK CONTENT HERE]
Editing Source Files and Re-uploading .h5p Files
H5P files are .zip archives. When you download a .h5p source file, you can rename it to .zip or use a tool like 7-Zip to extract its contents into a folder.
H5P File Structure
Most H5P files contain library folders, the main h5p.json file and a content folder; the content folder is where the activity data is stored in JSON. This JSON file defines the structure, settings, and content of the H5P activity.
📂 MyActivity.h5p
┣ 📂 content
┃ ┗ 📄 content.json
┣ 📂 H5P.InteractiveVideo
┗ 📂 H5P.QuestionSet
┗ 📄 h5p.json
Use a Reference File
- Download an existing activity of the same type with fully implemented questions to understand the required data format.
- H5P requires precise formatting for its data. Any deviation from its expected structure will cause validation errors and prevent re-uploading to the H5P Hub.
Using the H5P Zipper Tool
- Use the H5P Zipper Tool to generate a valid .h5p file from your source files before reuploading it to the H5P Hub.
- Copy and paste the folder path of the extracted H5P folder, and the tool will create an H5P file ready to be reuploaded
H5P Other Content Type
You can modify the H5P zip file containing the text to other content types to automatically load content. For instance, see the example below for the Flashcard content type.