diff --git a/common/djangoapps/course_groups/tests/tests.py b/common/djangoapps/course_groups/tests/tests.py index b3ad928b39..e8727758c4 100644 --- a/common/djangoapps/course_groups/tests/tests.py +++ b/common/djangoapps/course_groups/tests/tests.py @@ -70,13 +70,13 @@ class TestCohorts(django.test.TestCase): "id": to_id(name)}) for name in discussions) - course.metadata["discussion_topics"] = topics + course.discussion_topics = topics d = {"cohorted": cohorted} if cohorted_discussions is not None: d["cohorted_discussions"] = [to_id(name) for name in cohorted_discussions] - course.metadata["cohort_config"] = d + course.cohort_config = d def setUp(self): diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index ba2a70371c..54498cfc56 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -260,7 +260,7 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours # by the replace_static_urls code below replace_urls=partial( static_replace.replace_static_urls, - data_directory=descriptor.data_dir, + data_directory=getattr(descriptor, 'data_dir', None), course_namespace=descriptor.location._replace(category=None, name=None), ), node_path=settings.NODE_PATH,