Skip to main content

Module page

Structs§

PagePreview
What the preview of a staged page, or of a published one, renders.
PreviewExercise
An exercise of a previewed page.
PreviewPage
A page as students see it before answering anything. The preview needs no login, so exercise specs, model solutions and review settings other than the instructions are left out.
PreviewPageLink
A page a preview can switch to.
PreviewReference
A bibliography entry the page’s citations refer to.

Functions§

changed_page_links
The pages changeset adds or changes, in the order the staged course structure shows them.
ensure_open 🔒
find_row 🔒
page_links 🔒
The pages of course_id as staged_rows leave them, in course order: only those the rows add or change with only_changed, else all of them.
render_page 🔒
The page page_id as staged_rows leave it over the live course.
render_with_page_links 🔒
resolve_changeset_preview
What the preview link of the whole changeset renders: page_id, or the first changed page without one, with the changed pages to switch between. The caller checks the same things as for resolve_preview. Errors with NotFound also if the changeset changes no pages and page_id is None.
resolve_preview
What a preview link of page_id in changeset renders. The caller checks that the changeset is the link’s user’s and that they may still edit its course. Errors with NotFound if the changeset is no longer open or if the page does not exist in it or live.
resolve_published_course_preview
What the preview link of the whole published course renders: page_id, or the first page without one, with all pages to switch between. The caller checks the same things as for resolve_published_preview.
resolve_published_preview
What a preview link of the published page_id of course_id renders. The caller checks that the link’s user may still edit the course. Errors with NotFound if the page is not in the course.
staged_front_page_id 🔒
The front page of chapter chapter_id as staged_rows leave it.