maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
142 stars 149 forks source link

STACK question:You seem to be missing * characters #652

Open miroi opened 4 years ago

miroi commented 4 years ago

Hello,

in my STACK question I defined variables as c0SO2,crSO2 etc , but got this strange message upon expression evaluation:

"Your last answer was interpreted as follows: (c0SO2-crSO2)^2/((c0O2-0.5(c0SO2-crSO2))crSO2^2)

This answer is invalid. You seem to be missing characters. Perhaps you meant to type (c0SO2-crSO2)^2/((c0O2-0.5(c0SO2-crSO2))crSO2^2)."

Is there a way to deactivate this uncorrect suggestion "...Perhaps you meant to type (c0SO2" ? I I prefer to combine letters and numbers in variable names, like c0_SO2, or c_r_SO2 ...

Comments please ?

PS: I have Moodle 3.9 with up-to-date STACK module.

sangwinc commented 4 years ago

Miroi, I think it would be easiest if you email me your question (C.J.Sangwin@ed.ac.uk), and I'll take a look at the whole thing. Chris Sangwin

miroi commented 4 years ago

Hello CHris,

here is the zipped xml: test-Chemická informatika-(LFUPJŠ2016-628) ZATIAĽ TESTOVACIA OTAZKA-20201109-1229.zip

a here is the print-screen: stack-printscreen

aharjula commented 4 years ago

Chris,

Yet another case where an option to drop this one out seems to be required. Though why it breaks between S and O as well might also require additional options, and the corrective parser would also need to not do this. Again one of those places where the initial assumptions of the shapes of variables and common errors do not quite fit when changing subjects and will lead to an explosion of options, well at least some work is being done to get this done but as stated this is far in the future and will not help here. Though the filters of 4.3 do make this simpler to solve, even now, with an extra option if one so wishes...

miroi commented 4 years ago

Dear experts,

to add few cents: we, chemistry teachers, like well named variables, like c0_SO2 , meaning initial concentration of SO2 (sulphur dioxide), or cr_SO2, meaning equilibrium concentration of SO2.

sangwinc commented 3 years ago

Just to clarify, you trying to type in a chemical formula?! STACK is designed for mathematics, and this adopts conventions etc. which are separate from chemistry. Over the years, this has probably been the most popular request! I've always tried to solve the problem of assessment by being completely honest to the subject.

Rather than "patch up" the * system, I think a better approach would be to create a correct grammar for chemistry formulae, and to encode the meaning of what a student types. This will, of course, come with proper feedback to students. E.g. you could reject impossible combinations on the basis of chemistry. We analogous did work in a similar direction with scientific units.

I'd be happy to discuss with chemists how this might work, but it is a lot more than patching *s, of course. But if I start to patch I'm confident the chemistry colleagues will not be satisfied until we have the "job done"..............

I think a "chemistry" input type is needed really.

Chris

miroi commented 3 years ago

Dear Chris, no, no chemical formulas - just ordinary variables for chemical calculus (or physics calculus). It is about allowing more flexibility in naming variables from various fields (chemistry, physics, chemical/mechanical engineering..). I like variables with names like c0_SO2, but I can also use shorter, "acceptable" names instead, like c0.

sangwinc commented 3 years ago

Ok! That is a relief! We will add more flexibility in a future version. Chris

miroi commented 3 years ago

FYI: how to replace chemical formulas - instead of formulas represented as "complex variables" use references to formulas represented as simple variables, see https://moodle.org/mod/forum/discuss.php?d=415805#p1675954 .

miroi commented 2 years ago

Dear Chris ! A year has passed, is there any news concerning handling complex variable names, like c0_SO2 ?

sangwinc commented 2 years ago

No, I'm really sorry but we've been doing other, much more mathematical things over the last year! If someone from chemistry wants to come forward to help then we will probably be able to offer support much quicker.