NIAEFEUP / uporto-schedule-scrapper

Python solution to extract the courses schedules from the different faculties of UPorto. Used to feed our timetable selection platform for students, TTS.
GNU General Public License v3.0
3 stars 2 forks source link

Same classes have different IDs throughout the years #5

Closed bernardobelchior closed 1 year ago

bernardobelchior commented 6 years ago

For example, class "1MIEIC01" has the same name in 2014 and 2017, but its IDs are different so the URL will be different. This is okay for the second semester of this year because IDs will be the same, but the next year will be problematic, so I propose adding a academic_year field to the class table in order to solve this problem.

Example (you must be logged into sigarra): Year 2014 - 1st Semester Year 2014 - 2nd Semester Year 2017 - 1st Semester

If you check the pv_turma_id in the query parameter, you can conclude the same as I did.

rafaeldamasceno commented 6 years ago

course_id is FK referenced in class, and course has both year a unique constraint UNIQUE KEY `course_id` (`course_id`,`faculty_id`,`year`), so maybe it's a bit redundant.

bernardobelchior commented 6 years ago

Ok, I didn't know that. So now I ask the question, does it make sense to add a course to the table each year when probably there won't be any change? I think it may be better to add the academic_year to the class, since it is the variable here.