Variable numeric set with units

Question types ::: qtype_varnumunit
Maintained by TimTim Hunt, at the OU (Perry building)Mahmoud Kassaei, Anupama Sarjoshi
Part of set Open University.
This question type can have randomly selected numbers, and the student's answer must include the correct unit. Unit grading is done using the pmatch algorithm.

Variable numeric set with units 1.9 for Moodle 4.4+

Moodle 4.4, 4.5, 5.0
Released: Wednesday, July 16, 2025, 11:11 PM

Changes in 1.9

  • This version is compatible with Moodle 5.0.
  • Fixed coding style issues.
  • Defined excluded hash fields and implemented conversion of legacy backup data to align with new question data format (per MDL-83541).
  • Resolved warning: undefined array key text in spacesfeedback.
  • Fix backup and restore tests to run synchronously in Moodle 4.4.
  • Fix test question configurations.
  • Changed the unit class to be autoloaded, to prevent issues during question data unserialization.
  • Added a new option to the question editing form: “If scientific notation is not formatted correctly”, allowing users to choose whether to accept a space between the number and unit as a valid response.
  • Fix a bug where editing question with multiple answers, caused some of the answers being lost.
  • Improved handling of number formatting on the question editing form.
  • Added checks for empty variables to prevent save errors on the edit form.
  • Automation test failures are fixed.

Version information

Version build number
2025061700
Version release name
1.9 for Moodle 4.4+
Maturity
Stable version
MD5 Sum
70ab9f7ce1124cdbef30ac092cb7caa9
Supported software
Moodle 4.4, Moodle 4.5, Moodle 5.0
  • Latest release for Moodle 4.4
  • Latest release for Moodle 4.5
  • Latest release for Moodle 5.0

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS tag
v1.9

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 http://yoursite.com/admin to finish the installation