Merge branch 'MDL-36733-master' of https://github.com/PascalHamar/moodle

This commit is contained in:
Andrew Nicols 2024-02-08 09:47:52 +08:00
commit 74e0266abe
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14

View File

@ -73,6 +73,12 @@ class qtype_calculated_question extends qtype_numerical_question
$ans->feedback = $this->vs->replace_expressions_in_text($ans->feedback,
$ans->correctanswerlength, $ans->correctanswerformat);
}
// Replace expressions in hints referring MDL-36733.
// Calculation through calculation() function in replace_expressions_in_text() function.
// Validation through qtype_calculated_find_formula_errors() function in calculate() function.
foreach ($this->hints as $hint) {
$hint->hint = $this->vs->replace_expressions_in_text($hint->hint);
}
}
public function get_num_variants() {