Repository navigation
Support a different instructor per course in repository publishing - #245
Merged
Merged
Conversation
A course can name its own instructor with creatorEmail in its course.yaml. The course is published under, and bound to, that account. A course without creatorEmail uses the default instructor in courses/publishing.yaml, exactly as before. Before this change a creatorEmail that differed from publishing.yaml made the publish check fail with "creatorEmail conflicts with courses/publishing.yaml". Every instructor used in a release is checked (verified, Mentor or Admin, ZIP import enabled) before any course changes, so one missing account stops the whole release. Ownership binding keeps the previous owner as COURSE_CREATOR, as before. Same change as devweekends/Edorax-core#152, which edits the vendored copy of this script.
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.
The same change as
devweekends/Edorax-core#152(merged), applied to this repository's original ofserver/scripts/repository-course-publish.ts.publisher/in Edorax-core is a synced copy of this file (scripts/sync-publisher-from-platform.sh). Without this change, the next sync would overwrite the per-course instructor support there.What changes
A course can name its own instructor with
creatorEmailin itscourse.yaml. It is then published under, and bound to, that account. Courses withoutcreatorEmailuse the default instructor incourses/publishing.yaml, exactly as before. Before this, acreatorEmailthat differed frompublishing.yamlmade the publish check fail with "creatorEmail conflicts with courses/publishing.yaml".COURSE_CREATOR.Course.mentorIdandCourseInstructorrows can change, the same rows the release already changes. Releases, progress, pricing and content are untouched. The instructor name shown in the catalog follows the course owner.Tests
tests/scripts/repository-course-publish.test.ts(default vs own instructor, the transport ZIP carries the course's instructor, distinct instructors are listed once without regard to case). The file passes (14 tests). Type check clean.tests/scriptsfail to run in a fresh checkout. They fail the same way on an unmodifiedorigin/main(same 7 files), so this change does not cause them.creatorEmailcreated under that instructor, others under the default, ownership moved with the old owner kept, and an unknown email stopped the release with no change. This copy has not been run against a database.Notes
creatorEmailexactly as the account's email is stored.