From 082030c83b53296a8305e350abbacf15d20385ac Mon Sep 17 00:00:00 2001 From: Stephannie Jimenez Date: Wed, 10 Jan 2024 11:11:21 -0500 Subject: [PATCH] fix: add permissions roles to new course --- cms/djangoapps/api/v1/serializers/course_runs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cms/djangoapps/api/v1/serializers/course_runs.py b/cms/djangoapps/api/v1/serializers/course_runs.py index 6bbbce96dd42..3148b905f910 100644 --- a/cms/djangoapps/api/v1/serializers/course_runs.py +++ b/cms/djangoapps/api/v1/serializers/course_runs.py @@ -13,6 +13,7 @@ from cms.djangoapps.contentstore.views.course import create_new_course, get_course_and_check_access, rerun_course from common.djangoapps.student.models import CourseAccessRole from openedx.core.lib.courses import course_image_url +from openedx.core.djangoapps.django_comment_common.utils import seed_permissions_roles from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order IMAGE_TYPES = { @@ -235,4 +236,5 @@ def create(self, validated_data): dest_key = CourseKey.from_string(destination_course_id) with store.default_store('split'): new_course = store.clone_course(source_key, dest_key, user_id) + seed_permissions_roles(dest_key) return new_course