Пример #1
0
 public void UpdateAnswers(AnswerKeyOpticalFormSection section)
 {
     foreach (var answer in section.Answers)
     {
         Answers
         .FirstOrDefault(a => a.QuestionNo == answer.QuestionNo)
         ?.SetCorrectAnswer(answer);
     }
 }
Пример #2
0
 public StudentOpticalFormSection(AnswerKeyOpticalFormSection section)
     : this()
 {
     MaxQuestionCount = section.MaxQuestionCount;
     ListOrder        = section.ListOrder;
     FormPart         = section.FormPart;
     LessonName       = section.LessonName;
     LessonId         = section.LessonId;
 }
 public AnswerKeyOpticalFormSection(AnswerKeyOpticalFormSection answerKeyOpticalFormSection)
     : this()
 {
     LessonName       = answerKeyOpticalFormSection.LessonName;
     LessonId         = answerKeyOpticalFormSection.LessonId;
     ListOrder        = answerKeyOpticalFormSection.ListOrder;
     MaxQuestionCount = answerKeyOpticalFormSection.MaxQuestionCount;
     FormPart         = answerKeyOpticalFormSection.FormPart;
 }
Пример #4
0
        public void AddEmptySection(AnswerKeyOpticalFormSection answerKeyOpticalFormSection)
        {
            var section = new StudentOpticalFormSection(answerKeyOpticalFormSection)
            {
                Answers = answerKeyOpticalFormSection.Answers
                          .Select(a => new QuestionAnswer(a.QuestionNo, QuestionAnswer.Empty))
                          .ToList(),
            };

            Sections.Add(section);
        }