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);
        }
Пример #2
0
 public void RemoveHomeworkItems(HomeworkItem hwi)
 {
     HomeworkItems.Remove(hwi);
 }
Пример #3
0
 public void AddHomeworkItems(HomeworkItem hwi)
 {
     HomeworkItems.Add(hwi);
 }