Closed luchotc closed 3 years ago
Well, you made it pretty clear... I guess the second one is the "right" solution (as long as no current use of Organization::exercises
requires complements and exams), but I don't know if it demands much extra work.
This is the kind of situation where it's very unlikely that we change it or improve it at a later point, I think.
Great :smile:
:dart: Goal
Only take into account lesson related exercises
:memo: Details
There is a problem with the current implementation of user_stats activity. It's using
organization.exercises
which is the fastest way of accessing organization exercises but it has the problem that it's taking into account exams and complements as well, because it's being joined through usages.There are two alternatives:
organization.book.exercises
. This one has the problem that the query is heavier. It's going through the entire content tree to get the exercises.exercises
organization method instead of creating a new one. It's being used in places where it makes sense to access only book exercises.What do you think @julian-berbel @felipecalvo?
:back: Backwards compatibility
100%