Example #1
0
 virtual protected void GradeQuestion()
 {
     if (IsCaseSensitive)
     {
         Correctness = (ResponseText == CorrectResponse) ? 1.0 : 0.0;
     }
     else
     {
         Correctness = (ResponseText.ToLower() == CorrectResponse.ToLower()) ? 1.0 : 0.0;
     }
 }
Example #2
0
 /// <summary>
 /// Method to ask the question to grade itself. Marked virtual because different
 /// types of question may have different types of grading.
 /// </summary>
 virtual protected void GradeQuestion()
 {
     // By default, simply compare the user's response to the correct response
     if (IsCaseSensitive)
     {
         Correctness = (ResponseText == CorrectResponse) ? 1.0 : 0.0;
     }
     else
     {
         Correctness = (ResponseText.ToLower() == CorrectResponse.ToLower()) ? 1.0 : 0.0;
     }
 }