public static Homework CreateHomeworkAndItems(DateTime classStartDate, Assignment a)
        {
            Homework newHomework = CreateHomework(classStartDate, a);

            foreach (Problem p in a.Problems)
            {
                HomeworkItem item = new HomeworkItem {
                    Problem  = p,
                    Homework = newHomework,
                    Status   = StatusType.Open
                };
                newHomework.AddHomeworkItems(item);
            }
            return(newHomework);
        }
Exemplo n.º 2
0
 public void RemoveHomework(Homework h)
 {
     Homeworks.Remove(h);
 }
Exemplo n.º 3
0
 public void AddHomework(Homework h)
 {
     Homeworks.Add(h);
 }