-
Notifications
You must be signed in to change notification settings - Fork 109
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
Fix: Optimize course times display #302
base: oss
Are you sure you want to change the base?
Conversation
e99b07e
to
b48f787
Compare
I'll take more time to review your code more in depth. From what I've seen, it works great and you've covered all the use cases. I think we could tweak your algorithm a bit so that a course that occurs several days a week, always at the same time would always be "grouped" according to the time first : |
Also, it's important to check if |
…ll throw an error when at foreach()
Sure, I'm open to any feedback or questions.
I think "grouping by time" will make the code much simpler, as there is no need to find sequences of days. How should it work in this case?
Fixed, I totally forgot about this case. |
I would say that it should stay exactly as you suggested. Unless all the course times are exactly the same throughout the week, we apply your algorithm unchanged. What do you think? |
Honestly, I don't know ;) It depends on the UX and what's best for the users. Having I'm still struggling with this test https://github.com/academico-sis/academico/blob/oss/tests/Unit/CourseTest.php#L187-L208:
|
#237