Ejemplo n.º 1
0
        public ExamAttemptExport export()
        {
            ExamAttemptExport data = new ExamAttemptExport();

            //Anwsers = Anwsers.ToList();
            foreach (Anwser a in Anwsers)
            {
                foreach (Mistake m in a.Mistakes)
                {
                    data.AttemptMistakes.Add(new AttemptMistakesExport(StudentID, CensorID, ID, a.ID, a.QuestionID, (float)a.Adjustment,
                                                                       m.ID, m.ArgumentID, m.AdjustedWeight));
                }
            }

            foreach (GeneralCritereaImpact i in GeneralCritereaImpacts)
            {
                if (i.AnwserID != null)
                {
                    Anwser temp = Anwsers.First(x => x.ID == i.AnwserID);
                    data.AttemptCritereas.Add(new AttemptCritereaExport(StudentID, CensorID, ID,
                                                                        (int)i.AnwserID, temp.QuestionID,
                                                                        (int)i.MistakeID, temp.Mistakes.First(x => x.AnwserID == temp.ID).ArgumentID,
                                                                        i.ExamCritereaID, i.Weight));
                }
                else
                {
                    data.AttemptCritereas.Add(new AttemptCritereaExport(StudentID, CensorID, ID,
                                                                        null, null, null, null,
                                                                        i.ExamCritereaID, i.Weight));
                }
            }

            return(data);
        }
Ejemplo n.º 2
0
 //constructor
 public Move(int prop, Anwsers anws)
 {
     Proposal = prop;
     Anwser = anws;
     When = DateTime.Now;
 }