protected AnnouncementMonthCalendarViewData(DateTime date, bool isCurrentMonth
                                             , IList <ClassAnnouncement> classAnnouncements, IList <LessonPlan> lessonPlans
                                             , IList <AdminAnnouncement> adminAnnouncements, IList <SupplementalAnnouncement> supplementalAnnouncements, IList <ClaimInfo> claims)
     : base(date, isCurrentMonth)
 {
     Announcements             = ClassAnnouncementViewData.Create(classAnnouncements, claims);
     LessonPlans               = LessonPlanViewData.Create(lessonPlans);
     AdminAnnouncements        = AdminAnnouncementViewData.Create(adminAnnouncements);
     SupplementalAnnouncements = SupplementalAnnouncementViewData.Create(supplementalAnnouncements);
 }
Beispiel #2
0
 public static GradingStandardClassItemViewData Create(IList <ClassAnnouncement> announcements,
                                                       decimal?avg, Standard standard, IList <ClaimInfo> claims)
 {
     return(new GradingStandardClassItemViewData
     {
         ItemDescription = StandardViewData.Create(standard),
         Avg = avg,
         Announcements = ClassAnnouncementViewData.Create(announcements, claims)
     });
 }
        public static GradingClassSummaryItemViewData Create(IList <AnnouncementDetails> announcements,
                                                             GradedClassAnnouncementType announcementType, IList <ClaimInfo> claims)
        {
            var res = new GradingClassSummaryItemViewData
            {
                Percent       = announcementType.Percentage,
                Type          = ClassAnnouncementTypeViewData.Create(announcementType),
                Avg           = (decimal?)announcementType.Avg,
                Announcements = announcements.Select(x => ClassAnnouncementViewData.Create(x.ClassAnnouncementData, claims)).ToList()
            };

            return(res);
        }
Beispiel #4
0
        public static StudentClassExplorerViewData Create(StudentClassExplorerInfo classExplorerInfo, IList <ClaimInfo> claims)
        {
            var res = new StudentClassExplorerViewData();

            if (classExplorerInfo.ClassInfo != null)
            {
                res.Class = ShortClassViewData.Create(classExplorerInfo.ClassInfo);
            }
            res.Avg = classExplorerInfo.Avg;
            if (classExplorerInfo.MostImportantAnnouncement != null)
            {
                res.ImportantAnnouncement = ClassAnnouncementViewData.Create(classExplorerInfo.MostImportantAnnouncement.ClassAnnouncementData, claims);
            }
            res.Standards = classExplorerInfo.Standards.Select(StudentStandardGradeViewData.Create).ToList();
            return(res);
        }
Beispiel #5
0
        public ActionResult ListClassAnnsByDateRange(DateTime?startDate, DateTime?endDate, int?classId)
        {
            var res = SchoolLocator.ClassAnnouncementService.GetClassAnnouncements(startDate, endDate, classId, null, null);

            return(Json(ClassAnnouncementViewData.Create(res, Context.Claims)));
        }