Online problem-driven learning system https://docs.prairielearn.com
  • TypeScript 76.5%
  • Python 12%
  • JavaScript 3.9%
  • HTML 2.9%
  • Jupyter Notebook 1.2%
  • Other 3.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Matthew West 17afb427df
Fix instructor file browser dotfile downloads (#15755)
* Fix instructor file browser dotfile downloads

* Handle symlinked roots in instructor file downloads

A question beneath a symlinked directory passed the file browser's path
checks but failed downloads because the resolved file was compared with
an unresolved context root. Resolve the course, context root, and excluded
directories before checking containment, allowing exclusions to be absent.

Consolidate the download tests around distinct behaviors instead of
repeating every filename and permission check in every context. Preserve
coverage for dotfiles, Viewer permissions, previews, ranges, and error
headers, and cover symlinked context roots and excluded directories.

Co-Authored-By: Codex <noreply@openai.com>

* Prevent symlink races in instructor file downloads

A file could be replaced with a symlink after path validation, causing
Express to download a file outside the allowed directory or inside .git.
Keep an open descriptor and serve through it so renames cannot redirect
the download, preserving Express's range and preview handling.

Open without following symlinks and recheck the descriptor's path on Linux
to catch parent-directory replacement. Add focused regressions for
replacement before opening and before serving the response.

Co-Authored-By: Codex <noreply@openai.com>

* Return clean errors for instructor file downloads

Convert path-validation failures to plain 404 responses so invalid
requests do not render filesystem paths from AugmentedError details.
Clear file metadata before rendering download errors, while restoring
any cache restrictions supplied by upstream middleware.

Update the existing HTTP cases to require 404s and clean error headers.
Exercise range errors both with and without the app's no-cache policy.

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: austinbillings-pl <austin@prairielearn.com>
Co-authored-by: Codex <noreply@openai.com>
2026-09-10 18:42:19 +00:00
.agents/skills Show institution-provided course access on the homepage (#15680) 2026-08-27 17:05:51 +00:00
.changeset Version Packages (#15679) 2026-08-27 19:59:47 +00:00
.claude Add Claude Code remote session setup (#14555) 2026-03-31 18:44:34 +00:00
.conductor Add Conductor docs preview run script (#15350) 2026-06-29 19:39:22 +00:00
.devcontainer Allow questions to define configurable preferences (#14014) 2026-03-14 01:27:11 +00:00
.github Bump astral-sh/setup-uv from 9.0.0 to 10.0.1 (#15711) 2026-09-02 15:29:06 +00:00
.vscode Include Markdown Python blocks in ruff formatting (#15542) 2026-08-04 14:14:04 +00:00
apps Fix instructor file browser dotfile downloads (#15755) 2026-09-10 18:42:19 +00:00
contrib Use map argument of Array.from instead of map method (#15635) 2026-08-21 15:24:12 +00:00
database Allow SAML login when names are missing (#15738) 2026-09-08 18:51:02 +00:00
docs Update AI grading model options (#15676) 2026-09-10 05:14:21 +00:00
exampleCourse Update example PDF upload questions to allow any file name (#15634) 2026-08-20 18:10:21 +00:00
graders Bump nltk from 3.10.2 to 3.10.3 in /graders/python (#15730) 2026-09-05 16:44:01 +00:00
images/executor Upgrade Docker containers (#15616) 2026-08-24 15:53:28 +00:00
packages Version Packages (#15679) 2026-08-27 19:59:47 +00:00
scripts Bump pnpm, include engines to package.json (#15546) 2026-08-06 03:02:15 +00:00
templateCourse Remove UUIDs from infoCourse.json (#13689) 2026-01-26 22:49:00 +00:00
testCourse Fix pl-symbolic-input proliferating emptyset bug (#15578) 2026-08-12 17:10:36 +00:00
workspaces Bump nltk from 3.10.2 to 3.10.3 in /workspaces/jupyterlab-python (#15752) 2026-09-08 23:05:43 +00:00
.codecov.yml Disable codecov commenting (#13829) 2026-01-19 19:11:45 +00:00
.coderabbit.yaml Update CodeRabbit config (#13826) 2026-01-19 21:01:03 +00:00
.dependency-cruiser.js Switch from yarn to pnpm (#14573) 2026-06-05 01:08:33 +00:00
.dockerignore Use pnpm 11 floor instead of exact pin (#15366) 2026-07-01 15:56:08 +00:00
.editorconfig Format sh files (#11641) 2025-03-31 12:29:32 -07:00
.git-blame-ignore-revs Configure Prettier to auto-format test/example course JSON (#10274) 2024-07-22 17:56:51 +00:00
.gitattributes Switch from yarn to pnpm (#14573) 2026-06-05 01:08:33 +00:00
.gitignore Add .pnpm-store to ignore files (#15296) 2026-06-18 22:27:58 +00:00
.hadolint.yaml Restructure for better layer caches (#11743) 2025-04-14 18:03:32 +00:00
.htmlhintrc Bump minor/patch JS dependencies (#15562) 2026-08-10 19:00:47 +00:00
.htmlmustache.jsonc Remove references to pl-github-link in example course (#15411) 2026-07-09 19:48:46 +00:00
.knip.ts Use map argument of Array.from instead of map method (#15635) 2026-08-21 15:24:12 +00:00
.markdownlint-cli2.yaml Add 'suffix' option to pl-matrix-component-input (#14708) 2026-05-16 04:05:57 +00:00
.mcp.json Add Playwright MCP server config (#14645) 2026-04-06 18:19:12 +00:00
.prettierignore Refactor QTI-imported question feedback display mechanism (#15660) 2026-08-27 16:20:40 +00:00
.prettierrc.json Add additional mustache linting rules (#14792) 2026-04-28 14:49:53 +00:00
.readthedocs.yml Use uv and pin pygments in readthedocs (#14550) 2026-03-30 15:30:34 +00:00
.sqlfluff Enable unique table alias rule in SQL linting (#15524) 2026-07-31 17:35:49 +00:00
.sqlfluffignore Add sqlfluff and squawk linter; split CI checks (#12160) 2025-08-22 01:05:09 +00:00
.squawk.toml Bump the all-patch-minor group across 4 directories with 6 updates (#13250) 2025-11-03 15:30:14 +00:00
AGENTS.md Move timezone interpretation out of PostgreSQL (#15667) 2026-08-27 18:06:15 +00:00
CLAUDE.md Symlink CLAUDE.md to AGENTS.md (#13769) 2026-01-13 00:27:36 +00:00
CODEOWNERS Clean-up CODEOWNERS file (#13130) 2025-10-17 14:25:49 +00:00
CONTRIBUTING.md Add note to contributing guidelines (#15208) 2026-06-09 12:51:23 +00:00
docker-compose-production.yml Remove outdated parts of Docker Compose config (#11933) 2025-05-08 17:15:57 +00:00
docker-compose.yml Remove outdated parts of Docker Compose config (#11933) 2025-05-08 17:15:57 +00:00
Dockerfile Bump amazonlinux in / (#15706) 2026-09-02 15:29:40 +00:00
eslint.config.mjs Fix test deprecations and Vitest startup warning (#15177) 2026-06-29 20:43:52 +00:00
LICENSE Implement new side navigation menu (#11279) 2025-03-05 00:37:17 +00:00
linkinator.config.json Update documentation URLs to docs.prairielearn.com (#14015) 2026-02-04 15:20:08 +00:00
Makefile Upgrade Changesets to v3 (#15596) 2026-08-12 20:28:50 +00:00
mkdocs.yml Support ordered application key rings (#15521) 2026-07-31 15:43:33 +00:00
package.json Bump the all-patch-minor group across 1 directory with 35 updates (#15594) 2026-08-20 14:26:04 +00:00
pnpm-lock.yaml Move timezone interpretation out of PostgreSQL (#15667) 2026-08-27 18:06:15 +00:00
pnpm-workspace.yaml Bump typescript-cp, remove rimraf override (#15620) 2026-08-17 19:24:30 +00:00
postgres-language-server.jsonc Migrate postgres language server (#13347) 2025-11-18 22:06:26 +00:00
pyproject.toml Upgrade sketchresponse to 0.1.5 (#15758) 2026-09-10 16:40:31 +00:00
README.md Update documentation URLs to docs.prairielearn.com (#14015) 2026-02-04 15:20:08 +00:00
SECURITY.md Lint all markdown (#11706) 2025-04-04 22:29:19 +00:00
turbo.jsonc Bump turbo to 2.10.3, migrate to devEngines (#15389) 2026-07-06 17:19:28 +00:00
uv.lock Upgrade sketchresponse to 0.1.5 (#15758) 2026-09-10 16:40:31 +00:00
vitest.config.ts Fix test deprecations and Vitest startup warning (#15177) 2026-06-29 20:43:52 +00:00
vitest.shared.ts Enable low-impact eslint unicorn linting rules (#15617) 2026-08-18 15:09:34 +00:00

PrairieLearn

PrairieLearn is an online problem-driven learning system for creating homeworks and tests. It allows questions to be written using arbitrary HTML, JavaScript, and Python, thus enabling very powerful questions that can randomize and autograde themselves, and can access client- and server-side libraries to handle tasks such as graphical drawing, symbolic algebra, and student code compilation and execution.

Image build status Test build status

Documentation: https://docs.prairielearn.com/

Paid hosting and support: https://www.prairielearn.com/