I'm not sure if I'm understanding perfectly, but the get_instructing_sections as written includes secondary sections. Is that what you want? (ie get_instructing_sections is a superset of get_course_secondary_sections).