camino-school / lanttern

Lanttern project repo
MIT License
1 stars 1 forks source link

contextualized class info based on school cycles #143

Open endoooo opened 6 months ago

endoooo commented 6 months ago

as Lanttern grows, we'll have students registered in multiple classes (e.g. grade 1, grade 2, grade 3, ...) — and we have the student class info being displayed in a lot of places.

thinking about the real world, it's common to think about this student/class relationship from a cycle perspective: what was John's class in 2022? where is Jane's report card from Grade 2?

we should about how to use this cycle and classes relationship to reduce the amount of information displayed in Lanttern UI. some examples:

  1. when filtering by class, we should prioritize classes relevant to the context (e.g. current cycle)
  2. when viewing the student class info in the report card, we should view only the classes from the same cycle as the report card (i.e. filter classes where class.cycle_id == report_card.school_cycle_id)

etc

endoooo commented 6 months ago

we'll need to develop a cycle and sub cycle structure, because we have some things that exist in the context of a sub cycle (e.g. 2024 1st quarter report card), and some things that exist in a longer cycle (e.g. Grade 4B 2024). considering the classes in report card example above, the filter would be something like:

class.cycle_id == report_card.school_cycle_id or
class.cycle_id == report_card.school_cycle.parent_cycle_id