moodle-qtype_formulas
moodle-qtype_formulas copied to clipboard
Write compatibility layer for unit expressions
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.
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 | |
|---|---|
| Change from base Build 14473443742: | 0.08% |
| Covered Lines: | 3916 |
| Relevant Lines: | 4084 |