public ExperimentData(ExperimentData exp) : base(exp) { this.expID = -1; this.ExperimentQuestion = exp.ExperimentQuestion; this.Type = "Experiment"; RoadScholarContext rsContext = new RoadScholarContext(); this.activities = new List <ActivityData>(); foreach (ActivityData act in exp.activities) { ActivityData copiedActivity = null; if (act is TrueFalseQuestionData) { copiedActivity = new TrueFalseQuestionData((TrueFalseQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is AmericanQuestionData) { copiedActivity = new AmericanQuestionData((AmericanQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is ShortAnswerQuestionData) { copiedActivity = new ShortAnswerQuestionData((ShortAnswerQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is InstructionData) { copiedActivity = new InstructionData((InstructionData)act); rsContext.addActivity(copiedActivity); } else if (act is ImageData) { copiedActivity = new ImageData((ImageData)act); rsContext.addActivity(copiedActivity); } else if (act is VideoData) { copiedActivity = new VideoData((VideoData)act); rsContext.addActivity(copiedActivity); } else if (act is MeasurementData) { copiedActivity = new MeasurementData((MeasurementData)act); rsContext.addActivity(copiedActivity); } this.activities.Add(copiedActivity); } }
public ExperimentData(ExperimentData exp) : base(exp) { this.expID = -1; this.ExperimentQuestion = exp.ExperimentQuestion; this.Type = "Experiment"; RoadScholarContext rsContext = new RoadScholarContext(); this.activities = new List<ActivityData>(); foreach (ActivityData act in exp.activities) { ActivityData copiedActivity = null; if (act is TrueFalseQuestionData) { copiedActivity = new TrueFalseQuestionData((TrueFalseQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is AmericanQuestionData) { copiedActivity = new AmericanQuestionData((AmericanQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is ShortAnswerQuestionData) { copiedActivity = new ShortAnswerQuestionData((ShortAnswerQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is InstructionData) { copiedActivity = new InstructionData((InstructionData)act); rsContext.addActivity(copiedActivity); } else if (act is ImageData) { copiedActivity = new ImageData((ImageData)act); rsContext.addActivity(copiedActivity); } else if (act is VideoData) { copiedActivity = new VideoData((VideoData)act); rsContext.addActivity(copiedActivity); } else if (act is MeasurementData) { copiedActivity = new MeasurementData((MeasurementData)act); rsContext.addActivity(copiedActivity); } this.activities.Add(copiedActivity); } }
public SALogData(ShortAnswerQuestionData saq, DateTime d) : base(saq, d) { this.correctAnswerString = saq.correctAnswerString; }
public ShortAnswerQuestionData(ShortAnswerQuestionData saq) : base(saq) { this.correctAnswerString = saq.correctAnswerString; }
public static ShortAnswerQuestion getShortAnswerQuestionFromData(ShortAnswerQuestionData saqData) { ShortAnswerQuestion saq = new ShortAnswerQuestion(); saq.ActivityName = saqData.ActivityName; saq.expID = saqData.expID; saq.id = saqData.id; saq.RoomId = saqData.RoomId; saq.question = saqData.question; saq.explaination = saqData.explaination; saq.correctAnswerString = saqData.correctAnswerString; saq.studentsAnswers = new List<AnswerByPhone>(); if (saqData.studentsAnswers != null) { foreach (AnswerByPhoneData abpData in saqData.studentsAnswers) { saq.studentsAnswers.Add(getAnswerByPhoneFromData(abpData)); } } return saq; }