Question types ::: qtype_multinumerical
Maintained by Nicolas Dunand
This question type allows asking questions such as : Please enter X, Y, and Z, such as : X + Y + Z > 12
Latest release:
392 sites
7 fans
Current versions available: 6

This question type allows asking questions such as :

Please enter X, Y, and Z, such as :
  • X + Y + Z > 12
  • X - Y <= 3
  • Z = [0;100] (Z is between 0 and 100, included)

For each constraint, a feedback can be generated, displaying some text for a condition being fulfilled, and some other text if not.

The grading can be set to be one of the following :

  • 100% (all constraints fulfilled) or 0%
  • grade = (amount of constraints fulfilled) / (total amount of constraints)


Screenshot #0


Nicolas Dunand (Lead maintainer)
RISET Université de Lausanne: Supporting institution
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tue, Aug 26, 2014, 1:31 PM
    Hello, just uploaded new version, supporting Moodle 2.3-2.7.
  • Sat, Aug 30, 2014, 12:43 AM
    I am still getting the error with the new file.

    Field "questionid" does not exist in table "question_multinumerical"

    More information about this error

    Debug info:
    Error code: ddlfieldnotexist
    Stack trace:
    line 669 of /lib/ddl/database_manager.php: ddl_field_missing_exception thrown
    line 50 of /question/type/multinumerical/db/upgrade.php: call to database_manager->rename_field()
    line 535 of /lib/upgradelib.php: call to xmldb_qtype_multinumerical_upgrade()
    line 1615 of /lib/upgradelib.php: call to upgrade_plugins()
    line 434 of /admin/index.php: call to upgrade_noncore()

    Thank you,
  • Wed, Oct 14, 2015, 5:16 PM
    I've just updated the plugin. No changes but a couple bug fixes and now officially supporting up to Moodle 2.9.
  • Mon, Sep 26, 2016, 6:42 PM
    Hi Nicolas,

    I've just come across this question type and am interested in using it to set multi-part calculation questions where any calculation errors on the part of the user are carried forward and taken into account in their next answer.

    It seems to work where the answers are whole numbers, but falls down where irrational numbers are concerned. I'd like to be able to set a tolerance on correct answers but haven't found a way to do it. I was thinking that Boolean operators might work but they don't seem to be recognised. Is that right? Is there any other way to do this that you can think of?
  • Mon, Sep 26, 2016, 7:31 PM
    Hi James,

    I'm not sure to understand precisely what you're trying to achieve, but intervals for correct responses can be defined, i.e.:

    X + Y = [57;62]

    There's no way to use boolean operators. If you feel like PM'ing me some more details, I can try to think of something.
  • Wed, Mar 7, 2018, 4:08 AM
    This is amazing--merci beaucoup! I use it to have students assess their own lab work in chemistry.
  • Mon, Mar 12, 2018, 4:23 PM
    Thanks Andrew, it's always motivating to get feedback. Let me know if you think of possible improvements.
  • Ricardo Caiado
    Sun, Mar 18, 2018, 4:36 AM
    Any updates do Moodle 3.4?

  • Mon, Mar 19, 2018, 3:08 PM
    Hi Ricardo,

    I didn't test extensively, but this should work on 3.4.
  • Thu, May 3, 2018, 3:07 AM
    I just published an article about using this plugin to assess lab work:

    Thanks again for your work on this software--it's transformed my science classroom. After using the plugin extensively with my classes, I have a few suggestions to make it even better:

    1) Create an option to automatically mark zeros or blank parameters incorrect. Right now it is possible for a student to score points by leaving input boxes blank (as many operations involving 0 will return 0).

    2) Allow the display of custom text by the input box, instead of the parameter name.

    3) More options for grading (e.g. some constraints may be worth more than others)

    4) Allow the user to set a tolerance for each parameter (right now I am accomplishing this by using the range function, but it is awkward)

    Thanks again!
  • Thu, May 3, 2018, 4:21 PM
    Hi Andrew,

    Thanks for your feedback!

    1) What about if zero is a correct answer? Can you describe when it is possible to score points when it shouldn't?

    2-4) Good idea! Thanks for the suggestions, I'll try to implement this.

  • Fri, Jun 5, 2020, 9:42 AM
    Thanks a lot for the plugin! I can't live without it. However, there are a few things I find really necessary:
    1) Allow for a constraint of the type x != val.
    2) Give optional feedback for erroneous answers. For example: the constraint says: x=8; but the student answers x=9, and I know the typical mistake why somebody would say 9; I would like to say something specific when that answer is given.
    3) I support Andrew's point 4), it is quite cumbersome to use a range.
    4) I would like to give Ok|Error as specific feedback, but print the exact answers when right answer is ticked. Currently when the constraint is of the type '=' the right answer appears even when I set 'calculations only'... that gives the answers away sad.
    Please let me know if I can help in the process.

    Kind regards.
  • Fri, Jun 19, 2020, 7:31 PM
    Hello Veronica,

    Thanks for your feedback. The best would be this to all be reported in the same place, which is GitHub (see link "Bug tracker" at the top of this page). I have just created a few entries related to Andrew's suggestions. Feel free to add in on those, or to create new issues yourself for the points you mention.

    This helps to document the process, but there is no guarantee I will have time to work on this in the near future, so if you have the ability or know someone willing to code this (most should be quite simple but time consuming to fully test etc.), I'd be happy to review any submitted code changes and integrate them in the plugin.

    Kind regards,
  • Tue, Jan 19, 2021, 6:14 AM
    hi, is this for moodle versión 3.10? thanks
  • Tue, Jan 19, 2021, 2:45 PM
    Hello Jonathan,
    Yes, initial testing just showed that this works on Moodle 3.10.
1 2 3
Please login to post comments