-
Notifications
You must be signed in to change notification settings - Fork 34
Manage courses #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manage courses #307
Conversation
orronai
commented
Sep 18, 2021
- Added course and usercourses tables
- Added columns to exercise table
- Fixed the upload method
- Fixed some templates
- Added tables of courses and usercourses - Added some columns to exercise - Fixed the view template and user template - Fixed the upload method
This pull request introduces 1 alert when merging 68d06ae into a04bab5 - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #307 +/- ##
==========================================
- Coverage 84.29% 83.37% -0.92%
==========================================
Files 60 61 +1
Lines 2578 2683 +105
==========================================
+ Hits 2173 2237 +64
- Misses 405 446 +41
Continue to review full report at Codecov.
|
This pull request introduces 1 alert when merging 8e92e7a into a04bab5 - view on LGTM.com new alerts:
|
- Added fields as asked
This pull request introduces 1 alert when merging 2408d06 into cd74a56 - view on LGTM.com new alerts:
|
Co-authored-by: Sourcery AI <>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job! You should put the work you've invested in this system on your portfolio, really :)
I've added few notes, please take a look.
lms/lmsdb/models.py
Outdated
course = ForeignKeyField(Course, backref='exercise') | ||
number = IntegerField() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be in the migrations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because these fields aren't nullable, what do you think about this kind of migration:
- Creating a
Course
- (I need more info about it like thename
of it anddate
). - Creating
UserCourse
s objects for all users in the db and connect them to theCourse
we've created. - Adding the
Course
to thiscourse
column. - Adding the exercise
id
to the exercisenumber
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to automatically fill this value according to the last number for this course in the database
- added a test - changed a function signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job, we're close to approval :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 🤩
lms/lmsdb/models.py
Outdated
course = ForeignKeyField(Course, backref='exercise') | ||
number = IntegerField() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to automatically fill this value according to the last number for this course in the database
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.12%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |