FFCSonTheGo icon indicating copy to clipboard operation
FFCSonTheGo copied to clipboard

Display all available courses by slot

Open MrinalJain17 opened this issue 6 years ago • 6 comments

While creating the Timetable, almost everyone has some free slots in which they want to add some electives, but could not because searching for a suitable course is tiresome. It would be great if there was an option where the user can select a slot (say A1 + TA1) and a list of all courses available in that courses will be displayed.

MrinalJain17 avatar Nov 03 '17 16:11 MrinalJain17

How are we supposed to avail this feature? Is it added or going to be added?

vteja711 avatar Nov 03 '17 16:11 vteja711

@MrinalJain17 Yes that would be a feature worth adding. But I think the new timetable with confusing slot timing may make it more difficult to implement. This would require change in UI and also adding new components. May not be possible for current FFCS, but I'll let this issue remain open for anyone interested in working on it.

vatz88 avatar Nov 03 '17 17:11 vatz88

Hi, I'm new to Open Source and I'd like to try. Since we know that the electives, for example, start from ITE or CSE40XX onward, then we can filter in those courses and apply the slot filter already available on the website. But this could be applied to all courses.

hrithik-jha avatar Aug 08 '18 10:08 hrithik-jha

@hrithik-jha Hi! Great that you are showing interest in contributing to open source.

As far as I know, electives don't necessarily start from ITE.

To use the exiting UI and slot filter, we may need to add a toggle button which has two state, one for search courses in free slot and not added and other for the normal (current) behaviour. There may be some other approaches as well.

@sangeeth96 can you throw some light here.

vatz88 avatar Aug 08 '18 10:08 vatz88

Perhaps a button could be added which says "Search by slot" which toggles the mode. Apart from this how to filter the courses for a specific slot from the vast number of courses?

hrithik-jha avatar Aug 18 '18 12:08 hrithik-jha

You'll have to filter the all courses array to get the needed courses. Check out the autocomplete_course.js file. There are arrays, one for unique courses and one for all courses. You'll be using the all_data array.

Also, we can come up with some better label name other than Search by slot which would make it easier to understand the functionality. It'll be a toggle button. Upon toggle, we need to see the empty slots in the timetable and filter out the courses which can be added in those slots. To check the empty slots in the timetable, we can perhaps use the already globally exposed variable timeTableStorage or more appropriately activeTable which can be found in colorChange.js. There will be edge cases too and when you apply filter, it'll be a huge array if many empty slots are there in the timetable, not all of the array can be displayed on UI.

Hopefully, this gives you a rough idea. There could be a better approach, not sure. Should try out a few things and see what serves the purpose best.

vatz88 avatar Aug 18 '18 18:08 vatz88