Skip to content

Prevent copying assignments#2918

Open
cqnykamp wants to merge 1 commit into
mainfrom
claude/modest-franklin-e19MO
Open

Prevent copying assignments#2918
cqnykamp wants to merge 1 commit into
mainfrom
claude/modest-franklin-e19MO

Conversation

@cqnykamp

Copy link
Copy Markdown
Contributor

$(cat <<'EOF'

Summary

Closes #2614

  • Backend: copyContent now throws InvalidRequestError("Cannot copy an assignment") when any of the requested content IDs is an assignment root (isAssignmentRoot = true). Previously, copying an assignment was silently allowed, producing a regular activity without assignment data.
  • Frontend: The "Make a copy" button in the Activities page action bar is now disabled whenever any selected item is an assignment (has assignmentInfo set).
  • Tests: Two new API unit tests in copy_move.test.ts verify that copying a sequence-based assignment and a singleDoc assignment both throw the expected error.

Test plan

  • Select a non-assignment activity and verify "Make a copy" is still enabled and works
  • Select an assignment and verify "Make a copy" button is disabled
  • API test: cannot copy an assignment passes in CI
  • API test: cannot copy an assignment (singleDoc) passes in CI

https://claude.ai/code/session_019HTqQkPWkZ35RM1x1HRQ2W
EOF
)


Generated by Claude Code

- Backend: throw InvalidRequestError when attempting to copy an assignment root
- Frontend: disable "Make a copy" action bar button when any selected item is an assignment
- Tests: add two tests covering attempt to copy singleDoc and sequence assignment roots

https://claude.ai/code/session_019HTqQkPWkZ35RM1x1HRQ2W
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.

Make a copy of assignment

2 participants