Skip to main content

Module access

Module access 

Source
Expand description

Who may use a tool on a course: the token’s scopes are checked by dispatch, the teacher’s live roles here, with the course-edit rule the web UI uses.

Functions§

authorize_course
The course, if it exists and the user may edit it.
connection
A pooled connection; a busy pool is a retryable error.
deleted_in_staged_changes
The error for a page the user’s staged changes delete.
editable_courses
The courses among courses a user with roles may edit, by the rule of authorize_course.
load_page_facts
The live PageFacts of the course’s pages.
open_course
Authorizes the course argument and loads the course as the user sees it. The connection goes back to the pool before the tool’s own work; handlers that query again take one with connection.
open_course_parts
open_course loading only the parts of the course a tool reads.
page_in_course
The page id argument, checked to belong to the course (as staged or as published).
staged_page_document
The page as staged, a state with the user’s staged changes, has it.
state_of
The state a read asks for.