Skip to content

ADR 3: Folders

Context

Practices (labs) are not the only part of a course. A course may also have lectures, presentations, assignments, etc. Each collection of the content may hove specific format and processing mechanism.

The original version of the IT4KT supported only practices, while the experimental version added support for arbitrary number and structure of pages, where processing rules where set using patterns.

Decision

We decided to organize content into folders, where each folder corresponds to the collection of content. Default collections would include: - lectures, - labs (practices), - assignments.

Folders cannot be nested with one exception — root folder actually contains all other folders.

Each folder has a custom set of readers and writers assigned to file name patterns. Folder processor then runs corresponding readers for all files in the folder that match the pattern and add their results to the course model. In the write phase it runs writers configured for matched files.

Root folder is again slightly different. It is supposed that it would contain only a few pages and some special files and directories, so its readers and writers are bound to concrete file names instead of patterns. The writers are also run regardless of existence of the file in the source directory, so they can generate new content.

Status

Accepted.

Consequences

If is now possible to organize course content info folders that correspond to different aspects of the course. Each folder can also have different processing rules.

In addition to pages organized in folders, there may be some top-level pages in a root folder. Root folder can also contain some generated content that is not present in the source directory of the course.

Folder cannot be nested, so their visualization in the menu can have a simple two-level structure.