mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 16:40:07 +01:00
This commit addresses compatibility issues in the qtype_calculated question type. The following problems were identified and resolved: - qtype_calculated was reusing the qtype_numerical_answer class and setting two additional properties ($correctanswerlength and $correctanswerformat) that were not declared. To resolve this, a new class, qtype_calculated_answer, was defined and utilised. - During grading in qtype_numerical, there were references to an undeclared property ($unitisright) used to track calculation details. This issue was fixed using a 'replace temp with query' refactoring. These changes ensure the qtype_calculated question type is compatible with PHP 8.2 and addresses the identified issues.