-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Create rubric (#80) * refactor(db): Change objectives field name * feat(rubrics): Create initial rubrics domain * feat(rubrics): Create initial rubrics repository * feat(rubrics): Endpoint to create a rubric * test(rubrics): Add test to ensure teacher can create rubrics * chore(deps): Bump dependencies * feat: Get rubrics created by teacher (#81) * feat(rubrics): Add endpoint to list rubrics created by teacher * test: Add tests to the endpoint to list created rubrics * feat: Get rubric by UUID (#82) * docs(openapi): Update spec * feat(rubrics): Create endpoint to get rubric by its uuid * test(rubrics): Add tests to the endpoint to get a rubric by its uuid * refactor(rubrics): Remove debug message * feat: Add objective to rubric (#83) * refactor(db): Add max length constraint to objectives and criteria descriptions * docs(openapi): Update spec * feat(rubrics): Create endpoint to add an objective to a rubric * fix(rubrics): Prevent null field when arrays are empty * test(rubrics): Add objective to rubric * feat: Add criteria to rubric objective (#84) * refactor(rubrics): Create functions to verify rubrics ownership * fix(rubrics): Use separated views to verify objectives and criteria ownership * docs(openapi): Update spec * feat(rubrics): Create endpoint to add criteria to a rubric objective * fix(rubrics): Order objectives and criteria by creation date * chore: Clean tests cache before running tests * test(accounts): Register a second teacher account by default * test(rubrics): Ensure teacher can add criteria to rubric objective * chore(db): Update down migration * chore(deps): Bump dependencies
- Loading branch information
1 parent
7d2c5eb
commit f868090
Showing
31 changed files
with
1,302 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
# [0.18.0](https://github.com/upb-code-labs/main-api/compare/v0.17.0...v0.18.0) (2023-10-08) | ||
# [0.23.0](https://github.com/upb-code-labs/main-api/compare/v0.22.0...v0.23.0) (2023-10-13) | ||
|
||
|
||
### Features | ||
|
||
* Get course by UUID ([#71](https://github.com/upb-code-labs/main-api/issues/71)) ([ae60ba4](https://github.com/upb-code-labs/main-api/commit/ae60ba45081750d68edb079f201f0317eecd3ceb)) | ||
* Add criteria to rubric objective ([#84](https://github.com/upb-code-labs/main-api/issues/84)) ([2bca229](https://github.com/upb-code-labs/main-api/commit/2bca22944a19789f8e448305e7aa74917941c052)) | ||
|
||
|
||
|
||
# [0.17.0](https://github.com/upb-code-labs/main-api/compare/v0.16.0...v0.17.0) (2023-10-06) | ||
# [0.22.0](https://github.com/upb-code-labs/main-api/compare/v0.21.0...v0.22.0) (2023-10-12) | ||
|
||
|
||
### Features | ||
|
||
* List enrolled students ([#68](https://github.com/upb-code-labs/main-api/issues/68)) ([f4b8741](https://github.com/upb-code-labs/main-api/commit/f4b8741daeb7e8c3926a1132879c6b9df1683682)) | ||
* Add objective to rubric ([#83](https://github.com/upb-code-labs/main-api/issues/83)) ([9d91a94](https://github.com/upb-code-labs/main-api/commit/9d91a94639df4380340fec778656d516a1734950)) | ||
|
||
|
||
|
||
# [0.16.0](https://github.com/upb-code-labs/main-api/compare/v0.15.0...v0.16.0) (2023-10-06) | ||
# [0.21.0](https://github.com/upb-code-labs/main-api/compare/v0.20.0...v0.21.0) (2023-10-12) | ||
|
||
|
||
### Features | ||
|
||
* Enroll student ([#66](https://github.com/upb-code-labs/main-api/issues/66)) ([565c90d](https://github.com/upb-code-labs/main-api/commit/565c90d210be303fb38874b12144146285283dc9)) | ||
* Get rubric by UUID ([#82](https://github.com/upb-code-labs/main-api/issues/82)) ([533c8f4](https://github.com/upb-code-labs/main-api/commit/533c8f44bfb9479cbc6e4d70a21c902b103b7ee6)) | ||
|
||
|
||
|
||
# [0.15.0](https://github.com/upb-code-labs/main-api/compare/v0.14.0...v0.15.0) (2023-10-06) | ||
# [0.20.0](https://github.com/upb-code-labs/main-api/compare/v0.19.0...v0.20.0) (2023-10-10) | ||
|
||
|
||
### Features | ||
|
||
* Search students by full name ([#65](https://github.com/upb-code-labs/main-api/issues/65)) ([f72482b](https://github.com/upb-code-labs/main-api/commit/f72482b05b2e30be56fb3d8d12da837ab88daf9d)) | ||
* Get rubrics created by teacher ([#81](https://github.com/upb-code-labs/main-api/issues/81)) ([356af40](https://github.com/upb-code-labs/main-api/commit/356af40e2c6838752de196bf7c010ff19d7058ba)) | ||
|
||
|
||
|
||
# [0.14.0](https://github.com/upb-code-labs/main-api/compare/v0.13.3...v0.14.0) (2023-10-05) | ||
# [0.19.0](https://github.com/upb-code-labs/main-api/compare/v0.18.0...v0.19.0) (2023-10-10) | ||
|
||
|
||
### Features | ||
|
||
* Rename course ([#64](https://github.com/upb-code-labs/main-api/issues/64)) ([7e7110b](https://github.com/upb-code-labs/main-api/commit/7e7110b6afe89fb7c10c7596df11ef17ee9de397)) | ||
* Create rubric ([#80](https://github.com/upb-code-labs/main-api/issues/80)) ([ec43d55](https://github.com/upb-code-labs/main-api/commit/ec43d55be58b31d570476bbcac176168a2813873)) | ||
|
||
|
||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,9 @@ var ( | |
|
||
registeredTeacherEmail string | ||
registeredTeacherPass string | ||
|
||
secondRegisteredTeacherEmail string | ||
secondRegisteredTeacherPass string | ||
) | ||
|
||
type GenericTestCase struct { | ||
|
@@ -59,7 +62,7 @@ func setupRouter() { | |
|
||
func registerBaseAccounts() { | ||
registerBaseStudent() | ||
registerBaseTeacher() | ||
registerBaseTeachers() | ||
} | ||
|
||
func registerBaseStudent() { | ||
|
@@ -80,7 +83,8 @@ func registerBaseStudent() { | |
registeredStudentPass = studentPassword | ||
} | ||
|
||
func registerBaseTeacher() { | ||
func registerBaseTeachers() { | ||
// Register the first teacher | ||
teacherEmail := "[email protected]" | ||
teacherPassword := "judy/password/2023" | ||
|
||
|
@@ -95,6 +99,22 @@ func registerBaseTeacher() { | |
|
||
registeredTeacherEmail = teacherEmail | ||
registeredTeacherPass = teacherPassword | ||
|
||
// Register the second teacher | ||
secondTeacherEmail := "[email protected]" | ||
secondTeacherPassword := "trofim/password/2023" | ||
|
||
code = RegisterTeacherAccount(requests.RegisterTeacherRequest{ | ||
FullName: "Trofim Vijay", | ||
Email: secondTeacherEmail, | ||
Password: secondTeacherPassword, | ||
}) | ||
if code != http.StatusCreated { | ||
panic("Error registering base teacher") | ||
} | ||
|
||
secondRegisteredTeacherEmail = secondTeacherEmail | ||
secondRegisteredTeacherPass = secondTeacherPassword | ||
} | ||
|
||
// --- Helpers --- | ||
|
Oops, something went wrong.