Details
-
Type:
Bug
-
Status: Verified
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 12.5, 19.0, 20.0
-
Component/s: Tests & Quizzes (Samigo)
-
Labels:None
-
19 status:Resolved
-
12 status:Resolved
-
Test Plan:
Description
Steps to reproduce the issue:
1. Create a new assessment.
2. Add this calculated question to the assessment:
Question text: "{{x}} {a}" Var {a} => values from 1 to 2 Formula {{x}} => "sin(+({a}))"
3. Try to save the question. This action breaks Sakai. You need to reload the page to continue.
The problem is in this line: "e.calculate()" from "org.sakaiproject.tool.assessment.util.SamigoExpressionParser.parse(String, int)" because the method "org.mariuszgromada.math.mxparser.Expression.calculate()" does not work when it tries to parse this kind of expression: "sin(+(1.2))".