Skip to content

Task 4.1 Submission - 61-1040 T16 - #140

Open
Adham5634 wants to merge 1 commit into
Advanced-Computer-Lab-2026:mainfrom
Adham5634:main
Open

Adham5634 wants to merge 1 commit into
Advanced-Computer-Lab-2026:mainfrom
Adham5634:main

Conversation

@Adham5634

Copy link
Copy Markdown

Submission

61-1040 T16

Changes

  • server/src/models/Evaluation.js: Evaluation schema with sessionCode, score min:1 max:5, comment, evaluatedBy ref User, timestamps, compound unique index on sessionCode+evaluatedBy
  • server/src/controllers/evaluationController.js: getAllEvaluations, getEvaluation with 404, createEvaluation returning 201, getEvaluationSummary using aggregate pipeline
  • server/src/routes/evaluations.js: All routes wired, summary route declared before param route

- Evaluation.js: schema with sessionCode (required), score (required, min:1 max:5),
  comment (optional), evaluatedBy (optional ObjectId ref User), timestamps,
  and compound unique index on {sessionCode, evaluatedBy}
- evaluationController.js: getAllEvaluations, getEvaluation (404 on missing),
  createEvaluation (201), getEvaluationSummary (aggregate pipeline)
- evaluations.js: /summary route declared before /:id to prevent param collision
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.

1 participant