feat(courses): add course draft/publish lifecycle validation - #878
Merged
MaryammAli merged 1 commit intoSep 25, 2026
Merged
MaryammAli merged 1 commit into
MaryammAli merged 1 commit into
Conversation
Adds CoursePublishValidator backing the course builder's publish action (BE-077). assertCanPublish() throws a 400 INSUFFICIENT_CONTENT_TO_PUBLISH BadRequestException unless the course has at least one lesson and one task across its sections; isVisibleInCatalog() keeps drafts hidden from the catalog regardless of content. Operates on a minimal CoursePublishInput shape independent of the course entity itself, which does not exist in this codebase yet, so it can be wired into whichever persistence layer the course builder module ends up using.
|
@demilade18-git Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds course draft/publish lifecycle validation backing the course builder's publish action (BE-077).
assertCanPublish()throws400 INSUFFICIENT_CONTENT_TO_PUBLISHunless the course has at least 1 lesson and 1 task across its sectionsisVisibleInCatalog()keeps drafts hidden from the catalog regardless of contentCoursePublishInputshape independent of the course entity itself (which doesn't exist in this codebase yet), so it can be wired into whichever persistence layer the course builder module ends up usingCloses #830
Closes #829
Closes #831
Closes #832