def _sections_quality(self, course): sections, visible_sections = self._get_sections(course) sections_with_highlights = [section for section in visible_sections if section.highlights] return dict( total_number=len(sections), total_visible=len(visible_sections), number_with_highlights=len(sections_with_highlights), highlights_active_for_course=course.highlights_enabled_for_messaging, highlights_enabled=highlights_setting.is_enabled(), )
def _sections_quality(self, course): sections, visible_sections = self._get_sections(course) sections_with_highlights = [ section for section in visible_sections if section.highlights ] return dict( total_number=len(sections), total_visible=len(visible_sections), number_with_highlights=len(sections_with_highlights), highlights_active_for_course=course. highlights_enabled_for_messaging, highlights_enabled=highlights_setting.is_enabled(), )