private async Task <ReportCard> GetInowReportData(ReportCardsInputModel inputModel) { Trace.Assert(ServiceLocator.Context.SchoolYearId.HasValue); Trace.Assert(ServiceLocator.Context.SchoolLocalId.HasValue); BaseSecurity.EnsureDistrictAdmin(ServiceLocator.Context); if (inputModel == null) { throw new ArgumentNullException(nameof(ReportCardsInputModel)); } var studentIds = inputModel.StudentIds ?? new List <int>(); if (inputModel.GroupIds != null && inputModel.GroupIds.Count > 0) { studentIds.AddRange(ServiceLocator.GroupService.GetStudentIdsByGroups(inputModel.GroupIds)); studentIds = studentIds.Distinct().ToList(); } var options = new ReportCardOptions { AbsenceReasonIds = inputModel.AttendanceReasonIds, GradingPeriodId = inputModel.GradingPeriodId, AcadSessionId = ServiceLocator.Context.SchoolYearId.Value, IncludeAttendance = inputModel.IncludeAttendance, IncludeGradingPeriodNotes = inputModel.IncludeGradingPeriodNotes, IncludeComments = inputModel.IncludeComments, IncludeMeritDemerit = inputModel.IncludeMeritDemerit, IncludeWithdrawnStudents = inputModel.IncludeWithdrawnStudents, IncludePromotionStatus = inputModel.IncludePromotionStatus, IncludeYearToDateInformation = inputModel.IncludeYearToDateInformation, IncludeGradingScales = inputModel.IncludeGradingScaleStandards || inputModel.IncludeGradingScaleTraditional, StudentIds = studentIds, Recipient = inputModel.RecipientStr, IncludeStandards = inputModel.StandardTypeEnum != StandardsType.None }; return(await ConnectorLocator.ReportConnector.GetReportCardData(options)); }
public async Task <ReportCard> GetReportCardData(ReportCardOptions options) { return(await PostAsync <ReportCard, ReportCardOptions>($"{BaseUrl}reports/reportcard", options)); }