Skip to content

Comments

Refactor & feat: Reintroduce assignments module and implement grade-based certificates#95

Open
AnvayYadav wants to merge 9 commits intoOpen-Coding-Society:masterfrom
Tvick22:master
Open

Refactor & feat: Reintroduce assignments module and implement grade-based certificates#95
AnvayYadav wants to merge 9 commits intoOpen-Coding-Society:masterfrom
Tvick22:master

Conversation

@AnvayYadav
Copy link
Contributor

Description

This PR reintroduces the assignments-related tables and APIs while significantly enhancing the certificate system to support grade-based certificate assignment.

Key Changes:

Reintroduced:

  • Entire assignments module including:
    • Assignment, AssignmentDto, AssignmentQueue entities
    • AssignmentSubmission and related DTOs
    • AssignmentsApiController and AssignmentSubmissionAPIController
    • AssignmentViewController and associated JPA repositories

My teammate removed this previously to reduce redundancy, but this action led to our last pull request breaking stuff.

Enhanced Certificate System:

  • Introduced CertificateType enum with two tiers:

    • EXCELLENCE: Awarded for average scores ≥ 88%
    • COMPLETION: Awarded for average scores ≥ 70% but < 88%
  • Extended UserCertificate entity to track:

    • Certificate type (EXCELLENCE or COMPLETION)
    • Sprint name
    • Average score
    • Date issued
  • Implemented grade-based certificate assignment in UserCertificateController:

    • New /api/user-certificates/request endpoint accepts formative and summative assignments
    • Calculates average scores from Grade repository
    • Validates all assignments are completed before awarding
    • Supports certificate upgrades (COMPLETION → EXCELLENCE)
    • Prevents duplicate certificates for same sprint
    • Returns detailed response messages for different scenarios
  • Updated CertificateRepository to remove quest dependencies

  • Simplified CertificateController and CertificateViewController by removing quest-related logic

  • Updated UI to remove quest selection from certificate creation form

@jm1021
Copy link
Contributor

jm1021 commented Feb 24, 2026

This looks a lot more contained. We have another pressing bug that we will test tomorrow and then try to get to this after stabilization.

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.

4 participants