private QuestionPackData CreateSingleQuestionPackData() { var teacher = AppManager.I.Teacher; var vocabularyHelper = AppManager.I.VocabularyHelper; // Ordered words var words = teacher.VocabularyAi.SelectData( () => vocabularyHelper.GetWordsByCategory(category, parameters.wordFilters), new SelectionParameters(parameters.correctSeverity, getMaxData: true, useJourney: parameters.useJourneyForCorrect) ); // sort by id words.Sort((x, y) => { return(x.Id.CompareTo(y.Id)); } ); if (skipWordZero) { words.RemoveAt(0); } if (ConfigAI.VerboseQuestionPacks) { string debugString = "Words: " + words.Count; foreach (var w in words) { debugString += " " + w; } ConfigAI.AppendToTeacherReport(debugString); } return(QuestionPackData.CreateFromCorrect(null, words)); }
public QuestionPackData CreateAlphabetQuestionPackData() { var teacher = AppManager.I.Teacher; var vocabularyHelper = AppManager.I.VocabularyHelper; ConfigAI.AppendToTeacherReport("New Question Pack"); // Fully ordered alphabet, only 1 pack var alphabetLetters = teacher.VocabularyAi.SelectData( () => vocabularyHelper.GetAllLetters(parameters.letterFilters), new SelectionParameters(parameters.correctSeverity, getMaxData: true, useJourney: parameters.useJourneyForCorrect) ); alphabetLetters.Sort((x, y) => { return(x.Number - y.Number); } ); if (ConfigAI.VerboseQuestionPacks) { string debugString = "Letters: " + alphabetLetters.Count; foreach (var l in alphabetLetters) { debugString += " " + l; } ConfigAI.AppendToTeacherReport(debugString); } return(QuestionPackData.CreateFromCorrect(null, alphabetLetters)); }
private QuestionPackData CreateSingleQuestionPackData(WordDataCategory dataCategory) { var teacher = AppManager.I.Teacher; var vocabularyHelper = AppManager.I.VocabularyHelper; // Ordered words var selectionParams1 = new SelectionParameters(parameters.correctSeverity, getMaxData: true, useJourney: parameters.useJourneyForCorrect); selectionParams1.AssignJourney(parameters.insideJourney); parameters.wordFilters.allowedCategories = new[] { dataCategory }; var words = teacher.VocabularyAi.SelectData( () => vocabularyHelper.GetAllWords(parameters.wordFilters), selectionParams1 ); // sort by id words.Sort((x, y) => int.Parse(x.SortValue) - int.Parse(y.SortValue)); if (skipWordZero) { words.RemoveAt(0); } if (ConfigAI.VerboseQuestionPacks) { string debugString = "Words: " + words.Count; foreach (var w in words) { debugString += " " + w; } ConfigAI.AppendToTeacherReport(debugString); } if (maxAnswers > 0) { words = words.GetRange(0, Mathf.Min(words.Count, maxAnswers)); } return(QuestionPackData.CreateFromCorrect(null, words)); }