Fix StudentMarkingPeriodGrade calculation