asaf-kali / coursist

Open Source Workshop (67118) course team project
MIT License
6 stars 12 forks source link

Suggestion - display the chosen courses number and credits amount #97

Open carmelLevy opened 4 years ago

carmelLevy commented 4 years ago

Hi, I suggest you to write the chosen courses number and their נ"ז amount.

avihai-huji commented 4 years ago

It's a good idea. I saw you have implemented the number of chosen courses - thanks!

Regarding the credits number, it belongs to the course occurrence model and not to the course model, so its a bit tricky ATM. Maybe we can move the credits to the course model because its not likely that different course occurrences will have different credit number. If we move credits to the course model it will be easier and more straightforward to implement the total number of credits.

@asaf-kali what do you think?

asaf-kali commented 4 years ago

Is this regarding the schedule builder feature? If so, possible and useful indeed. No need to move credits out of course occurrence though - I think we show course occurences in this page anyway (and if not - we should), so we should have the data when the frontend requests it.

avihai-huji commented 4 years ago

We show only the groups, not the course occurrences:

all_classes = CourseClass.objects.filter(group__occurrence__course=course).select_related("group")

But even if we do fetch the course occurrence for every class - each course can have more than one class (like shiur, tirgul, ma'abada), and each of them will have the course credits and we will have to check that we calculate the credits only one time for each course, so its a bit cumbersome.

asaf-kali commented 4 years ago

The problem is with the current logic: this holds only for one year. Next year there will be bugs (duplicate classes for last year and this year). We should change group__occurrence__course=course to group__occurrence=course_occurrence, of course there is a lot more logic behind it.