예제 #1
0
        public static StudentSummaryViewData Create(StudentSummaryInfo studentSummary, Room room, ClassDetails currentClass, IList <ClassDetails> classes
                                                    , IList <StudentCustomAlertDetail> customAlerts, IList <StudentHealthCondition> healthConditions, IList <StudentHealthFormInfo> studentHealthForms, bool isStudent = false)
        {
            var res = new StudentSummaryViewData(studentSummary.StudentInfo, room, customAlerts, healthConditions, studentHealthForms)
            {
                ClassesSection = ClassViewData.Create(classes),
                AttendanceBox  =
                    StudentHoverBoxViewData <TotalAbsencesPerClassViewData> .Create(studentSummary.DailyAttendance,
                                                                                    studentSummary.Attendances, classes),
                DisciplineBox =
                    StudentHoverBoxViewData <DisciplineTypeSummaryViewData> .Create(studentSummary.InfractionSummaries,
                                                                                    studentSummary.TotalDisciplineOccurrences),
                GradesBox =
                    StudentHoverBoxViewData <StudentSummaryGradeViewData> .Create(studentSummary.StudentAnnouncements),
                RanksBox =
                    studentSummary.ClassRank != null
                        ? StudentHoverBoxViewData <StudentSummaryRankViewData> .Create(studentSummary.ClassRank)
                        : null,
                CurrentClassName = NO_CLASS_SCHEDULED,
            };

            if (currentClass != null)
            {
                res.CurrentClassName = currentClass.Name;
            }

            res.CurrentAttendanceLevel = studentSummary.CurrentAttendanceLevel;

            if (isStudent)
            {
                ClearAlertsForStudent(res);
            }

            return(res);
        }
예제 #2
0
 private static void ClearAlertsForStudent(StudentSummaryViewData vData)
 {
     vData.HasMedicalAlert     = false;
     vData.SpEdStatus          = null;
     vData.SpecialInstructions = null;
     vData.IsAllowedInetAccess = false;
 }