예제 #1
0
        public void AddClass(Class toAddClass)
        {
            if (Classes.Any(c => c.Id == toAddClass.Id))
            {
                throw new Exception("Class already added.");
            }

            Classes.Add(toAddClass);
        }
 public Evaluation(string description, EvaluationTemplate evaluationTemplate, Student student, DateTime evaluationDate, Course course, ICollection<EvaluationItem> evaluationItems, string generalComment, Guid bundleId, Class createdForClass)
 {
     Description = description;
     EvaluationTemplate = evaluationTemplate;
     Student = student;
     EvaluationDate = evaluationDate;
     Course = course;
     EvaluationItems = evaluationItems;
     GeneralComment = generalComment;
     BundleId = bundleId;
     CreatedForClass = createdForClass;
     EditAbleState = new EditableState();
 }
예제 #3
0
        public void AddNewEvaluations( string description, Class klas, EvaluationTemplate evaluationTemplate, DateTime evaluationDate, Course course)
        {
            Guid bundleId = Guid.NewGuid();
            foreach (var student in klas.Students)
            {
                List<EvaluationItem> evaluationItems = new List<EvaluationItem>();
                foreach (var subsection in evaluationTemplate.EvaluationSubSections)
                {
                    foreach (Goal goal in subsection.Goals)
                    {
                        evaluationItems.Add(new EvaluationItem(goal, subsection));
                    }
                }

                AddEvaluation(new Evaluation(description, evaluationTemplate, student, evaluationDate, course, evaluationItems, "", bundleId,klas));
            }
        }