public override StudentWithMetrics.IndicatorMetric OnStudentAssessmentInitialized(StudentWithMetricsAndAssessments studentWithMetricsAndAssessments,
            List<StudentMetric> studentList, StaffModel.SubjectArea subjectArea)
        {
            int metricVariantId = -1;
            switch (subjectArea)
            {
                case StaffModel.SubjectArea.Mathematics:
                    metricVariantId = (int)NweaStudentMetricEnum.MAPMathematics;
                    break;
                case StaffModel.SubjectArea.ELA:
                    metricVariantId = (int) NweaStudentMetricEnum.MAPReading;
                    break;
                case StaffModel.SubjectArea.Science:
                    metricVariantId = (int) NweaStudentMetricEnum.MAPScience;
                    break;
                case StaffModel.SubjectArea.Writing:
                    metricVariantId = (int) NweaStudentMetricEnum.MAPLanguage;
                    break;
            }

            var metric =
                studentList.FirstOrDefault(x => x.MetricVariantId == metricVariantId);

            return new StudentWithMetrics.IndicatorMetric(studentWithMetricsAndAssessments.StudentUSI)
            {
                MetricVariantId = metricVariantId,
                MetricIndicator = metric != null && metric.IndicatorTypeId.HasValue ? metric.IndicatorTypeId.Value : 0,
                State = metric != null && metric.MetricStateTypeId.HasValue ? (MetricStateType)metric.MetricStateTypeId : MetricStateType.None,
                Value = metric != null ? metric.Value : null,
                DisplayValue = metric != null ? metric.Value : ""
            };
        }
예제 #2
0
 public virtual StudentWithMetrics.IndicatorMetric OnStudentAssessmentInitialized(StudentWithMetricsAndAssessments studentWithMetricsAndAssessments, IEnumerable<StudentMetric> studentMetrics, dynamic subjectArea)
 {
     return new StudentWithMetrics.IndicatorMetric(studentWithMetricsAndAssessments.StudentUSI)
                 {
                     MetricVariantId = -1,
                     MetricIndicator = (int)MetricIndicatorType.None,
                     State = MetricStateType.None,
                     Value = null
                 };
 }
 public virtual StudentWithMetrics.IndicatorMetric OnStudentAssessmentInitialized(
     StudentWithMetricsAndAssessments studentWithMetricsAndAssessments, List<StudentMetric> studentList, StaffModel.SubjectArea subjectArea)
 {
     System.Diagnostics.Debug.Assert(studentList.Count > 0);
     return new StudentWithMetrics.IndicatorMetric(studentList[0].StudentUSI)
     {
         MetricVariantId = -1,
         MetricIndicator = (int)MetricIndicatorType.None,
         State = MetricStateType.None,
         Value = null
     };
 }
 protected override void EstablishContext()
 {
     provider = new AssessmentDetailsProvider();
     studentMetrics = new List<StudentMetric>();
     studentWithMetricsAndAssessments = new StudentWithMetricsAndAssessments(160);
 }