refactor: Import a single function, not the whole module

This commit is contained in:
stvn
2021-04-09 10:44:15 -07:00
parent 43698fff0a
commit f08dcdbf51

View File

@@ -24,7 +24,7 @@ from common.djangoapps.student.roles import CourseCcxCoachRole
from lms.djangoapps.ccx.models import CcxFieldOverride, CustomCourseForEdX
from lms.djangoapps.ccx.overrides import override_field_for_ccx
from lms.djangoapps.ccx.utils import add_master_course_staff_to_ccx, assign_staff_role_to_ccx, is_email
from lms.djangoapps.courseware import courses
from lms.djangoapps.courseware.courses import get_course_chapter_ids
from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from openedx.core.lib.api import authentication, permissions
@@ -185,7 +185,7 @@ def valid_course_modules(course_module_list, master_course_key):
Returns:
bool: whether or not all the course module strings belong to the master course
"""
course_chapters = courses.get_course_chapter_ids(master_course_key)
course_chapters = get_course_chapter_ids(master_course_key)
return set(course_module_list).intersection(set(course_chapters)) == set(course_module_list)