public static void UpdateVerbConjugationHistory(UserProfile profile, VerbConjugation conj, AnswerScore score) { var vchi = profile.History.VerbConjugationHistory.Find(v => v.VerbConjugation.Equals(conj)); if (vchi == null) { vchi = new VerbConjugationHistoryItem() { VerbConjugation = conj }; profile.History.VerbConjugationHistory.Insert(0, vchi); } HistoryItemOperations.UpdateHistoryItemWithSuccessFailureAndTimestamp(vchi, score); }
public static bool DoesTheUserKnowVerbConjugation(UserProfile profile, VerbConjugation conj) { foreach (var vchi in profile.History.VerbConjugationHistory) { if (!vchi.VerbConjugation.Equals(conj)) { continue; } if (IsVerbConjugationSuccessful(vchi)) { return true; } } return false; }