Skip to content

Conversation

@dimasmds
Copy link
Collaborator

Summary

  • Implement smart draft logic based on rejection count thresholds instead of course ID restrictions
  • Remove unused draft field from review result interfaces and methods
  • Add comprehensive test coverage for different rejection scenarios
  • Enable full autograding for approved submissions regardless of rejection history

Changes Made

  • Draft Logic Enhancement: Modified getDraftDecision() in report-generator.ts:46-60 to use rejection count thresholds:
    • Rejections < 3: is_draft = null (full autograding)
    • Rejections ≥ 3: is_draft = true (requires manual review)
    • Approved submissions: is_draft = null (full autograding)
  • Special Handling: Added logic for massive rejections (≥5) in report-generator.ts:21-27:
    • Sets empty message and special note for reviewers
    • Ensures intensive review for struggling students
  • Code Cleanup: Removed unused draft field from:
    • course-submission-review.ts:43,56
    • review-result.ts:8
  • Test Coverage: Added comprehensive test scenarios in report-generator.test.ts:62-239 covering all rejection threshold combinations

Test Plan

  • Test rejection count < 3 (both reject and approve scenarios)
  • Test rejection count = 3 (both reject and approve scenarios)
  • Test rejection count ≥ 5 with special message handling
  • Verify all approved submissions result in is_draft = null
  • Ensure massive rejection triggering special reviewer notes

🤖 Generated with Claude Code

- Provide special note and empty message if a student has 5+ rejections.
- Adjust `getDraftDecision` to return `null` for cases with less than 3 rejections.
@dimasmds dimasmds marked this pull request as ready for review October 23, 2025 12:50
@dimasmds dimasmds merged commit dc73299 into master Oct 24, 2025
2 checks passed
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.

2 participants