Formulas question type

Question types ::: qtype_formulas
Maintained by Picture of Dominique BauerDominique Bauer
This is a question type plugin for Moodle with random values and multiple answer fields.

Formulas question type 4.91 for Moodle 3.0 to 3.9

Moodle 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Released: Friday, June 19, 2020, 1:18 PM

Formulas question type for Moodle

This is a question type plugin for Moodle with random values and multiple answer fields.

The answer fields can be placed anywhere in the question so that we can create questions involving various answer structures such as coordinate, polynomial and matrix.

Other features such as unit checking and multiple subquestions are also available.

These functionalities can simplify the creation of questions in many fields related to mathematics, numbers and units, such as physics and engineering.

This question type was written by Hon Wai Lau and versions for Moodle 1.9 and 2.0 are still available at the original author's website at the date of this writting

This question type was upgraded to the new question engine introduced in Moodle 2.1 by Jean-Michel Vedrine.

This version is compatible with Moodle 3.0 and ulterior versions. It has been tested with Moodle versions up to 3.9. It has also been tested with PHP versions 7.0, 7.1, 7.3 and 7.4.

If you are running an older version of Moodle another version of the formulas question type is available for Moodle versions 2.6 to 2.9.


You will need to install Tim Hunt's Adaptive question behaviour for multi-part questions (qbehaviour_adaptivemultipart) prior to installing the formulas question type.

You can get it from the Moodle plugin directory or from Github

You absolutely need version 3.3 or newer of this behaviour, the formulas question type will not work with previous versions.


Installation from the Moodle plugin directory (prefered method)

This question type is available from

Install as any other Moodle question type plugin

Installation Using Git

To install using git type these commands in the root of your Moodle install: git clone git:// question/type/formulas echo '/question/type/formulas/' >> .git/info/exclude

Installation From Downloaded zip file

Alternatively, download the zip from

unzip it into the question/type folder, and then rename the new folder to formulas.

Creating formulas questions

This question type is very powerful and permit creation of a wide range of questions.

But mastering all the possibilities require some practice and there is a learning curve on creating formulas questions.

Here are some pointers to the available help : * first you can import the Moodle xml file samples/sample-formulas-questions.xml and play with the included formulas questions. * You can visit the documentation made by Dominique Bauer (As there is no or little difference in the Formulas question type plugin for recent versions of Moodle (2.0 and above), the documentation for the Formulas question type has been moved to this location but it apply to all Moodle versions, including the current release) * you can read discussions about the formulas question type in the Moodle quiz forum for instance and * you can post your questions in this forum

Reporting bugs, problems

You can see the list of issues here:

To create a new tracker issue, Log in and click on "Create" in the menu bar. Choose "Plugins (CONTRIB" in the "Project" field and "Question type: formulas" in the "Component(s)" field. Try to include as much details as you can so that the problem can be reproduced.

Version information

Version build number
Version release name
4.91 for Moodle 3.0 to 3.9
Stable version
MD5 Sum
Supported software
Moodle 3.0, PHP 7.0, Moodle 3.1, Moodle 3.2, Moodle 3.3, PHP 7.1, Moodle 3.4, PHP 7.2, Moodle 3.5, Moodle 3.6, Moodle 3.7, PHP 7.3, PHP 7.4, Moodle 3.8, Moodle 3.9
  • Latest release for Moodle 3.0
  • Latest release for Moodle 3.1
  • Latest release for Moodle 3.2
  • Latest release for Moodle 3.3
  • Latest release for Moodle 3.4
  • Latest release for Moodle 3.5
  • Latest release for Moodle 3.6
  • Latest release for Moodle 3.7
  • Latest release for Moodle 3.8
  • Latest release for Moodle 3.9

Version control information

Version control system (VCS)
VCS repository URL

Default installation instructions for plugins of the type Question types

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder (eg "myquestiontype") in the "question/type" subdirectory.
  4. Visit to finish the installation