Insert question

Filters ::: filter_simplequestion
Maintained by Richard JonesRichard Jones
This is a very simple implementation of a question filter. It allows questions to be inserted anywhere in Moodle editable text either embedded or in a popup. Note that this plugin has probably been superseded by: https://github.com/moodleou/moodle-filter_embedquestion, developed by the OU team.

Insert question v1.5.4

Moodle 3.1, 3.2, 3.3, 3.4
Released: Friday, 8 December 2017, 4:55 AM

Source code repository

https://github.com/richardjonesnz/moodle_filter_simplequestion

Short Description

This is a very simple implementation of a question filter. It allows questions to be inserted anywhere in Moodle editable text.

Long Description

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 code is of the form {{QUESTION:linktext|xxx|display}} where xxx is the question id number and display is the display mode (embed or popup).

The plugin moodle_atto_question allows a teacher to insert the question codes via a button which triggers a dialog box.

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.

Version

1.5.4 still in beta testing, help welcome.

Bug fix: Added tasks to cron to delete question_attempt_steps and question_attempt_step_data related to the usages generated by this filter.

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 hidden div - the size of the iframe is configurable.

You can change the encryption key. Be sure to use only alphabetical characters and spaces.

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.

Questions and suggestions

Richard Jones https://richardnz.net richardnz@outlook.com. Karapiro Village New Zealand November 2017

Moodle

Tested in Moodle 3.3 and 3.4 Tested on Chrome, Firefox and Edge browsers Debian Stretch, Apache2, PHP 7.1, Postgres 9.2. Tracker: https://tracker.moodle.org/browse/CONTRIB-7081

Version information

Version build number
2017120801
Version release name
v1.5.4
Maturity
Beta
MD5 Sum
37911a2ba2ae617b74ae2a2c19e03e79
Supported software
Moodle 3.1, Moodle 3.2, Moodle 3.3, Moodle 3.4

Version control information

Version control system (VCS)
GIT
VCS repository URL

Default installation instructions for plugins of the type Filters

  1. Make sure you have all the required versions.
  2. Download and unpack the filter plugin.
  3. Place the folder (eg "myfilter") in the "filter" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation