List<MissingThing> MissingScores(EventDB eventDB)
{
List<MissingThing> missingScores = new List<MissingThing>();
foreach (Id<Course> courseId in QueryEvent.SortedCourseIds(eventDB)) {
Course course = eventDB.GetCourse(courseId);
bool anyScores = false;
List<MissingThing> missingScoresThisCourse = new List<MissingThing>();
if (course.kind == CourseKind.Score) {
for (Id<CourseControl> courseControlId = course.firstCourseControl;
courseControlId.IsNotNone;
courseControlId = eventDB.GetCourseControl(courseControlId).nextCourseControl)
{
CourseControl courseControl = eventDB.GetCourseControl(courseControlId);
if (eventDB.GetControl(courseControl.control).kind == ControlPointKind.Normal) {
if (courseControl.points <= 0)
missingScoresThisCourse.Add(new MissingThing(courseId, courseControl.control, ReportText.EventAudit_MissingScore));
else
anyScores = true;
}
}
if (anyScores)
missingScores.AddRange(missingScoresThisCourse); // only report missing scores if some control in this course has a score.
}
}
return missingScores;
}