h5p-mcq-maker

A bash script for converting a plain-text file of multiple-choice questions to H5P

View the Project on GitHub justineuro/h5p-mcq-maker

(Before using this bash script, note that a convenient way for creating a single H5P of any type is probably by using a free H5P viewer/editor app such as Lumi. However, if you have a substantial amount of multiple-choice question sets to create, then this bash script comes in handy.)

h5p-mcq-maker

This repository contains a bash script for creating an H5P of multiple-choice questions (with a single correct answer) using the H5P Question Set template via the linux command line. Simply:

./mcq2h5p.sh myMCQuestions.txt

where myMCQuestions.txt (it may be named in some other way) is a plain text input file that contains your multiple-choice questions and corresponding answers written in H5P Question Set template markup, e.g.,

1. Which of the following is a letter?
10
9
*A

2. Which of the following is a number?
*35
a
q
z

3. 15 + 1 + 3 = _____
16
21
*19
11


(Note that the file for questions must end in two blank lines. Also, the tips, correct- and wrong-answer feedback have not been implemented so that one cannot use them by using this script.)

The H5P is created in the main directory and is called myNewH5P-mcq.h5p. There are a number of ways to view/play this newly created H5P:

Instructions on use

To use:

This folder includes (among others):

Using mcq2h5p-eof.sh when N_QUESTIONS is not set

An alternative bash script, mcq2h5p-eof.sh, is available for use when the control file doesn’t contain an initially set value for N_QUESTIONS, the total number of questions in the questions file. The number of questions is determined after the script has read the entire questions file.

In a manner similar to the previous script, usage is:

./mcq2h5p-eof.sh myMCQuestions.txt

This folder includes (among others):

License

Creative Commons License
h5p-mcq-maker by Justine Leon A. Uro is licensed under a Creative Commons Attribution 4.0 International License.
Based on a work at https://github.com/justineuro/h5p-mcq-maker.