Skip to content

feat: apply NEW_COURSE_CATALOG_VISIBILITY in the course-create API - #397

Merged
AliAlfaifi merged 1 commit into
mainfrom
feat/new-course-catalog-visibility
Oct 12, 2026
Merged

AliAlfaifi merged 1 commit into
mainfrom
feat/new-course-catalog-visibility

Conversation

@AliAlfaifi

@AliAlfaifi AliAlfaifi commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

POST /api/fx/courses/v1/courses/ creates the course with modulestore().create_course(...) directly, so it bypasses Studio's course-creation code. The platform fork is gaining an opt-in setting, NEW_COURSE_CATALOG_VISIBILITY (nelc/edx-platform#106), that makes new courses start with a configured catalogue visibility (for example hidden until an author publishes them). This applies the same setting here so API-created courses behave like Studio-created ones.

Change

CourseCreateSerializer.create: when settings.NEW_COURSE_CATALOG_VISIBILITY is set, add catalog_visibility to the fields passed to create_course. Unset / None / not defined → no change.

Testing

  • New parametrized test test_create_catalog_visibility_setting (set, None, not defined).
  • Full suite on the teak environment: 2,253 passed, 100% coverage gate met.
  • flake8, pycodestyle, pydocstyle, isort --check-only, mypy clean; pylint 10.00/10 on the changed files.
  • Not run: redwood and sumac environments.

Notes

🤖 Generated with Claude Code

The course-create API calls modulestore().create_course directly and bypasses Studio, so it has to apply the platform's catalog visibility for new courses itself. No change while the setting is unset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AliAlfaifi
AliAlfaifi merged commit 799a08e into main Oct 12, 2026
2 checks passed
@AliAlfaifi
AliAlfaifi deleted the feat/new-course-catalog-visibility branch October 12, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant