Skip to content

Commit

Permalink
2024-06-01
Browse files Browse the repository at this point in the history
  • Loading branch information
justineuro committed Jun 1, 2024
1 parent b0bf377 commit aabe663
Show file tree
Hide file tree
Showing 602 changed files with 95,405 additions and 54 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ z
*19
11
```
(Note: Tips, correct- and wrong-answer feedback have not been implemented. One cannot use them for now.)
(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:

* use [Lumi](https://app.lumi.education/), an offline H5P viewer and editor (Note: If you have only one such H5P to create, then cutting and pasting your questions text into [Lumi](https://app.lumi.education/) is probably the easiest way to create the H5P. This bash script becomes useful if you have many (a substantial amount) of question sets for which you want to create H5Ps.)
Expand All @@ -48,14 +50,25 @@ The `h5p.json` and `content.json` files will be created in the appropriate locat
[... section omitted ...]
![](./h5p-mcq-maker-shot2.png)

## Contents of this repositoty
## Contents of this repository related to `mcq2h5p.sh`
This folder includes (among others):

* [`mcq2h5p.sh`](./mcq2h5p.sh) - a bash script that converts a plain text file containing mutiple-choice questions and answers to a [Question Set H5P](https://h5p.org/question-set).
* [`myNewH5P-mcq`](./dist) - a folder that contains the libraries inside the [`question-set-616.h5p`](https://h5p.org/question-set) re-use template that's available from the [Examples & downloads section](https://h5p.org/content-types-and-applications) at [https://h5p.org](https://h5p.org); the `h5p.json` and `content/content.json` files will be over-written to produce your new H5P. Among other libraries, this folder contains: __`H5P.QuestionSet-1.20`__, __`H5P.MultiChoice-1.16`__, and __`H5P.Question-1.5`__.
* [`mcq2h5p.sh`](./mcq2h5p.sh) - a bash script that converts a plain text file containing multiple-choice questions and answers to a [Question Set H5P](https://h5p.org/question-set).
* [`myNewH5P-mcq`](./myNewH5P-mcq) - a folder that contains the libraries inside the [`question-set-616.h5p`](https://h5p.org/question-set) re-use template that's available from the [Examples & downloads section](https://h5p.org/content-types-and-applications) at [https://h5p.org](https://h5p.org); the `h5p.json` and `content/content.json` files will be over-written to produce your new H5P. Among other libraries, this folder contains: __`H5P.QuestionSet-1.20`__, __`H5P.MultiChoice-1.16`__, and __`H5P.Question-1.5`__.
* [`control.txt`](./control.txt) - a plain text file containing the control parameters for your new H5P (e.g., `TITLE`, `AUTHOR`, `LICENSE`, `INTRODUCTION`, `PASS_PERCENTAGE`, `DISABLE_BACKWARDS_NAVIGATION`, `RANDOM_QUESTIONS`, `POOL_SIZE`, and `N_QUESTIONS`; these are used for creating the `h5p.json` and `content.json` of your new H5P). You would want to edit this to suit your own specifications.
* [`myMCQuestions.txt`](./myMCQuestions.txt) - an example of 10 multiple-choice questions, five (5) of which are selected each time the H5P is viewed/played. (Note that the `MathJax` symbol "`\`" has to be triply escaped. Thus, `\(` should be written as `\\\\(` and `\sqrt{2}` should be written as `\\\\sqrt{2}`.)
* [`myNewH5P-mcq.h5p`](./myNewH5P-mcq.h5p) - the H5P created by `mcq2h5p.sh` from `myMCQuestions.txt`.

## Using `mcq2h5p-eof.sh` when `N_QUESTIONS` is not set
An alternative bash script, [`mcq2h5p-eof.sh`](./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.

## Contents of this repository related to `mcq2h5p-eof.sh`
This folder includes (among others):
* [`mcq2h5p-eof.sh`](./mcq2h5p-eof.sh) - a bash script that converts a plain text file containing multiple-choice questions and answers to a [Question Set H5P](https://h5p.org/question-set) where the control file (`control-eof.txt`) doesn't not necessarily have an initial set value for `N_QUESTIONS`.
* [`myNewH5P-mcq-eof`](./myNewH5P-mcq-eof) - a folder to [`myNewH5P-mcq`](./dist)
* [`control-eof.txt`](./control-eof.txt) - a plain text file containing the control parameters for your new H5P (e.g., `TITLE`, `AUTHOR`, `LICENSE`, `INTRODUCTION`, `PASS_PERCENTAGE`, `DISABLE_BACKWARDS_NAVIGATION`, `RANDOM_QUESTIONS`, `POOL_SIZE`, and `N_QUESTIONS`; these are used for creating the `h5p.json` and `content.json` of your new H5P). You would want to edit this to suit your own specifications. You may also want to try different values fo `N_QUESTIONS` or omit it altogether.
* [`myMCQuestions.txt`](./myMCQuestions.txt) - as above.
* [`myNewH5P-mcq-eof.h5p`](./myNewH5P-mcq-eof.h5p) - the H5P created by `mcq2h5p-eof.sh` from `myMCQuestions.txt`.


<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">h5p-mcq-maker</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/justineuro/" property="cc:attributionName" rel="cc:attributionURL">Justine Leon A. Uro</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="https://github.com/justineuro/h5p-mcq-maker" rel="dct:source">https://github.com/justineuro/h5p-mcq-maker</a>.
9 changes: 9 additions & 0 deletions control-eof.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
TITLE="THIS IS THE TITLE"
AUTHOR="I am The Author"
LICENSE="ODC PDDL"
INTRODUCTION="A multiple-choice H5P Question Set made with h5p-mcq-maker."
PASS_PERCENTAGE=50
DISABLE_BACKWARDS_NAVIGATION=false
RANDOM_QUESTIONS=true
POOL_SIZE=5
N_QUESTIONS=
1 change: 0 additions & 1 deletion h5p-mcq-maker
Submodule h5p-mcq-maker deleted from bbcbde
Loading

0 comments on commit aabe663

Please sign in to comment.