moodle-qtype_formulas icon indicating copy to clipboard operation
moodle-qtype_formulas copied to clipboard

Write compatibility layer for unit expressions

Open PhilippImhof opened this issue 9 months ago • 1 comments

Replacing the entire unit conversion code takes time. The aim of this PR is to write a compatibility layer that uses the new parsing system for analysis of unit expressions. We can use this to quickly validate student input (and teacher input in the edit form) and do proper MathJax rendering in quizzes.

The code will convert the input into a string that can be passed to the legacy unit conversion code, allowing to keep the old system in place for a while.

PhilippImhof avatar Apr 13 '25 09:04 PhilippImhof

Pull Request Test Coverage Report for Build 14473980547

Details

  • 150 of 153 (98.04%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.08%) to 95.886%

Changes Missing Coverage Covered Lines Changed/Added Lines %
questiontype.php 5 6 83.33%
question.php 7 9 77.78%
<!-- Total: 150 153
Totals Coverage Status
Change from base Build 14473443742: 0.08%
Covered Lines: 3916
Relevant Lines: 4084

💛 - Coveralls

coveralls avatar Apr 13 '25 09:04 coveralls