This repository was archived by the owner on Jul 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Implement HUJI course import feature and some other frontend changes #107
Merged
Conversation
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
ScDor
reviewed
Jun 28, 2021
ScDor
reviewed
Jun 28, 2021
ScDor
reviewed
Jun 28, 2021
ScDor
approved these changes
Jun 28, 2021
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.
Very nice work, please see the attached comments
e9d66cf
to
840e00a
Compare
Can now be injected in order to use within `setup()` functions
Though this feature is probably not complete, it currently errors if the user's selection of courses doesn't include courses of a certain type. Furthermore, use of lifecycle hooks is not necessary, computed properties are more appropriate here
Since the course DB only has courses from 2021 as of now, and we don't have validation of takes anyway, there's no harm in taking the semester detected by the scraper(using the 'tkufa' in the statistics URL)
1. In case of a conflict between user choice and DB, respect user choice first 2. Annual/summer courses will be consideed as part of the first semester
Prefer semester in registration even if it clashes with semester stored in DB
840e00a
to
e5a586d
Compare
Course scrape script now utilizes modules, and includes a vue UI
- bulma is now processed by bundler instead of being downloaded directly from CDN - the bookmarklet entry point is now built separately from the site, as a library
e5a586d
to
a4467bc
Compare
Are there any changes required here due to the new data year mechanism, or can we merge? |
44dc7b6
to
4977899
Compare
Made a tiny fix, should be good to go |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Import feature
This feature allows a user to run a script within the "מידע אישי" site to scrape all his registered courses, and pass them
to the frontend. The script is executed by running a bookmark as explained on the import instructions page.
The script does not communicate with the back-end, rather, it communicates with the frontend page(locally, no network communication) by the use of cross-origin messaging API. This is why users are require to open HUJI's site via a pop-up.
This is good from several standpoints
be added(missing from our database or summer/annual courses), and manually choose a semester for courses whose
semester wasn't identified.
and communication with the DB (
$http
and$auth
), no need to embed them in the script as wellOther front-end changes
Use of a store object for holding courses, which should fix some difficulties regarding accessing the courses information from analytics view #96
The course store also saves to local storage whenever a change is made. In the future we should also save
to DB
Some fixes and refactorings of
ProgressBox
(I'm guessing that feature is still WIP but itcaused exceptions due to missing
type
, which would occur be if the student has no track assigned)Future improvement ideas
Currently, the front-end makes a separate
GET
for each course(via the/course/?course_id=??
endpoint)for each scraped course to verify that said course exists in the DB(and to obtain its semester if it wasn't inferred
from the personal information site)
We should implement an endpoint that does all this at once (gets a list of course IDs and returns a list of courses),
Use proper, styled HTML elements instead ofwindow.alert
within the scrape scriptDone
Perhaps find a way to scrape the student's track? The grades page only seems to include his faculty, maybe this info
appears somewhere else within "מידע אישי"
Implement Scrape course grade histogram from HUJI personal user information site #77, scrape grade statistics too
Paginate the parsed courses table which can get pretty long, and other UI improvements
Currently, when validating the existence of the parsed courses, I compare them to the Shnaton entries
of 2021, because we didn't seem to parse other years yet. This can potentially cause mismatches(e.g, courses
whose semester changed)