Beispiel #1
0
        internal static TableQuestion CreateTableQuestion(CreateQuestionContentDelegate bodyCallback, CreateQuestionOptionDelegate optionCallback)
        {
            TableQuestion tableQuestion = new TableQuestion();

            bodyCallback(tableQuestion.Content);
            foreach (QuestionOption option in optionCallback())
            {
                tableQuestion.QuestionOptionCollection.Add(option);
            }

            return(tableQuestion);
        }
Beispiel #2
0
        internal static MCQuestion CreateMCQuestion(CreateQuestionContentDelegate bodyCallback, CreateQuestionOptionDelegate optionCallback)
        {
            MCQuestion mcQuestion = new MCQuestion();

            bodyCallback(mcQuestion.Content);
            foreach (QuestionOption option in optionCallback())
            {
                mcQuestion.QuestionOptionCollection.Add(option);
            }

            mcQuestion.RandomOption = false;

            return(mcQuestion);
        }