Esempio 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));
 }
Esempio 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));
 }