-
Notifications
You must be signed in to change notification settings - Fork 10
More backend and frontend integrations #136
base: master
Are you sure you want to change the base?
Conversation
will most likely replace it alltogether
Minor changes to be inline with Auth0 tutorial for Django
Note that this deletes the user's courses for now, but they aren't used anyway.
Including course-groups massively increases the size of the returned tracks
retreival of student courses is currently done from local storage, and will be done in a more organized future for DB support in the future
There are some style issues(RTL) with the new component, and spacing issues in the user settings page, hopefully these can be fixed
- Create CourseDetail component, which will be mostly used for when adding a course - Refactor ProgressBox outside of Home - 'Home' is now responsible for the currently selected course, you can select a course either by clicking on it(From one of the 'Year' components) or via the select at 'Navigation' component)
|
Can we show the options for data-years as |
- A student is no longer associated to courses directly. Instead, he can define one or more course-plans, which can also be shared(made public) - Implement object level auth for course plans - only the owner can access it, unless the plan was made public, then it can be read by all users(as well as unauthenticated ones), but it cannot be modified by them. - Add tests for the new course plan serializer, as well as CoursePlan views and permissions - Student.year_in_studies is now calculated based on his chosen track year* - Student.remaining and Student.trickle down are temporarily disabled* * Perhaps these calculations should be moved to be someone else's responsibility, either into CoursePlan or a new API?
768d4b7 to
156811b
Compare
|
I've been working on allowing multiple course-plans per user(and sharing them), as per #115 - currently backend only If we allow for multiple plans, then the same user might try out plans for different tracks (for example, if he's contemplating which track to pick, or wants to help a friend in another faculty organize his plan) - each one of them would yield different analytics and point calculations. Therefore, properties like |
This ensures ordinary users cannot modify tracks/courses, but can still fetch them
type is no longer dependant on the authenticated student
- semester is now stored as a string(same enum as in BE), and not ints. This makes some utility functions redundant and simplifies processing. - The 'semester' and 'year' fields of Course, have been moved to the 'take' object field of a Course. Now, the Course 'data_year' and 'semester' fields purely reflect the course's state in the DB. This distinction is important for courses with any "any" field, whose assigned take in pratice(sem1/sem2) may be different from the one stated in the DB, as well as annual semesters which are currently classified as year 1.
For consistency with model definitions
ce1f61f to
e48ad40
Compare
The detail view contains entire course objects within the takes, and not just their IDs - useful for loading a course plan
6753092 to
a2cd6f9
Compare
- DetailCoursePlanSerializer accidentally inherited from CourseSerializer rather than CoursePlanSerializer - 'CourseOfTrackSerializer' now has the track passed by 'DetailCoursePlanSerializer' (if a track is defined for the course plan)
- add checkbox for 'public' option - dont close modal immediately, maybe I'll add a visual indicator for a successful save, or perhaps a link to the newly created plan for sharing/bookmarking?
f260732 to
ffc6c84
Compare
The lack of scoping caused conflicts when importing these component in certain order
- Loading a plan through the UI uses the same mechanism as loading from a URL - Now presents a warning when tried to load while there's an unsaved plan - Path should reflect the current plan, even after saving or deleting the curret plan.
- Use a better library for the select component, which seems to support RTL, is less buggy and more customizable - Factor track selection and course selection to their own components(using said library) - Year selection also uses said library, instead of a plain HTML5 select. - course selection is still WIP
The check was causing bad requests to cause an internal server error(due to wrong exception being thrown) rather than a HTTP 400. Regardless, LimitOffsetPagination already enforces the max_limit(by simply truncating the results and adding a pointer to the next request).
This will allow retrieving several courses with a single request
So far this service includes 2 operations - Find all course instances of given course_id (that is, in which years is a given course offered)? - Associate between a track and a list of courses, to their types. These services add an IndexedDB cache (like local-storage, but more efficient and bigger) via the 'Dexie' library, which will eliminate a bunch of network calls.
Still WIP, but here's what I'm trying to do
Connect user settings to backend
Add a courses by track API (e.g
/tracks/1337/courseswould return all courses which are included in any CourseGroup that involve track with pk 1337), and integrate it into FE.Optimize scrape script (retrieval of courses)
Other minor FE/BE UI fixes
Might try replacing the
SearchBarcomponent with something from a proper library, or leave it to a different PR?