public DiagnosisLevelSnapshotSerialized(DiagnosisLevelSnapshot dls)
    {
        this.DiagnosisLevel = dls.DiagnosisLevel;
        this.StartTime      = dls.StartTime;

        if (dls.School != null)
        {
            SchoolSerialized ss = new SchoolSerializedDAO().LoadByObjectId(dls.School.ObjectId);
            if (ss != null)
            {
                this.SchoolSerialized = ss;
            }
            else
            {
                //Debug.Log ("Serialized: There is no relationship saved");
            }
        }

        if (dls.Student != null)
        {
            StudentSerialized ss = new StudentSerializedDAO().LoadByObjectId(dls.Student.ObjectId);
            if (ss != null)
            {
                this.StudentSerialized = ss;
            }
            else
            {
                //Debug.Log ("Serialized: There is no relationship saved");
            }
        }
    }
Exemplo n.º 2
0
    public NoteSerialized(Note n)
    {
        base.ObjectId  = n.ObjectId;
        base.CreatedAt = n.CreatedAt;
        base.UpdatedAt = n.UpdatedAt;
        //base.Id = 0;

        this.NoteText  = n.NoteText;
        this.WrittenAt = n.WrittenAt;

        if (n.School != null)
        {
            SchoolSerialized ss = new SchoolSerializedDAO().LoadByObjectId(n.School.ObjectId);
            if (ss != null)
            {
                this.SchoolSerialized = ss;
            }
            else
            {
                //Debug.Log ("Serialized: There is no relationship saved");
            }
        }

        if (n.Student != null)
        {
            StudentSerialized ss = new StudentSerializedDAO().LoadByObjectId(n.Student.ObjectId);
            if (ss != null)
            {
                this.StudentSerialized = ss;
            }
            else
            {
                //Debug.Log ("Serialized: There is no relationship saved");
            }
        }

        if (n.Teacher != null)
        {
            TeacherSerialized ts = new TeacherSerializedDAO().LoadByObjectId(n.Teacher.ObjectId);
            if (ts != null)
            {
                this.TeacherSerialized = ts;
            }
            else
            {
                Debug.Log("Serialized: There is no relationship saved");
            }
        }
    }
Exemplo n.º 3
0
    public WrittenWordSerialized(WrittenWord ww)
    {
        base.ObjectId  = ww.ObjectId;
        base.CreatedAt = ww.CreatedAt;
        base.UpdatedAt = ww.UpdatedAt;
        //base.Id = 0;

        this.DiagnosisLevel = ww.DiagnosisLevel;
        this.Expected       = ww.Expected;
        this.Gesture        = ww.Gesture;
        this.Input          = ww.Input;
        this.WrittenAt      = ww.WrittenAt;

        if (ww.School != null)
        {
            SchoolSerialized ss = new SchoolSerializedDAO().LoadByObjectId(ww.School.ObjectId);
            if (ss != null)
            {
                this.SchoolSerialized = ss;
            }
            else
            {
                Debug.Log("Serialized: There is no relationship saved");
            }
        }

        if (ww.Student != null)
        {
            StudentSerialized ss = new StudentSerializedDAO().LoadByObjectId(ww.Student.ObjectId);
            if (ss != null)
            {
                this.StudentSerialized = ss;
            }
            else
            {
                Debug.Log("Serialized: There is no relationship saved");
            }
        }
    }
    public ChallengeOutputSerialized(ChallengeOutput co)
    {
        this.Asserts            = co.Asserts;
        this.AssertsPercentage  = co.AssertsPercentage;
        this.ChallengeExcercise = co.ChallengeExercise;
        this.Duration           = co.Duration;
        this.Etapa          = co.Etapa;
        this.EtapaChallenge = co.EtapaChallenge;
        this.Minigame       = co.Minigame;
        this.Summarized     = co.Summarized;
        this.Timestamp      = co.Timestamp;
        this.WeekSummarized = co.WeekSummarized;

        if (co.School != null)
        {
            SchoolSerialized ss = new SchoolSerializedDAO().LoadByObjectId(co.School.ObjectId);
            if (ss != null)
            {
                this.SchoolSerialized = ss;
            }
            else
            {
//				Debug.Log ("Serialized: There is no relationship saved");
            }
        }

        if (co.Student != null)
        {
            StudentSerialized ss = new StudentSerializedDAO().LoadByObjectId(co.Student.ObjectId);
            if (ss != null)
            {
                this.StudentSerialized = ss;
            }
            else
            {
//				Debug.Log ("Serialized: There is no relationship saved");
            }
        }
    }
Exemplo n.º 5
0
    public WeekSummarySerialized(WeekSummary ws)
    {
        this.Asserts           = ws.Asserts;
        this.AssertsPercentage = ws.AssertsPercentage;
        this.Etapa             = ws.Etapa;
        this.EtapaChallenge    = ws.EtapaChallenge;
        this.Minigame          = ws.Minigame;
        this.TimesPlayed       = ws.TimesPlayed;
        this.TotalTime         = ws.TotalTime;
        this.Week = ws.Week;

        if (ws.School != null)
        {
            SchoolSerialized ss = new SchoolSerializedDAO().LoadByObjectId(ws.School.ObjectId);
            if (ss != null)
            {
                this.SchoolSerialized = ss;
            }
            else
            {
                //Debug.Log ("Serialized: There is no relationship saved");
            }
        }

        if (ws.Student != null)
        {
            StudentSerialized ss = new StudentSerializedDAO().LoadByObjectId(ws.Student.ObjectId);
            if (ss != null)
            {
                this.StudentSerialized = ss;
            }
            else
            {
                //Debug.Log ("Serialized: There is no relationship saved");
            }
        }
    }