Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 //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));
 }