Follow these instructions to use questions in a running text.
An embedded question can look like this:
Before you can imbed a question in Moodle, make sure that the question exists in a question collection of the course and has an 'idnumber'. The question must also be in a category with an 'idnumber'. As of Moodle 3.6, an 'idnumber' field has been added to the question and category forms.
To add an ID number to a question and a question category in the question collection in Moodle, follow the steps below:
Note: Numbers and letters can be used for the ID number. By adding ID numbers to questions and categories, you can target them later or embed them in other parts of the Moodle course by referring to the respective ID number. Make sure that the ID numbers are unique to avoid conflicts.
Follow the steps below to successfully embed a question:
If you want to embed a random question from a category, follow the same steps as above, with the exception of step 3. Instead of a specific question, select the option „Select a random embeddable question from this category“. This option will be displayed if there are at least 2 questions in the category. When a user encounters an embedded question, this question will be displayed directly on the page. Technically, the question is embedded in an invisible iframe that is automatically adjusted to the size of the question. The background of the iframe adapts to the page on which the question is embedded. The question behaves in exactly the same way as in a quiz attempt, provided that the quiz is set up with the same options as when the question was embedded. After the question has been answered, the user can start it again if desired. For questions with variants, a different variant is selected when the quiz is restarted.