Formula questions - how to enter\require a constant (x) as an answer?

Re: Formula questions - how to enter\require a constant (x) as an answer?

Dominique Bauer -
Кількість відповідей: 0
Фото Documentation writers Фото Particularly helpful Moodlers Фото Plugin developers
It would obviously be preferable for the Formulas question to include settings for the custom size, position and font of the answer boxes. While waiting for this to be done, I have proposed a method based on JavaScript code defined on the user side. This solution is quick and easy to apply, but it certainly has limits.

JavaScript code applies to an entire page. When only one question is displayed on a page, the first answer box is also the first for the JavaScript code, but when there are multiple questions on the same page, the first answer box of the different questions no longer matches the JavaScript code instructions for the first answer box. In other words, there is no longer a single first and second answer box, but third, fourth, fifth, etc.

You must therefore adjust the JavaScript code accordingly. It's not difficult, but it gets a bit tedious. If you have quizzes with random questions, this is almost no longer possible.

Unless this is a major inconvenience for you, I suggest that you keep one question per page for now.