public static AdditionalPriorYearMetricProviderHelperResult GetMetricToUse(StudentSchoolMetricInstance priorYearMetric, StudentMetric currentMetric, string columnPrefix)
 {
     if (columnPrefix.StartsWith("PriorYear"))
         return new AdditionalPriorYearMetricProviderHelperResult
             (priorYearMetric.StudentUSI, priorYearMetric.SchoolId, priorYearMetric.MetricId, priorYearMetric.MetricStateTypeId, priorYearMetric.Value, priorYearMetric.ValueTypeName, priorYearMetric.TrendDirection);
     return new AdditionalPriorYearMetricProviderHelperResult
         (currentMetric.StudentUSI, currentMetric.SchoolId, currentMetric.MetricId, currentMetric.MetricStateTypeId, currentMetric.Value, currentMetric.ValueTypeName, currentMetric.TrendDirection);
 }
 protected override void ExecuteTest()
 {
     _sourceMetric = new StudentMetric()
         {
             TrendDirection = 1,
             TrendInterpretation = 1,
             MetricStateTypeId = 1
         };
 }
 public static AdditionalPriorYearMetricRequest Create(MetadataColumn metadataItem, StudentSchoolMetricInstance priorYearStudentList, StudentMetric studentDataRow)
 {
     return new AdditionalPriorYearMetricRequest
     {
         MetadataItem = metadataItem,
         PriorYearStudentList = priorYearStudentList,
         StudentDataRow = studentDataRow
     };
 }
Exemple #4
0
 private MetricStateType GetMetricState(StudentMetric studentMetric)
 {
     if (studentMetric.MetricStateTypeId.HasValue)
         return (MetricStateType)studentMetric.MetricStateTypeId.Value;
     return MetricStateProvider.GetState(studentMetric.MetricId, studentMetric.Value, studentMetric.ValueTypeName).StateType;
 }
Exemple #5
0
 private static string GetDisplayValue(StudentMetric studentMetric, dynamic value)
 {
     if (studentMetric.Value == null)
         return string.Empty;
     var format = "{0}";
     if (!string.IsNullOrWhiteSpace(studentMetric.Format))
         format = studentMetric.Format;
     return string.Format(format, value);
 }