This pull request close #561 which adds a route for details of a specific CurriculumAssessment.
It created these scenarios:
The endpoint for this route handler is '/curriculum/:curriculumAssessmentId', where :curriculumAssessmentId is a URL parameter that represents the ID of the CurriculumAssessment.
The programId associated with the curriculumAssessmentId is retrieved using the getProgramIdByProgramAssessmentId() function.
The programRole of the authenticated user for this program is retrieved using the getPrincipalProgramRole() function.
If the programRole is not defined or is 'Participant', a UnauthorizedError is thrown with an appropriate error message.
The curriculumAssessment object associated with the curriculumAssessmentId is retrieved using the getCurriculumAssessment() function.
There is also one new function created in the Service file :
getProgramIdByProgramAssessmentId
Checklist
[x] Related issue appears at beginning of pull request title with pound sign, and title describes the changes being proposed.
[x] Related issue is linked in pull request description using closing keywords.
[x] The appropriate label has been chosen for this pull request.
[x] The correct project has been selected for this pull request.
[x] All commits in this branch, including merge commits, begin with the issue number and a pound sign.
[x] Tests have been added, where appropriate; or, no tests are relevant for this pull request.
[x] This pull request contains UI changes, and screenshots of those UI images appear below; or, this pull request contains no UI changes.
Proposed changes
This pull request close #561 which adds a route for details of a specific CurriculumAssessment. It created these scenarios:
The endpoint for this route handler is '/curriculum/:curriculumAssessmentId', where
:curriculumAssessmentId
is a URL parameter that represents the ID of theCurriculumAssessment
.The programId associated with the curriculumAssessmentId is retrieved using the
getProgramIdByProgramAssessmentId()
function.The
programRole
of the authenticated user for this program is retrieved using thegetPrincipalProgramRole()
function.If the
programRole
is not defined or is 'Participant', a UnauthorizedError is thrown with an appropriate error message.The curriculumAssessment object associated with the
curriculumAssessmentId
is retrieved using thegetCurriculumAssessment()
function.There is also one new function created in the Service file :
getProgramIdByProgramAssessmentId
Checklist