Esempio n. 1
0
        public ActionResult UpdateItem(int announcementId, int studentId, string gradeValue, string extraCredits
                                       , string comment, bool dropped, bool?exempt, bool?incomplete, bool?late, bool?callFromGradeBook)
        {
            var studentAnn = SchoolLocator.StudentAnnouncementService.SetGrade(announcementId, studentId, gradeValue, extraCredits,
                                                                               comment, dropped, late ?? false, exempt ?? false, incomplete ?? false, (int)GradingStyleEnum.Numeric100);

            return(Json(ShortStudentAnnouncementViewData.Create(studentAnn)));
        }
Esempio n. 2
0
        public static ShortStudentsAnnouncementsViewData Create(IList <StudentAnnouncement> studentAnnouncements, int studentId)
        {
            var res = new ShortStudentsAnnouncementsViewData {
                Items = new List <ShortStudentAnnouncementViewData>()
            };
            var stAnn = studentAnnouncements.FirstOrDefault(x => x.StudentId == studentId);

            if (stAnn != null)
            {
                res.Items.Add(ShortStudentAnnouncementViewData.Create(stAnn));
            }
            return(res);
        }