Exemple #1
0
        /// <summary>
        /// Perform common initialization
        /// </summary>
        private static void Init(AssessmentContext context)
        {
            // ARABIC SETTINGS
            AssessmentOptions.Instance.LocaleTextDirection    = TextDirection.RightToLeft;
            AssessmentOptions.Instance.ReadQuestionAndAnswer  = false;
            AssessmentOptions.Instance.CompleteWordOnAnswered = false;
            AssessmentOptions.Instance.ShowFullWordOnAnswered = false;
            AssessmentOptions.Instance.WideLL                = false;
            AssessmentOptions.Instance.AnswerType            = LivingLetterDataType.Letter;
            AssessmentOptions.Instance.PlayCorrectAnswer     = false;
            AssessmentOptions.Instance.PlayAllCorrectAnswers = false;

            placerOptions = QuestionPlacerOptions.Instance;
            placerOptions.AnswerWideness = ElementsSize.Get(LivingLetterDataType.Letter);
            placerOptions.AnswerWideness = ElementsSize.Get(LivingLetterDataType.Letter);

            context.Configuration   = AssessmentConfiguration.Instance;
            context.Events          = new AssessmentEvents();
            context.Utils           = AssessmentConfiguration.Instance.Context;
            context.CheckMarkWidget = context.Utils.GetCheckmarkWidget();
            context.AudioManager    = new AssessmentAudioManager(context.Utils.GetAudioManager(),
                                                                 context.Utils.GetSubtitleWidget(),
                                                                 context.GameDescription);

            context.AnswerChecker = new AnswerChecker(context.AudioManager, context.Events);

            rounds = AssessmentConfiguration.Instance.NumberOfRounds;
        }
Exemple #2
0
        public static Assessment CreateMatchLettersToWord_FormAssessment(AssessmentContext context)
        {
            //TODO: Maybe need a different description?
            context.GameDescription = LocalizationDataId.Assessment_Match_Letters_Words;
            AssessmentOptions.Instance.PronunceQuestionWhenClicked   = true;
            AssessmentOptions.Instance.PronunceAnswerWhenClicked     = true;
            AssessmentOptions.Instance.ShowQuestionAsImage           = false;
            AssessmentOptions.Instance.PlayQuestionAlsoAfterTutorial = false;
            AssessmentOptions.Instance.QuestionSpawnedPlaySound      = true;
            AssessmentOptions.Instance.QuestionAnsweredPlaySound     = false;
            AssessmentOptions.Instance.QuestionAnsweredFlip          = false;

            Init(context);
            placerOptions.QuestionWideness = ElementsSize.Get(LivingLetterDataType.Word);
            placerOptions.AnswerWideness   = ElementsSize.Get(LivingLetterDataType.Letter);
            CreateManagers(context,
                           DragManagerType.Default,
                           LogicInjectorType.Default,
                           AnswerPlacerType.Random
                           );

            context.QuestionGenerator = new DefaultQuestionGenerator(context.Configuration.Questions,
                                                                     context.AudioManager,
                                                                     context.Events,
                                                                     DefaultQuestionType.VisibleForm);

            context.QuestionPlacer = new DefaultQuestionPlacer(null, context.AudioManager, placerOptions);

            return(CreateAssessment(context));
        }
Exemple #3
0
        public static Assessment CreateSunMoonLetterAssessment(AssessmentContext context)
        {
            context.GameDescription = LocalizationDataId.Assessment_Classify_Letters_Article;
            AssessmentOptions.Instance.PronunceQuestionWhenClicked = true;
            AssessmentOptions.Instance.PronunceAnswerWhenClicked   = true;

            AssessmentOptions.Instance.ShowQuestionAsImage           = false;
            AssessmentOptions.Instance.PlayQuestionAlsoAfterTutorial = false;
            AssessmentOptions.Instance.QuestionSpawnedPlaySound      = false;
            AssessmentOptions.Instance.QuestionAnsweredPlaySound     = false;
            AssessmentOptions.Instance.QuestionAnsweredFlip          = false;

            Init(context);
            placerOptions.QuestionWideness = ElementsSize.Get(LivingLetterDataType.Letter);
            placerOptions.AnswerWideness   = ElementsSize.Get(LivingLetterDataType.Letter);

            CreateManagers(context,
                           DragManagerType.Default,
                           LogicInjectorType.Default,
                           AnswerPlacerType.Random
                           );

            ArabicCategoryProvider categoryProvider = new ArabicCategoryProvider(CategoryType.SunMoon);

            context.QuestionGenerator = new CategoryQuestionGenerator(context.Configuration.Questions,
                                                                      categoryProvider,
                                                                      context.AudioManager,
                                                                      2, rounds);
            context.QuestionPlacer = new CategoryQuestionPlacer(context.AudioManager, placerOptions);

            return(CreateAssessment(context));
        }
Exemple #4
0
        public static Assessment CreatePronouncedWordAssessment(AssessmentContext context)
        {
            context.GameDescription = LocalizationDataId.Assessment_Select_Word_Listen;
            AssessmentOptions.Instance.PronunceQuestionWhenClicked   = true;
            AssessmentOptions.Instance.PronunceAnswerWhenClicked     = false; // Child should identify the word
            AssessmentOptions.Instance.QuestionSpawnedPlaySound      = true;  // pronunce the word to sort
            AssessmentOptions.Instance.QuestionAnsweredPlaySound     = true;
            AssessmentOptions.Instance.QuestionAnsweredFlip          = true;
            AssessmentOptions.Instance.ShowQuestionAsImage           = false;
            AssessmentOptions.Instance.PlayQuestionAlsoAfterTutorial = true;

            Init(context);
            AssessmentOptions.Instance.AnswerType = LivingLetterDataType.Word;
            placerOptions.QuestionWideness        = ElementsSize.Get(LivingLetterDataType.Word);
            placerOptions.AnswerWideness          = ElementsSize.Get(LivingLetterDataType.Word);

            CreateManagers(context,
                           DragManagerType.Default,
                           LogicInjectorType.Default,
                           AnswerPlacerType.Random
                           );

            context.QuestionGenerator = new DefaultQuestionGenerator(context.Configuration.Questions,
                                                                     context.AudioManager,
                                                                     context.Events);
            context.QuestionPlacer = new DefaultQuestionPlacer(null, context.AudioManager, placerOptions);

            return(CreateAssessment(context));
        }
Exemple #5
0
        public static Assessment CreateQuestionAndReplyAssessment(AssessmentContext context)
        {
            context.GameDescription = LocalizationDataId.Assessment_Match_Sentences;
            AssessmentOptions.Instance.PlayQuestionAlsoAfterTutorial = false;
            AssessmentOptions.Instance.PronunceQuestionWhenClicked   = false; // Child should read question
            AssessmentOptions.Instance.PronunceAnswerWhenClicked     = false; // Child shuold read answer
            AssessmentOptions.Instance.ShowQuestionAsImage           = false;
            AssessmentOptions.Instance.QuestionSpawnedPlaySound      = false;
            AssessmentOptions.Instance.QuestionAnsweredPlaySound     = false;
            AssessmentOptions.Instance.QuestionAnsweredFlip          = false;

            Init(context);
            placerOptions.AnswerWideness                     = ElementsSize.Get(LivingLetterDataType.Phrase);
            placerOptions.QuestionWideness                   = ElementsSize.Get(LivingLetterDataType.Phrase);
            AssessmentOptions.Instance.AnswerType            = LivingLetterDataType.Phrase;
            AssessmentOptions.Instance.WideLL                = true;
            AssessmentOptions.Instance.ReadQuestionAndAnswer = true;

            CreateManagers(context,
                           DragManagerType.Default,
                           LogicInjectorType.Default,
                           AnswerPlacerType.Random
                           );

            context.QuestionGenerator = new DefaultQuestionGenerator(context.Configuration.Questions,
                                                                     context.AudioManager,
                                                                     context.Events);

            context.QuestionPlacer = new DefaultQuestionPlacer(null, context.AudioManager, placerOptions);

            return(CreateAssessment(context));
        }
Exemple #6
0
        public static Assessment CreateCompleteWordAssessment(AssessmentContext context)
        {
            context.GameDescription = LocalizationDataId.Assessment_Select_Letter_Image;
            AssessmentOptions.Instance.PronunceQuestionWhenClicked   = true;
            AssessmentOptions.Instance.PronunceAnswerWhenClicked     = true;
            AssessmentOptions.Instance.QuestionSpawnedPlaySound      = true; // pronunce the complete word
            AssessmentOptions.Instance.QuestionAnsweredPlaySound     = true;
            AssessmentOptions.Instance.ShowQuestionAsImage           = false;
            AssessmentOptions.Instance.PlayQuestionAlsoAfterTutorial = true;
            AssessmentOptions.Instance.QuestionAnsweredFlip          = false;

            Init(context);
            placerOptions.QuestionWideness       = ElementsSize.Get(LivingLetterDataType.Word);
            placerOptions.AnswerWideness         = ElementsSize.Get(LivingLetterDataType.Letter);
            placerOptions.SpawnImageWithQuestion = true;
            AssessmentOptions.Instance.CompleteWordOnAnswered = true;

            CreateManagers(context,
                           DragManagerType.Default,
                           LogicInjectorType.Default,
                           AnswerPlacerType.Random
                           );

            context.QuestionGenerator = new ImageQuestionGenerator(context.Configuration.Questions, true,
                                                                   context.AudioManager, context.Events);
            context.QuestionPlacer = new DefaultQuestionPlacer(
                context.Events, context.AudioManager, placerOptions);

            return(CreateAssessment(context));
        }
Exemple #7
0
        public static Assessment CreateOrderLettersInWordAssessment(AssessmentContext context)
        {
            context.GameDescription = LocalizationDataId.Assessment_Order_Letters;
            AssessmentOptions.Instance.PronunceQuestionWhenClicked   = true;
            AssessmentOptions.Instance.PronunceAnswerWhenClicked     = true;
            AssessmentOptions.Instance.ShowQuestionAsImage           = true;
            AssessmentOptions.Instance.QuestionSpawnedPlaySound      = true; // pronunce the word to sort
            AssessmentOptions.Instance.QuestionAnsweredPlaySound     = true;
            AssessmentOptions.Instance.PlayQuestionAlsoAfterTutorial = true;
            AssessmentOptions.Instance.QuestionAnsweredFlip          = false;

            Init(context);
            placerOptions.AnswerWideness   = ElementsSize.Get(LivingLetterDataType.Letter);
            placerOptions.QuestionWideness = ElementsSize.Get(LivingLetterDataType.Word);
            AssessmentOptions.Instance.ShowFullWordOnAnswered = true;

            CreateManagers(context,
                           DragManagerType.Sorting,
                           LogicInjectorType.Sorting,
                           AnswerPlacerType.Line
                           );


            context.QuestionGenerator = new ImageQuestionGenerator(context.Configuration.Questions, false,
                                                                   context.AudioManager,
                                                                   context.Events);
            context.QuestionPlacer = new DefaultQuestionPlacer(null, context.AudioManager, placerOptions);

            return(CreateAssessment(context));
        }
Exemple #8
0
        public static Assessment CreateMatchWordToImageAssessment(AssessmentContext context)
        {
            // Assessment Specific configuration.
            context.GameDescription = LocalizationDataId.Assessment_Match_Word_Image;
            AssessmentOptions.Instance.PronunceQuestionWhenClicked   = true;
            AssessmentOptions.Instance.PronunceAnswerWhenClicked     = false; // Do not pronunce name of a picture
            AssessmentOptions.Instance.ShowQuestionAsImage           = true;
            AssessmentOptions.Instance.QuestionSpawnedPlaySound      = true;  // pronunce the word of the image
            AssessmentOptions.Instance.QuestionAnsweredPlaySound     = true;
            AssessmentOptions.Instance.PlayQuestionAlsoAfterTutorial = true;
            AssessmentOptions.Instance.QuestionAnsweredFlip          = false;

            // Get references from GameContext (utils)
            Init(context);
            AssessmentOptions.Instance.AnswerType = LivingLetterDataType.Word;
            placerOptions.AnswerWideness          = ElementsSize.Get(LivingLetterDataType.Word);
            placerOptions.QuestionWideness        = ElementsSize.Get(LivingLetterDataType.Image);

            // Instantiate the correct managers
            CreateManagers(context,
                           DragManagerType.Default,
                           LogicInjectorType.Default,
                           AnswerPlacerType.Random
                           );

            // Create the custom managers
            context.QuestionGenerator = new DefaultQuestionGenerator(context.Configuration.Questions,
                                                                     context.AudioManager,
                                                                     context.Events);
            context.QuestionPlacer = new DefaultQuestionPlacer(null, context.AudioManager, placerOptions);

            // Build the assessment
            return(CreateAssessment(context));
        }
Exemple #9
0
 private void SetWidness(LivingLetterDataType dataType)
 {
     Wideness = ElementsSize.Get(dataType);
 }