Options
All
  • Public
  • Public/Protected
  • All
Menu

This module provides functions that make up the main functionality of planwithus-lib.

A block is used to express course requirements. Blocks are loaded from the blocks/ directory of the repository root folder and arranged into classes, with each class forming a subdirectory of the blocks/ directory. (For example, blocks under the primary class can be found at blocks/primary.) Blocks are currently organised into three categories, primary (referring to primary majors), second (referring to second majors) and minor (referring to minors).

Each block is represented by a YAML file which contains a single top-level block with an identifier corresponding to its filename. (For example, the block at blocks/primary/cs-hons-2020.yml is a primary major block with the identifier cs-hons-2020.) Beyond their classes, folder names are ignored; the two files at blocks/primary/cs-hons-2020.yml and blocks/primary/cs-hons-2020/cs-hons-2020.yml will represent a primary major with the same identifier cs-hons-2020. Note that blocks with the same identifiers are prohibited.

For more information on the specification format of blocks, please refer to the block module.

Index

References

AndMatchRule

Re-exports AndMatchRule

AndSatisfyRule

Re-exports AndSatisfyRule

Block

Re-exports Block

MCSatisfyRule

Re-exports MCSatisfyRule

MatchRule

Re-exports MatchRule

Module

Re-exports Module

OrMatchRule

Re-exports OrMatchRule

OrSatisfyRule

Re-exports OrSatisfyRule

PatternMatchRule

Re-exports PatternMatchRule

Satisfier

Re-exports Satisfier

SatisfierAssign

Re-exports SatisfierAssign

SatisfierBase

Re-exports SatisfierBase

SatisfierBranch

Re-exports SatisfierBranch

SatisfierConstraint

Re-exports SatisfierConstraint

SatisfierFilter

Re-exports SatisfierFilter

SatisfierLeafAssign

Re-exports SatisfierLeafAssign

SatisfierLeafConstraint

Re-exports SatisfierLeafConstraint

SatisfierLeafFilter

Re-exports SatisfierLeafFilter

SatisfierReduce

Re-exports SatisfierReduce

SatisfierResult

Re-exports SatisfierResult

SatisfyRule

Re-exports SatisfyRule

Some

Re-exports Some

Functions

Const initDirectories

  • Initialises block directories with each directory corresponding to a block class.

    Returns Record<string, Directory>

    An object with keys as block classes and values as block directories.

Const verifyPlan

  • Wrapper function that verifies a study plan against a specific block.

    Parameters

    • modules: Module[]

      List of modules in the study plan.

    • dir: Directory

      Block directory which contains the desired block.

    • blockId: string

      Identifier of the desired block.

    Returns SatisfierResult

    An object representing the result of a study plan verification.

Generated using TypeDoc