Exemplo n.º 1
0
        public static ActiveExperiment getActiveExperimentFromData(ActiveExperimentData aeData)
        {
            ActiveExperiment ae = new ActiveExperiment();

            ae.ActiveExpID        = aeData.ActiveExpID;
            ae.ExpID              = aeData.ExpID;
            ae.MaxStudentPerGroup = aeData.MaxStudentPerGroup;
            ae.NumberOfGroups     = aeData.NumberOfGroups;
            return(ae);
        }
Exemplo n.º 2
0
 public static ActiveExperiment getActiveExperimentFromData(ActiveExperimentData aeData)
 {
     ActiveExperiment ae = new ActiveExperiment();
     ae.ActiveExpID = aeData.ActiveExpID;
     ae.ExpID = aeData.ExpID;
     ae.MaxStudentPerGroup = aeData.MaxStudentPerGroup;
     ae.NumberOfGroups = aeData.NumberOfGroups;
     return ae;
 }
Exemplo n.º 3
0
 public static ActiveExperimentData getActiveExperimentAsData(ActiveExperiment ae)
 {
     ActiveExperimentData aeData = new ActiveExperimentData();
     aeData.ActiveExpID = ae.ActiveExpID;
     aeData.ExpID = ae.ExpID;
     aeData.MaxStudentPerGroup = ae.MaxStudentPerGroup;
     aeData.NumberOfGroups = ae.NumberOfGroups;
     return aeData;
 }
Exemplo n.º 4
0
 public ActionResult StudentsProgress(ActiveExperiment ae)
 {
     ActiveExperimentData aeData = Adapting.getActiveExperimentAsData(ae);
     ExperimentData expData = (ExperimentData)rsContext.getActivity(ae.ExpID);
     rsContext.addActiveExperiment(aeData);
     expData.ActiveExpID = aeData.ActiveExpID;
     ae.ActiveExpID = aeData.ActiveExpID;
     rsContext.SaveChanges();
     TempData["NumberOfExperimentSteps"] = expData.activities.Count;
     TempData["DifferenceBetweenMeasures"] = 0;
     TempData["NumOfMeasures"] = 0;
     foreach (ActivityData act in expData.activities)
     {
         if(act is MeasurementData)
         {
             MeasurementData measurement = (MeasurementData)act;
             TempData["DifferenceBetweenMeasures"] = measurement.DifferenceBetweenMeasures;
             TempData["NumOfMeasures"] = measurement.NumOfMeasures;
         }
     }
     return View(ae);
 }