deductio / server

0 stars 0 forks source link

Implement course planning #2

Open Flarp opened 2 months ago

Flarp commented 2 months ago

If a user would like to learn a certain topic, they first need to satisfy all requirements of the topic. For intragraph course planning, this can easily be checked by asserting that every in-neighbor to the current topic is marked as complete. For intergraph course planning, topic nodes need to be decoupled into nodes and objectives, which is a graph-agnostic indicator of satisfying some requirement. Topics should satisfy at most one objective, but can require arbitrarily many in order to be unlocked.

For topics that require an objective, the graph creator should also provide a link to a graph that contains a node that satisfies that objective (this will be a part of the database schema for objective requirements). If the linked graph is ever deleted, the node will be marked as invalid and will not be able to be used in course planning until another graph is supplied that satisfies the given requirement.

When a user requests a plan of study for a given topic, the server should backwards-traverse, starting from the graph that contains the given topic, through graphs that satisfy objective requirements, and provide a list of graphs that need to be attended to, as well as paths through these graphs that will satisfy the necessary objectives. This is a potentially expensive operation, and care will be needed in order to ensure that cycles do not occur.