Skip to content

Assignments copied between courses now default to unpublished - #2620

Open
hergin wants to merge 1 commit into
instructure:masterfrom
hergin:master
Open

Assignments copied between courses now default to unpublished#2620
hergin wants to merge 1 commit into
instructure:masterfrom
hergin:master

Conversation

@hergin

@hergin hergin commented Mar 30, 2026

Copy link
Copy Markdown

When copying an assignment from one course to another, the copied assignment was automatically published in the new course. This change makes copied assignments default to an unpublished state instead, giving instructors a chance to review the assignment before it becomes available to students. If an assignment's workflow state is explicitly set in the source course, that state is preserved during the copy.

Test Plan:

  • Create a published assignment in a source course
  • Copy the course to a new course
  • Verify the copied assignment is unpublished in the new course
  • Verify that if an unpublished assignment is copied, it remains unpublished

When copying an assignment from one course to another, the copied
assignment was automatically published in the new course. This change makes copied assignments default to an unpublished state instead, giving instructors a chance to review the assignment before it becomes available to students. If an assignment's workflow state is explicitly set in the source course, that state is preserved during the copy.

Test Plan:
  - Create a published assignment in a source course
  - Copy the course to a new course
  - Verify the copied assignment is unpublished in the new course
  - Verify that if an unpublished assignment is copied, it remains unpublished
@CLAassistant

CLAassistant commented Apr 23, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hergin

hergin commented May 30, 2026

Copy link
Copy Markdown
Author

Why is this still pending? @spencerolson

udengwusomtochukwu added a commit to udengwusomtochukwu/canvas-lms that referenced this pull request Jul 2, 2026
Adapted from upstream PR instructure#2620, which changes the importer's fallback
default (hash[:workflow_state] || 'unpublished'). That fallback never
fires for Canvas course copy — the cartridge exporter always writes
workflow_state and the converter always reads it back — so the PR as
written is a no-op for its stated case (verified empirically on a
running instance; its spec was never run by upstream CI).

Instead, scope the rule to the course_copy_importer migration type:
copied assignments arrive unpublished so teachers review them before
students can see them. Classic-quiz assignment shells are excluded
(their state follows the quiz), and blueprint syncs and cartridge
imports keep upstream behavior.
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.

3 participants