protected override bool responseIsCorrect(string response, IEnumerable <string> allResponses) { if (correctResponse == "*") { return(!string.IsNullOrEmpty(response)); //wildcard * takes any response as correct answer } return(SimpleSolution.compare(correctResponse, response)); }
//equationsolution could point to other solutions e.g. =if (a, b==c, etc.) protected override bool responseIsCorrect(string response, IEnumerable <string> paramAllSubResponses) { _allSubResponses = paramAllSubResponses.ToArray(); return(SimpleSolution.compare(evaluateBracketed(correctResponse.Substring(1), 0).s, response)); }