Formulas question type

Question types ::: qtype_formulas
Maintained by dynamiccourseware.orgDominique Bauer, Philipp Imhof
This is a question type plugin for Moodle with random values and multiple answer fields.
Latest release:
2225 sites
611 downloads
77 fans
Current versions available: 4

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.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

dynamiccourseware.org
Dominique Bauer (Lead maintainer)
Philipp Imhof: Co-maintainer
Jean-Michel Védrine: Former maintainer
hon wai lau: Original creator
Please login to view contributors details and/or to contact them

Comments RSS

تبصرے دکھائیں
  • diego dubois
    بدھ, 16 اپریل 2025, 4:09 AM
    I have a problem to restore quiz. this is the trace
    Trazado de la pila (stack):
    line 200 of /question/type/formulas/backup/moodle2/restore_qtype_formulas_plugin.class.php: TypeError thrown
    line 200 of /question/type/formulas/backup/moodle2/restore_qtype_formulas_plugin.class.php: call to array_merge()
    line 117 of /backup/util/helper/restore_questions_parser_processor.class.php: call to restore_qtype_formulas_plugin::convert_backup_to_questiondata()
    line 150 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_questions_parser_processor->dispatch_chunk()
    line 207 of /backup/util/xml/parser/progressive_parser.class.php: call to grouped_parser_processor->after_path()
    line 287 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->inform_end()
    line ? of unknownfile: call to progressive_parser->end_tag()
    line 178 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
    line 157 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
    line 464 of /backup/util/dbops/restore_dbops.class.php: call to progressive_parser->process()
    line 1552 of /backup/moodle2/restore_stepslib.php: call to restore_dbops::load_categories_and_questions_to_tempids()
    line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_load_categories_and_questions->define_execution()
    line 199 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
    line 191 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
    line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
    line 411 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
    line 716 of /blocks/sharing_cart/classes/controller.php: call to restore_controller->execute_plan()
    line 95 of /blocks/sharing_cart/restore.php: call to block_sharing_cart\controller->restore()
    i think sometinhs is wrong with the plugin.
    Regards Diego
  • Philipp Imhof
    بدھ, 16 اپریل 2025, 2:31 PM
    Hi Diego & thanks for reaching out.

    I have opened an issue on GitHub: https://github.com/FormulasQuestion/moodle-qtype_formulas/issues/184

    As you can imagine, that error does not happen in my test cases. So I would appreciate having more information, e. g. the versions (Formulas, Moodle, PHP) you used for the backup and the restore. If possible, please follow the link above and comment on the issue to help me find the problem. The best thing would obviously be to have the backup of the quiz you are trying to restore, but I don't know if it is possible for you to share it.
  • Philipp Imhof
    پیر, 21 اپریل 2025, 4:44 PM
    Hello Diego

    I haven't heard from you for a few days. Please note that I cannot reproduce the issue you mentioned. I would love to find the root of the problem and solve it for you, but I can only do so with your help. I would appreciate getting more information from you soon.

    Best regards
  • Philipp Imhof
    بدھ, 30 اپریل 2025, 5:21 PM
    Dear users

    Have have released two new versions:

    - Version 5.3.6 is a bugfix release for the "legacy" branch. This version is NOT compatible with Moodle 5.0. This branch has no further development.

    - Version 6.0.0 is the newest version. This is the branch where new features will be implemented. It is fully compatible with Moodle 5.0 all other current versions.

    Great care has been taken to make the update a smooth process. However, we do not recommend updating the plugin while there are open attempts of an important exam. And, as always, the plugin comes with no warranty.

    Best regards
  • Philipp Imhof
    اتوار, 4 مئی 2025, 8:45 PM
    Dear users

    We have just pushed a maintenance release to improve backwards compatibility, e. g. with functions like sigfig() that return a numeric string. It is recommended to install the update on all instances running 6.0.0.

    Best regards

  • Philipp Imhof
    بدھ, 7 مئی 2025, 2:36 AM
    Dear users

    There has been another update, fixing a bug with comments in variable definitions (random, global, local, grading).

    Best regards
  • Csaba Vágvölgyi
    منگل, 27 مئی 2025, 8:06 PM
    Dear @Philipp,
    We upgraded this plugin (to version 6.0.2) 3 days ago in 3 different Moodle 4.1 system.
    Unfortunately, we ran into some strange problems after the update (we are still looking for the specific problem).
    As it is very urgent to solve this problem, I would like to ask first of all, is it possible to revert to the previous plugin version (5.3.6)?
  • Philipp Imhof
    منگل, 27 مئی 2025, 8:08 PM
    Hi Csaba. Thanks for reaching out. Moodle does not normally allow downgrades. It is possible to work around that, but only if you have full access to the instance. What problems are you experiencing? It might be easier to simply fix the problem you encounter. Can you open an issue on GitHub with detailed information? I would look into it quickly.
  • Csaba Vágvölgyi
    منگل, 27 مئی 2025, 8:31 PM
    Thank you very much for your quick reply!
    Our instructors complain that the randomized parameters do not work well. (Moodle 4.1)
    There have also been examples of questions with randomized parameters not appearing correctly in the test.
    I'm still in the process of testing it. I will report back as soon as I know more.
  • Philipp Imhof
    منگل, 27 مئی 2025, 8:34 PM
    OK, thanks. I will wait for you feedback then. I can confirm that randomisation is, in principle, working fine; there have been many tests, automatic and manual. Hence, I would be grateful to know more about the problem, as soon as you find out anything.
  • Csaba Vágvölgyi
    ہفتہ, 31 مئی 2025, 12:28 AM
    Sorry for not replying, but we are having a hard time identifying the problem. (Moodle 4.1) Based on feedback from our instructors:
    There has been a slight change in the use of randomly generated parameters, but it's fine.
    We encountered an issue that worked fine before, but now returned an error: "Exception - 1:9:Syntax error: invalid use of prefix character \. " (this was corrected by editing the question)
    Finally, we have a question that supposedly worked before, but now we can't even look at it because the page "crashes" and displays the following error:
    "Exception - qtype_formulas\local\lexer::read_single_char_token(): Argument #1 ($type) must be of type int, null given, called in [dirroot]/question/type/formulas/classes/local/lexer.php on line 149"

    I know it's a bit chaotic, but maybe you'll have some ideas...
  • Philipp Imhof
    ہفتہ, 31 مئی 2025, 1:37 AM
    Hello Csaba. With that information, I can more or less see what is happening. If you have a GitHub account, I'd appreciate you open an issue; it is easier to discuss and follow-up over there. If that is not possible, don't worry.

    With the new version, the backslash has a special meaning, I call it a PREFIX operator. This makes it possible to have a variable called "sin" and still access the sine function by typing "\sin" (sin preceded by a backslash). The backslash had no meaning before and was not documented, so it should not normally have been used in variable definitions. What were you using it for?

    For the other problem, it would help me to have the question that is causing problems. You say you cannot look at it. You might, however, be able to export it by going to the question bank, locate it in the list of questions, click "Edit" to open the menu and choose "Export as Moodle XML". You could upload that file to GitHub or, if you don't have an account there and don't want to open one, you might share the file using some other service (a cloud provider like Dropbox or something like Pastebin). I would then have a look and I am pretty sure I can find a solution to the problem once I know more.

    Best regards
  • P L
    منگل, 3 جون 2025, 11:20 PM
    Dear Philipp,
    First of all, thank you for the wonderful work on the Formulas question type -- I use it extensively in my exams.
    On our university server, we currently have Formulas 6.0.2 (2025050600) running on Moodle 4.5.4. Since the last Moodle upgrade, I've noticed an issue when using Formulas questions with multiple parts.
    In deferred feeedback mode (which I need to use during exams), if one of the parts is left unanswered, the entire question is marked unanswered, and the student receives zero marks, even if the other parts are correct. This behavior differs from the adaptive mode, where partial grading still works as expected.
    Am I perhaps misconfiguring something, or could this be a bug introduced in the recent updates?
    Thank you again for your support and for maintaining this essential plugin.

    Best regards,
    Fabio
  • Philipp Imhof
    منگل, 3 جون 2025, 11:36 PM
    Hello Fabio.

    Thanks for your feedback and for telling me about that problem. At first glance, it (unfortunately...for me) sounds more like a bug than like something you do wrong. I will look into it and provide a fix as quickly as possible. I opened an issue on GitHub, so you can see the progress: https://github.com/FormulasQuestion/moodle-qtype_formulas/issues/219

    Best regards
  • Philipp Imhof
    ہفتہ, 7 جون 2025, 4:08 AM
    Dear users

    We are currently releasing version 6.0.3 of the Formulas question plugin. It is a bugfix and maintenance release. We recommend installing the update in the near future, as it fixes problems with the automatic grading of multi-part questions. Also, it improves backwards compatibility with 5.x versions and, for people using Moodle 5.0, makes sure everything will continue to work nicely once you start using MathJax v3.

    Best regards
1 2 3 4 5 6 7
Please login to post comments