private void AddSpecials(CourseDesignator courseDesignator, bool addNonDescriptionSpecials, bool addDescriptionSpecials)
{
bool multiPart = courseDesignator.IsNotAllControls && courseDesignator.AllParts && (QueryEvent.CountCourseParts(eventDB, courseDesignator.CourseId) > 1);
foreach (Id<Special> specialId in eventDB.AllSpecialIds) {
SpecialKind specialKind = eventDB.GetSpecial(specialId).kind;
if (ShouldAddSpecial(specialKind, addNonDescriptionSpecials, addDescriptionSpecials)) {
if (specialKind == SpecialKind.Descriptions) {
// Descriptions are added differently. It's not entirely clear the best way to handle descriptions
// for all-parts of a multi-part course. For now, we don't put any descriptions on.
if (!multiPart) {
if (QueryEvent.CourseContainsSpecial(eventDB, courseDesignator, specialId))
descriptionViews.Add(new DescriptionView(specialId, courseDesignator));
}
}
else {
if (QueryEvent.CourseContainsSpecial(eventDB, courseDesignator, specialId))
specialIds.Add(specialId);
}
}
}
}