Feat/update unit model#71
Open
Duy-Nguyen1104 wants to merge 7 commits intothoth-tech:new/course-flowfrom
Open
Conversation
4ee087b to
fe682de
Compare
|
Hi @Duy-Nguyen1104, This is my first backend review, so I'll do my best to review and test your changes. Important: After a discussion with @Duy-Nguyen1104, I can confirm that there are ccmmits in this PR that are not relevant to the updating of the Findings
API Response Testing
Suggestions
All in all, well done. |
returnMarcco
approved these changes
Aug 5, 2025
returnMarcco
left a comment
There was a problem hiding this comment.
This approval only applies to commit hash fe682de46077e12aa4f7e033c9134aeefa1560ae.
Please ensure the other commits contained in this PR are safe to be merged upstream at the same time.
giangnht19
approved these changes
Aug 7, 2025
10 tasks
BrianDangDev
approved these changes
Aug 25, 2025
BrianDangDev
left a comment
There was a problem hiding this comment.
- Added API and model for managing course/unit requirements.
- Units now support credit points, prerequisites, and corequisites.
- If userId is nil in the course map API, it returns the template course map
6 tasks
Open
8 tasks
7 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
This pull request introduces foundational changes to the Unit model to support the upcoming Course Flow feature. It adds credit_points, prerequisites, and corequisites columns to the units table.
The primary motivation is to store and make readily available key unit attributes that will be displayed in an overlay component within the Course Flow UI. By denormalizing this data onto the Unit model, we can provide a faster and more responsive user experience, as it avoids the need for complex real-time queries to gather this information for display purposes.
The UnitsApi has also been updated to accept and persist these new attributes.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Logging the units inside the browser ahs shown that API response has included these attributes to the Unit entity:

Checklist: