API Reference

Problem Bank Scripts

problem_bank_scripts.__version__

A string representation of the version. e.g. '1.0.0rc1'. This is based off of PEP 440.

Functions to convert from OPB Markdown

problem_bank_scripts.process_question_md(source_filepath: PathLike[str] | str, output_path: PathLike[str] | str | None = None, instructor: bool = False) None[source]

Processes an OPB markdown file and writes the output to a file.

Parameters:
  • source_filepath (os.PathLike[str] | str) – Path to the markdown file to be processed.

  • output_path (os.PathLike[str] | str, optional) – Path to the output file. Defaults to None.

  • instructor (bool, optional) – Flag to determine if the output is for an instructor or not. Defaults to False. This determines if the solutions are included in the output or not.

problem_bank_scripts.process_question_pl(source_filepath: PathLike[str] | str, output_path: PathLike[str] | str | None = None, dev: bool = False)[source]

Processes an OPB markdown file and converts it to a prairielearn compatible question.

Parameters:
  • source_filepath (os.PathLike[str] | str) – Path to the markdown file to be processed.

  • output_path (os.PathLike[str] | str, optional) – Path to the output file. Defaults to None.

  • dev (bool, optional) – Flag to determine if the question is under development. Defaults to False.