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 TrueFalseQuestionData(TrueFalseQuestionData tfq) : base(tfq) { this.correctAnswerBool = tfq.correctAnswerBool; this.counterTrue = 0; this.counterFalse = 0; }
public TrueFalseQuestionData(TrueFalseQuestionData tfq) : base(tfq) { this.correctAnswerBool = tfq.correctAnswerBool; this.counterTrue = 0; this.counterFalse = 0; }
public static TrueFalseQuestionData getTrueFalseQuestionAsData(TrueFalseQuestion tfq) { TrueFalseQuestionData tfqData = new TrueFalseQuestionData(); tfqData.ActivityName = tfq.ActivityName; tfqData.expID = tfq.expID; tfqData.id = tfq.id; tfqData.RoomId = tfq.RoomId; tfqData.question = tfq.question; tfqData.explaination = tfq.explaination; tfqData.correctAnswerBool = tfq.correctAnswerBool; tfqData.counterFalse = tfq.counterFalse; tfqData.counterTrue = tfq.counterTrue; tfqData.studentsAnswers = new List<AnswerByPhoneData>(); if (tfq.studentsAnswers != null) { foreach (AnswerByPhone abp in tfq.studentsAnswers) { tfqData.studentsAnswers.Add(getAnswerByPhoneAsData(abp)); } } return tfqData; }
public static TrueFalseQuestion getTrueFalseQuestionFromData(TrueFalseQuestionData tfqData) { TrueFalseQuestion tfq = new TrueFalseQuestion(); tfq.ActivityName = tfqData.ActivityName; tfq.expID = tfqData.expID; tfq.id = tfqData.id; tfq.isMainActivity = tfqData.isMainActivity; tfq.RoomId = tfqData.RoomId; tfq.Type = tfqData.Type; tfq.question = tfqData.question; tfq.explaination = tfqData.explaination; tfq.correctAnswerBool = tfqData.correctAnswerBool; tfq.counterFalse = tfqData.counterFalse; tfq.counterTrue = tfqData.counterTrue; tfq.studentsAnswers = new List<AnswerByPhone>(); if (tfqData.studentsAnswers != null) { foreach (AnswerByPhoneData abpData in tfqData.studentsAnswers) { tfq.studentsAnswers.Add(getAnswerByPhoneFromData(abpData)); } } return tfq; }
public TFQLogData(TrueFalseQuestionData tfq, DateTime d) : base(tfq, d) { this.correctAnswerBool = tfq.correctAnswerBool; this.counterTrue = tfq.counterTrue; this.counterFalse = tfq.counterFalse; }
public TFQLogData(TrueFalseQuestionData tfq, DateTime d) : base(tfq, d) { this.correctAnswerBool = tfq.correctAnswerBool; this.counterTrue = tfq.counterTrue; this.counterFalse = tfq.counterFalse; }