Repository navigation
feat(academy): certification eligibility checks (BE-042) - #900
Merged
MaryammAli merged 2 commits intoSep 27, 2026
Merged
MaryammAli merged 2 commits into
MaryammAli merged 2 commits into
Conversation
Add a CertificatesService that decides whether a learner qualifies for a certificate_nft mint: every required task must have a graded final score and each must meet the course minimum. Expose the eligibility endpoints the certificate minting job consults, plus specs.
|
@AKAEMM668 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Implements BE-042 certification eligibility checks for BackendAcademy. Adds a service that decides whether a learner qualifies for a
certificate_nftmint: every task the course requires must be graded, and every recorded score must meet the course minimum ("all tasks passed, min score"). It exposes the eligibility endpoint(s) the certificate minting job consults before calling the Sorobanmint_certificateentry point.Related Issue
Closes #795
Changes
🎓 Certification eligibility module
BackendAcademy/src/certificates/certificates.types.ts— criteria, task-result and eligibility types. The minimum score defaults to the grading pipeline's pass threshold, so "passed" means the same thing across the academy.BackendAcademy/src/certificates/certificates.service.ts— the eligibility oracle: registers per-course criteria, records the learner's best final score per task (a retake can lift a task but never lower a certificate), computes the verdict with human-readable reasons plus afinalScorefor the mint, and lists every learner a course may mint for.BackendAcademy/src/certificates/certificates.controller.ts— REST surface underapi/v1/certificates:POST /courses— register the required task ids + minimum score.POST /results— record a learner's final task score from the grading pipeline.GET /users/:userId/courses/:courseId/eligibility— the eligibility verdict used by the certificate minting job.GET /courses/:courseId/eligible-learners— batch list for the job.BackendAcademy/src/certificates/dto/*— validated request DTOs.BackendAcademy/src/certificates/certificates.module.ts— module wiring; the service is exported for an in-process minting job.BackendAcademy/src/app.module.ts— registerCertificatesModule.BackendAcademy/README.md— document the BE-042 endpoints.🧪 Tests
BackendAcademy/src/certificates/certificates.service.spec.ts— unit coverage for criteria validation, best-score retention, missing/failing/eligible verdicts, and the batch view.BackendAcademy/test/certificates.e2e-spec.ts— HTTP register → record → eligibility → eligible-learners flow.Verification Results
Acceptance Criteria
GET /api/v1/certificates/users/:userId/courses/:courseId/eligibility, plusGET /api/v1/certificates/courses/:courseId/eligible-learners