numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
205 stars 120 forks source link

Rationals substituted into JME should have brackets round them. #973

Closed christianp closed 1 year ago

christianp commented 1 year ago

Here's a demo question, made by Ben McGovern: https://numbas.mathcentre.ac.uk/question/134196/error-demo/

a = 5 and b = 6 are integers. The correct answer to a mathematical expression part is defined as x^{a/b}. The expected answer display shows x^5/6. It should show x^(5/6).

It looks like the rational value 5/6 isn't correctly bracketed as the right-hand operand of ^.

christianp commented 1 year ago

Fixed by c59a25d6589c7dab64fe516e04a4bebc8ac680e5