Error in Calculated Question

Error in Calculated Question

by Marcelo Rodrigues -
Number of replies: 7

Hello everyone,

I wish you and your families are well with health, peace and joy!
Please, I would like to ask for help on the problem that occurs below:

1- I elaborated a Calculated question in Moodle with 3 wildcards: {b}, {m} and {n}

2- The formula for the right answer is: (- {n} / ({b} * {m}))

3- {b} ranges from 2 to 7; {m} ranges from 2 to 9 and {n} ranges from 2 to 7. All wildcards with zero decimal places

4- In the text of the question there is the following expression:

I3

5- When I'm on the Moodle page, editing the data set, I can't generate the data sets and Moodle gives a constant error

What am I doing wrong?

Thank you very much, Marcelo.


I2I1

Average of ratings: -
In reply to Marcelo Rodrigues

Re: Error in Calculated Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello Marcelo,

Can you provide the XML file for the question? (even if it is in Spanish)
In reply to Dominique Bauer

Re: Error in Calculated Question

by Marcelo Rodrigues -

Hi teacher Dominique,

I wish your week is happy and full of peace and hope!

Thank you very much for this precious help!

The question's xml file is attached.

1- Another question: I elaborated 5 questions (multiple choice calculated) that have shared wildcards. When I went to export the questions I couldn't. Is there any way to export issues, which have shared wildcards?

Thank you very much, Marcelo.

In reply to Marcelo Rodrigues

Re: Error in Calculated Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Marcelo,

Please check the attached XML file and see if it suits your needs.
Verifique o arquivo XML em anexo e verifique se ele atende às suas necessidades.

ForumQuiz_20200526_0015.png

In reply to Dominique Bauer

Re: Error in Calculated Question

by Marcelo Rodrigues -
Hi Professor Dominique,

I wish you a day of peace and health!

Yes, it worked! Thank you!

Is there a way to export issues that have shared wildcards?

Thank you! Marcelo.
In reply to Marcelo Rodrigues

Re: Error in Calculated Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Marcelo,

Go to Course administration / Course administration / Question bank - Export, and export the Category in which all files related with shared wildcards are placed. It should work. Please, keep us posted.

In reply to Dominique Bauer

Re: Error in Calculated Question

by Ahmad Amer -

I have tried this XML and it gives me the following:



Attachment IMG_1615 (1).jpg
In reply to Ahmad Amer

Re: Error in Calculated Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello Ahmad,

On the second page, you may need to set the wildcards to "will use a new shared dataset" and , on the third page, to click on "Update the datasets parameters", "Get new 'Item to Add' now", "Add" and "Display".

You may find the Formulas question easier to use for this type of questions.