Formulas question type
Maintained by
Dominique Bauer, Philipp Imhof
This is a question type plugin for Moodle with random values and multiple answer fields.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
https://moodleformulas.org/course/view.php?id=22§ion=25
There is a .txt file called "JavaScript code for decimal comma.txt". When you create a new Formulas Question in your question bank, you have to include that javascript code in the text part of the question.
Before copying and pasting that code, you have to enter the "Edit HTML" mode (in your question editor it could be a button showing "html" or "<>"). Just add the code included in the .txt file at the bottom of the html code of the question.
In that same section you will find an example question "Decimal Comma". You could import this question and use it as reference. Edit it, enter the html mode, and you will find the javascript code included in that question.
https://moodle.org/mod/forum/discuss.php?d=405377
You will find a question submitted by Dominique with some javascript code you can copy and paste into your questions.
Edit the file: [root to moodle]/question/type/formulas/script/formatcheck.js and add one line to the onkeyup event:
input.onkeyup = function() {
this.value = this.value.replace(',','.'); // <<<------ THIS LINE ADDED
this.formulas.common.fn.update(this.formulas.common, this.formulas.self);
};
Would you mind having a look at my PR #26 on GitHub? It adds functions for statistics (normal distribution cdf) and number theory (modular exponentiation and modular inverse) and would make the plugin even more useful for quizzes in statistics or cryptography classes.
Thanks
Just saw that what i have found reported is also been reported as a bug but it is still no resolved.
See in bugs tracker: Plugins CONTRIB-8421, QT_Formulas: Input Validation
Hope you can fix it soon.
Thanks!
It seems that when the answer is a number answer, any text (non numeric for exemple) should show an alert. It's usefull for the comma decimal alert for french people...
But it seems that it doesn't work anymore.
- Tested on your site (and mine) : https://moodleformulas.org/course/view.php?id=22§ion=4
- Tested on Firefox and Chrome
When in the answer box you write something else than number, no alert shown and aswer considered as wrong.
Did I misunderstood ?
Éric
first of all: This qType is amazing! I came across this qtype just recently and I am currently migrating all of my static questions to the formula type.
However, I just experienced an issue while trying to regarde a quiz. After the quiz was taken by the students I realized that I was to strict in terms of rounding tolerance. So I modified the "relative error" setting in the question and performed a regrading. However, the regarding shows no effect on the automatic grading nor the display of the "correct answer" (also adjusted). Do I have to reset or change any other setting to impact the marking in the regrading process?
Cheers
Daniel