Skip to content

bugfix: cross-assignment grader membership changes#8072

Merged
david-yz-liu merged 3 commits into
MarkUsProject:masterfrom
YheChen:bug/assign-and-unassign-tas
Jul 22, 2026
Merged

bugfix: cross-assignment grader membership changes#8072
david-yz-liu merged 3 commits into
MarkUsProject:masterfrom
YheChen:bug/assign-and-unassign-tas

Conversation

@YheChen

@YheChen YheChen commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

Restrict grader assignment and unassignment operations to groupings belonging to the requested assignment.

Previously, Grouping.assign_tas validated grouping IDs with a global query. A grouping from another assignment could therefore be included in a bulk assignment. Grouping.unassign_tas similarly deleted TA memberships using only their membership IDs, so a membership from another assignment could be removed.

This PR:

  • scopes grouping IDs in assign_tas through the supplied assignment;
  • scopes grouping IDs in unassign_tas through the supplied assignment;
  • restricts membership deletion by both membership ID and validated grouping ID; and
  • adds regression tests that mix valid and cross-assignment records, confirming valid operations still succeed while cross-assignment changes are ignored.

This is a focused follow-up to the review discussion in #8060. Random grader assignment and weighting behavior are unchanged.

Screenshots of your changes (if applicable)

Type of Change

Type Applies?
🚨 Breaking change
✨ New feature
🐛 Bug fix X
🎨 User interface change
♻️ Refactoring
🚦 Test update
📦 Dependency update
📖 Documentation update
🔧 Internal

Checklist

Before opening this pull request:

  • I have performed a self-review of my changes.
  • I have added tests for my changes.
  • I have updated the project documentation, if applicable.
  • If this is my first contribution, I have added myself to the list of contributors.

After opening this pull request:

  • I have updated the project Changelog.
  • I have verified that the pre-commit.ci checks have passed.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

Questions and Comments

YheChen added a commit to YheChen/Markus that referenced this pull request Jul 21, 2026
@YheChen YheChen changed the title Fix cross-assignment grader membership changes bugfix: cross-assignment grader membership changes Jul 21, 2026
@YheChen
YheChen force-pushed the bug/assign-and-unassign-tas branch from c23b83b to c7a6a56 Compare July 21, 2026 22:40
@coveralls

coveralls commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29941583894

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.003%) to 90.414%

Details

  • Coverage increased (+0.003%) from the base build.
  • Patch coverage: 17 of 17 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 51296
Covered Lines: 47394
Line Coverage: 92.39%
Relevant Branches: 2470
Covered Branches: 1218
Branch Coverage: 49.31%
Branches in Coverage %: Yes
Coverage Strength: 127.85 hits per line

💛 - Coveralls

@YheChen
YheChen requested a review from david-yz-liu July 21, 2026 23:47

@david-yz-liu david-yz-liu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @YheChen!

@david-yz-liu
david-yz-liu merged commit c81d181 into MarkUsProject:master Jul 22, 2026
4 checks passed
@YheChen
YheChen deleted the bug/assign-and-unassign-tas branch July 22, 2026 22:42
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