Why was this change necessary?
This is a gateway commit that will later help us introduce a method in
Course to populate it with the courses that are being offered in the
current term.
How does it address the problem?
The current_subjects method returns a list of subjects that are offered
in the current academic term. The method first retrieves a list of all
courses offered in the current term. A list of unique subject codes is
mapped from this list of courses and is then used to retrieve the
corresponding Subject records.
Are there any side effects?
Not necessarily a side effect but more of a concern. The list returned
here is indirectly linked to the current term since we use the current
term's id to hit the endpoint. This seems okay for now however we might
need to explicitly state this in the query later on.
Why was this change necessary? This is a gateway commit that will later help us introduce a method in Course to populate it with the courses that are being offered in the current term.
How does it address the problem? The current_subjects method returns a list of subjects that are offered in the current academic term. The method first retrieves a list of all courses offered in the current term. A list of unique subject codes is mapped from this list of courses and is then used to retrieve the corresponding Subject records.
Are there any side effects? Not necessarily a side effect but more of a concern. The list returned here is indirectly linked to the current term since we use the current term's id to hit the endpoint. This seems okay for now however we might need to explicitly state this in the query later on.