refactor: Import a single function, not the whole module
This commit is contained in:
@@ -24,7 +24,7 @@ from common.djangoapps.student.roles import CourseCcxCoachRole
|
|||||||
from lms.djangoapps.ccx.models import CcxFieldOverride, CustomCourseForEdX
|
from lms.djangoapps.ccx.models import CcxFieldOverride, CustomCourseForEdX
|
||||||
from lms.djangoapps.ccx.overrides import override_field_for_ccx
|
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.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 lms.djangoapps.instructor.enrollment import enroll_email, get_email_params
|
||||||
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
|
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
|
||||||
from openedx.core.lib.api import authentication, permissions
|
from openedx.core.lib.api import authentication, permissions
|
||||||
@@ -185,7 +185,7 @@ def valid_course_modules(course_module_list, master_course_key):
|
|||||||
Returns:
|
Returns:
|
||||||
bool: whether or not all the course module strings belong to the master course
|
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)
|
return set(course_module_list).intersection(set(course_chapters)) == set(course_module_list)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user