Moodle Plugins directory: Insert question | Moodle.org
Insert question
A simple implementation of a text filter for Moodle.
In this version the user places special codes within text anywhere in Moodle which can then be replaced by a link to a question number in the database.
The filter text is of the form {{QUESTION:linktext|xxx|display}} where xxx is the question id number and display is the display mode (embed or popup).
You can find the question number by looking at the questions in your question bank. Click the preview question link and look in the URL, the first id is the question's id number.
Question number xxx is replaced by a simple encryption technique such that the original id number is not displayed by preview.php.
An ATTO button is also available (moodle_atto_question) for teachers (only) to insert the question via a form dialog.
Configuration
The start and end tags are configurable as is the link text length. The question can be displayed as a popup or within an iframe embedded in a sliding panel - the size of the iframe is configurable.
You can change the encryption key. Be sure to use only alphabetical characters and spaces.
IMPORTANT: You should only change the start and end tags on first-time set up. The only reason to do that would be if the tags conflict with some other filter or special text tags you are using.
Documentation
Documentation and screenshots at https://open-learning.co.nz/
- Select "Open courses" icon on front page
- Click "Simple Question Demonstration"
- Login as guest
Known bugs, Todos
Will not work with some advanced question types yet such as drag and drop.
Version 1.5.3 Changes
Altered the embedded question to use jQuery sliding panels rather than Bootstrap collapsible div.Version 1.5.4 Changes
Added steps to delete question_attempt_step and question_attempt_step_data from Moodle tables associated with question usages generated by this plugin. Default is to run every 10 minutes. The admin can adjust this under server settings - scheduled tasks. In heavily used situations, it may need running more frequently.
Version 1.5.5 Changes
Added GDPR (null provider) and cleaned up code to Moodle guidelines. While the Moodle core question_attempts table does contain a userid, these entries are removed every 10 minutes - or at times determined by the administrator. The plugin itself stores no user data.
Questions and suggestions
Richard Jones https://richardnz.net
mail: richardnz@outlook.com.
Karapiro Village
New Zealand
November 2017
Moodle
Tested in Moodle 3.1, 3.2, 3.3 and 3.4.
Thank you and have a great day,
Jannet
Can we add multiple questions user single link?
In this plugin, we allowed for single question per link how we can add many?