FormulasQuestion / moodle-qtype_formulas

Formulas question type for Moodle
17 stars 30 forks source link

Test validation and robustness of grading vars #124

Closed PhilippImhof closed 10 months ago

PhilippImhof commented 10 months ago

The problem outlined in #122 shows that teachers might accidentally create risky a grading criterion. They might also do the same in the grading vars, e.g. using testvar = _0/_1;.

This PR adds a unit test to make sure invalidated grading vars do not break a question. Also, while fixing the issue in #122, I realized that we do not verify the validation of the grading vars in the edit form actually works. Therefore, this PR adds a behat test.