Skip to content
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

Support different timetables for different campuses #169

Closed
vatz88 opened this issue Jun 27, 2021 · 7 comments · Fixed by #208 or #210
Closed

Support different timetables for different campuses #169

vatz88 opened this issue Jun 27, 2021 · 7 comments · Fixed by #208 or #210
Assignees
Labels
enhancement New feature or request priority/high This issue needs to be resolved as soon as possible

Comments

@vatz88
Copy link
Owner

vatz88 commented Jun 27, 2021

Is your feature request related to a problem? Please describe.

Currently we only have one timetable for both Vellore and Chennai campuses. This works well if timetable followed by both campuses are same. But in case the timetable is different for both the campuses we don't have a way to support both of them.

Describe the solution you'd like

Add support for different timetables for different campuses. This will require good efforts in terms of refactoring existing code.
Must ideal refactoring is moving to react or preact but it's lot of efforts. It'll also require re-writing all of jquery code.
Easiest approach I can think of is to write a helper function which takes a schema of timetable and renders it accordingly. We can call this function with correct schema when changing the campus and re-render the timetable.

Describe alternatives you've considered

In past, similar problem was solved by deploying different code on a different route. I don't think it's a good approach.

Additional context

#168

@vatz88 vatz88 added the enhancement New feature or request label Jun 27, 2021
@vatz88 vatz88 linked a pull request Jul 2, 2021 that will close this issue
@therealsujitk
Copy link
Collaborator

Just thought I should add this here, this is what my Winter Semester 2020-21 timetable looks like (Chennai campus, BCE).

image

It was different for Fall Semester 2020-21, the timings were different and he had a few more slots. They updated VTOP so that you can only view timetables for the semesters you have registered for, so I'm not sure if it's the same for other branches or what the next semester's timetable will look like.

Can someone add what it looks like for the Vellore campus? If VIT is going to be making changes like this often, I feel it'll be better to resolve this in a way where changing slots and timings in future doesn't take a lot of effort.

@vatz88
Copy link
Owner Author

vatz88 commented Jul 6, 2021

Can someone add what it looks like for the Vellore campus?

The current timetable we are using in this site is what Vellore is using currently (best to my knowledge). @sanket9918 can confirm and help you with any more information you'd want.

I feel it'll be better to resolve this in a way where changing slots and timings in future doesn't take a lot of effort

Yes, that the idea here. Support multiple timetable and make it easier to update timetables. One of the approaches I can think of for achieving this is to have a define a timetable schema (probably json). And we should write a generic function which takes this schema and renders the timetable accordingly. I feel this is easier to do with our current codebase. Open to other solutions.

@therealsujitk
Copy link
Collaborator

therealsujitk commented Jul 6, 2021

One of the approaches I can think of for achieving this is to have a define a timetable schema (probably json).

Yeah, I was thinking the same. I think someone is already working on a patch? If not I'll see what I can do next week as this would cause conflicts with the redesign (#172).

If there are different layouts for other branches we'll be able to support them too by giving an option to select a layout. The schema's can be defined in files like layout_vellore_bce.json, layout_chennai_bce.json, etc.

@vatz88 vatz88 removed a link to a pull request Jul 6, 2021
@vatz88
Copy link
Owner Author

vatz88 commented Jul 6, 2021

You can pick it up next week. Sync with @hariketsheth once if he has made any progress on it

@therealsujitk
Copy link
Collaborator

This is what the Winter Semester 2020-21 timetable looks like (Vellore campus, BCE). Can @sanket9918 confirm?

unknown (2) (1)

@therealsujitk

This comment has been minimized.

@therealsujitk therealsujitk added the priority/high This issue needs to be resolved as soon as possible label Dec 11, 2021
@therealsujitk therealsujitk self-assigned this Dec 23, 2021
@therealsujitk
Copy link
Collaborator

I've made some progress on this one, timetable schemas can easily be changed in the JSON file in future if any changes are required. The only thing left is to figure out how to check for slot clashes, will probably have to make use of JavaScript's Date() class. I think this should be ready by next week.

FFCS.On.The.Go.-.VIT.University.-.31.December.2021.mp4

@therealsujitk therealsujitk reopened this Jan 2, 2022
@therealsujitk therealsujitk linked a pull request Jan 2, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/high This issue needs to be resolved as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants