POST /api/v1/cats/answer/{answerId}/manual-grade

Allows lecturers to manually grade unstructured (essay/open-ended) questions with a score and optional feedback.

Path parameters

  • answerId string Required

    ID of the answer to grade

application/json

Body Required

Grading data including score and optional feedback

  • score number Required

    Score to award (must be between 0 and question maxScore)

    Minimum value is 0.

  • feedback string

    Optional feedback from lecturer

Responses

  • 200 application/json

    Question graded successfully

  • 400

    Invalid score or question type (only unstructured questions can be manually graded)

  • 403

    Insufficient permissions - requires ADMIN or LECTURER role

  • 404

    Answer not found

POST /api/v1/cats/answer/{answerId}/manual-grade
curl \
 --request POST 'http://localhost:3500/api/v1/cats/answer/123e4567-e89b-12d3-a456-426614174000/manual-grade' \
 --header "Content-Type: application/json" \
 --data '{"score":8,"feedback":"Good answer but could be more detailed on the implementation aspects"}'
Request examples
{
  "score": 8,
  "feedback": "Good answer but could be more detailed on the implementation aspects"
}
Response examples (200)
{
  "message": "Question graded successfully. Attempt now fully graded.",
  "success": true,
  "totalScore": 85,
  "isAttemptComplete": true
}