/** * Overrides CqQuestionAbstract::evaluateMath() * * Checks if the answer(s) have been parsed into variables yet, and does so * if not. */ public function evaluateMath($expression) { if (!$this->variablesParsed) { if (!$this->hasMath()) { // There is no math environment yet, make parent parse an empty // expression so it makes a math environment. parent::evaluateMath(""); } $this->createVariables(); } return parent::evaluateMath($expression); }