-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: course outline not found issue for ccx courses #36128
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -771,11 +771,19 @@ def get_env_setting(setting): | |
XBLOCK_SETTINGS.setdefault("VideoBlock", {})['YOUTUBE_API_KEY'] = AUTH_TOKENS.get('YOUTUBE_API_KEY', YOUTUBE_API_KEY) | ||
|
||
##### Custom Courses for EdX ##### | ||
if FEATURES.get('CUSTOM_COURSES_EDX'): | ||
INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig'] | ||
if FEATURES['CUSTOM_COURSES_EDX']: | ||
INSTALLED_APPS += [ | ||
'lms.djangoapps.ccx', | ||
'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig', | ||
'cms.djangoapps.contentstore.apps.ContentstoreConfig', | ||
'openedx.core.djangoapps.content.search', | ||
'openedx.core.djangoapps.content_staging', | ||
] | ||
|
||
MODULESTORE_FIELD_OVERRIDE_PROVIDERS += ( | ||
'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider', | ||
) | ||
COURSE_IMPORT_EXPORT_STORAGE = DEFAULT_FILE_STORAGE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We included Failure to define this setting results in an error, as demonstrated in this related build log. |
||
|
||
##### Individual Due Date Extensions ##### | ||
if FEATURES.get('INDIVIDUAL_DUE_DATES'): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to understand this better.
First of all, you're only adding 3 new apps here, right?
How is it that these aren't running already? Why does the CCX feature need them turned on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that a CCX course is created from LMS. All the above apps are already defined in CMS. The course publishing signals are not triggered in LMS until we define
cms.djangoapps.contentstore.apps.ContentstoreConfig
in ourINSTALLED_APPS
in LMS. The last 2 apps (openedx.core.djangoapps.content.search
andopenedx.core.djangoapps.content_staging
) are required to be defined as they are being used in the code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you determine that these were the minimal required apps to add from CMS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We needed to ensure that signals were triggered when creating a CCX course. When I added ContentstoreConfig to INSTALLED_APPS, I ran into this error:
RuntimeError: Model class openedx.core.djangoapps.content.search.models.SearchAccess doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
After some debugging, I found that
ContentstoreConfig
depends on thesearch
app, which wasn't listed in INSTALLED_APPS for LMS. Addingsearch
fixed the issue, and the course outline started publishing.However, I then saw another error in the logs when the course publish signals were triggered:
RuntimeError: Model class openedx.core.djangoapps.content_staging.models.StagedContent doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Adding
content_staging
to INSTALLED_APPS resolved this, and everything worked without errors.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tying this into my other comment, is it possible to add a test for triggering signals?