backport the CurrentCourseIterator from db branch