mkraska / meclib

JSXGraph-based dynamic and interactive images in Moodle STACK questions without even touching JavaScript
9 stars 3 forks source link

fb_unit() handling of nonnumeric values #45

Open mkraska opened 9 months ago

mkraska commented 9 months ago

image

If the input isn't numeric, the feedback can be meaningless.

Solution: catch this case in fb_unit().

mkraska commented 9 months ago

Handling is nontrivial because of

 %_snum: float(simplify(stack_units_nums(stack_unit_si_to_si_base(%_sans)))),

resulting in the value NULLNUM for nonnumeric values.

So the problem has to be catched separately in the potential response tree.