Algebra expression validator for calculated questions

Re: Algebra expression validator for calculated questions

by sam allerton -
Number of replies: 5

Hello Miro

Not sure if this link will help, it has been very useful to me to see if my algebra expressions work and are compatible with moodle:
https://www.mathjax.org/

The live demo is where I try and test my expressions

In reply to sam allerton

Re: Algebra expression validator for calculated questions

by Miro Iliaš -

Hello, 

thanks for the hint, but it did not help. I need editor which controls parentheses, and notepad++ works well for that.


Example of the complicated expression for one of my calculated questions:

(4844/(7.55-log10(((1000*{p})/101325)*((4*(({n0A}-{nrA})/{n0A})*(({n0A}-{nrA})/{n0A})*(({n0A}-{nrA})/{n0A})*{n0A}*{n0A})/(({n0A}+{n0B}+(({n0A}-{nrA})/{n0A})*{n0A})*(1-(({n0A}-{nrA})/{n0A}))*({n0B}-{n0A}*(({n0A}-{nrA})/{n0A})))))))-273.15


But anyhow, if someone could advice online editor checking parentheses in algaebraic expressions, I would be glad.

In reply to Miro Iliaš

Re: Algebra expression validator for calculated questions

by hon wai lau -

You may find formulas question type useful if you site admin can install it (https://moodle.org/plugins/qtype_formulas). You can just split the equation in any logical part as you like, and it is just like normal programming. For example:


frac = (n0A-nrA)/n0A;
ans = (4844/(7.55-log10(((1000*p)/101325)*((4*pow(frac,3)*n0A*n0A)/((n0A+n0B+frac*n0A)*(1-frac)*(n0B-n0A*frac))))))-273.15

No curly bracket is requred

Average of ratings: Useful (1)
In reply to hon wai lau

Re: Algebra expression validator for calculated questions

by Miro Iliaš -

Thanks for your hint,


but: https://moodle.org/plugins/qtype_formulas is for Moodle 2.7, 2.8, 2.9, 3.0 ... and we have 3.1, 3.2...

In reply to Miro Iliaš

Re: Algebra expression validator for calculated questions

by Bernat Martinez -

According our experience, Formulas is working fine with Moodle 3.2.2+

It seems that plugin info has not been updated.


Average of ratings: Useful (1)
In reply to Bernat Martinez

Re: Algebra expression validator for calculated questions

by Miro Iliaš -

Hi,

thanks, that is nice; 

but according to our Moodle maintenance policy, the plugin has to have clear info about Moodle version to be approved for the installation by admin.

I  (we) need fully functional plugin to ease the work with calculated questions.