Backend: Form – Strukturirani intervju – ocijene
GitHub Issue: #225
Last modified with commit 7a580a0 on
by Aljaž.
Backend task for the Strukturirani intervju – ocijene grading form (activity interview-grades) – check the criterion keys and status rule against the API spec and DB structure, implement, and verify.
Docs: Form – Strukturirani intervju – ocijene
Spec: activity interview-grades on /assessments/{assessmentId}/forms/{activity} (candidateId required) in api-docs/openapi.yaml
DB: AssessmentGrades (interview-grades) in api/database/create_schema.sql
An individual grading form (one candidate column). Its POGODNOST is the Intervju grade on the results page.
1. Double check API spec and DB structure
- Criterion keys for the 6 categories / 36 sub-criteria in the docs:
- Predanost / Odnos prema preuzetim obavezama – 6
- Društvenost – 10
- Empatija (osjećaj za poziciju u stavove drugih) – 7
- Stabilnost u teškim situacijama – 6
- Upornost – 2
- Orijentacija prema cilju – 5
- Agree on the category keys and add them to the spec or the shared contract. Use “orijentacija” (not Figma’s “orjentacija”) in keys.
- Status rule: Zaključeno when every category has at least one sub-criterion filled in (for this board member and candidate).
- Roles and permissions: Trainer and Assessment evaluator, if they are active board members.
- DB: no notes on this form. The AssessmentNotes check constraint doesn’t allow
interview-grades.
2. Implementation
- Roles and permissions: handled by the shared form endpoint. No extra checks.
- DB / catalog: add the interview-grades criteria to the catalog.
- Status helper for this form.
3. Verify implementation against spec
- Missing
candidateId→ 400. - One category empty →
false; all categories have a value →true. - Notes sent → 400.
Done when
Strukturirani intervju – ocijene can be filled in per candidate, and its status and POGODNOST are correct.