Formulas question type icon

Formulas question type

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

Supports Moodle 2.6-5.2 See all versions
Latest release: 3 weeks ago
Installations: 2215
Downloads (last 90 days): 769

Frankenstyle name: qtype_formulas
Question types

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

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
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
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...
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.
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.
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.
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)?
Dear users
There has been another update, fixing a bug with comments in variable definitions (random, global, local, grading).
Best regards
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
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
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
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.
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
Dear users
We have released 5.3.5, a maintenance release of the old stable version. It includes patches that will improve restore processes on Moodle 4.4 and 4.5.
Note that this version will not offer compatibility with the upcoming release of Moodle. Users of future Moodle 5.0 will need to install Formulas Question 6.0 which is going to be released right after Moodle 5.0.
Best regards
Dear users.
We are planning to release a new major upgrade to the Formulas question plugin that will, in the long run, make it much easier to add new features. It comes with full backwards compatibility and brings some nice features w. r. t. syntax.
If you have a testing installation, you can already download the new version from our GitHub (master branch) and have a look at it. We would appreciate your feedback (via a GitHub issue), especially if you encounter any problems. Note that the version number has not yet been updated, in order to make it easier to return to the current stable version. Hence, testers must "Purge all caches" on their system after installation.
While it is possible to test it on a production instance, we do not recommend to do so. Even if we took great care, there might be hidden bugs. If you decide to test it, don't forget to make a full backup.
Best regards