New multinumerical question type

New multinumerical question type

by Nicolas Dunand -
Number of replies: 9
Picture of Core developers Picture of Plugin developers
Dear all,

I just finished coding a new question type, which I called (inspiratoinlessly) "multinumerical".

This question type allows asking questions such as :

Please enter X, Z, Z, such as :
  • X + Y + Z > 12
  • X - Y <= 3
  • Z = [0;100] (Z is between 0 and 100, included)
For each constraint, a feedback can be generated, displaying some text for a condition being fulfilled, and some other text if not.
The grading method can be set to be one of the following :
  • 100% (all constraints fulfilled) or 0%
  • grade = (amount of constraints fulfilled) / (total amount of constraints)
I just added it to the "Download modules and plugins" section of moodle.org, and I hope it will be made available shortly. Please let me know if this is of any interest to anyone.
Average of ratings: -
In reply to Nicolas Dunand

Re: New multinumerical question type

by Waldeck Schutzer -

Hi Nicolas,

Just downloaded and installed on moodle 1.9.5 and went over the admin to update the databases. Still, the question type seems to have trouble saving the question options on the database. Although I type the variables and constraints as explained in the documentation (which was written in beautiful French) and hit the save button, when I give the finished question a try I get an error stating that the options could not be retrieved from the database).

Minor glitches are: the help info, accessible from the top of the question page, would not load because something was wrong with the link.

Please notice that the installation seem to have gone well, with no error messages or other incidents reported at the admin page. The default language of the site is Portuguese, and even though there is no translation, I presume that some texts should have been seen in English instead. I am including some screenshots to illustrate the issue.

Could you please help?

Waldeck

Screenshots

1. Attempting to preview the question:

screenshot of the problem


2. The help text was not being shown (the English version should have filled in the gap)

second screenshot of the problem

3. Trying to view the help file:

third screenshot of the problem


In reply to Nicolas Dunand

Re: New multinumerical question type

by Waldeck Schutzer -
I have made an English translation of the multinumerical help page. Hope you will find it useful.

Waldeck

In reply to Waldeck Schutzer

Re: New multinumerical question type

by Nicolas Dunand -
Picture of Core developers Picture of Plugin developers
Hello Waldeck,

Thanks for your english translation of the help file, I just added it to the main distribution (provided in the official "Modules and plugins" page).

Morevoer, the main distribution has been updated to the latest version we're using here in my university. Could you please notify me whether this solves your problem ? You might possibly have to rebuild some questions from scratch.
In reply to Nicolas Dunand

Re: New multinumerical question type

by Mathew Hillier -
Nicolas,

I am hoping you can help me clarify....

I have installed your module for the multinumerical question type according to instructions and it works as far as i can tell, but throws up error messages each time a multinumerical question appears in a quiz.

We are using a web host with Moodle 1.9.6 on linux, Apache 2.2.14, php 5.2.11.
moodle error reporting is set to minimal (i.e only show fatal errors)
the errors are gone if i turn off error reporting (as you would expect), but are these errors a problem?

Example of errors below (i used the example question):

Parse error: syntax error, unexpected '>' in public_html/moodle/question/type/multinumerical/questiontype.php(220) : eval()'d code on line 1

Parse error: syntax error, unexpected T_IS_SMALLER_OR_EQUAL in public_html/moodle/question/type/multinumerical/questiontype.php(220) : eval()'d code on line 1

Parse error: syntax error, unexpected T_IS_GREATER_OR_EQUAL in public_html/moodle/question/type/multinumerical/questiontype.php(220) : eval()'d code on line 1
Please solve for x, y and z where:
X + Y + Z > 12
X - Y <= 3
Z is between 0 and 100 inclusive.
Answer:
x =
y =
z =

i have used the parameters in the question:
x,y,z
constraints
X + Y + Z > 12
X - Y <= 3
Z = [0;100]
use color (yes)
display result (yes)
grade calculation (fractional)


In reply to Mathew Hillier

Re: New multinumerical question type

by Stefan Raffeiner -

Hello, is there already a version of this question type for moodle2.1? if not: could some one help me porting it? i found a version for moodle2 of this questiontype somewhere and started making the changes described in in the moodle docs for porting a 2.0 qtype to 2.1, but I'm not on a good way, I'm not sure what I have to write into the question.php and the renderer.php. I think  I could do something like extending an other question type that has more than one field. Could someone give me please a few hints?

thanks

In reply to Nicolas Dunand

Re: New multinumerical question type

by Yong Ra -

I just updated out Moodle to 2.7. Server showed that it is missing multinumerical folder. I looked and it is up to 2.6.

Does anyone know when this qtype will be updated for Moodle 2.7?

Thank you,