<section>Page Specification and Loading</section>

The structure of the web site mirrors the structure of the directories on disk.
Having a directory at `course_root/page` means that a page will be available at
`http://my.site/page`.

Names with underscores are hidden (not web accessible), so if you plan on
storing other things inside the same repository, you should make sure their
names start with an underscore.

Inside of each page's directory, there should be a file called `content.md`.  This file
contains the page's source (see the [Markdown](COURSE/markdown) and
[Questions](COURSE/questions) pages for more information about how these files
are structured).

<subsection>Magic Variables and Inheritance</subsection>

A lot of behavior in CAT-SOOP is defined by the values stored in "magic"
variables with particular names.  These variables control various aspects of
the page's appearance, among other things.  Typically, all magic variables
begin with the prefix `cs_` (or `csq_` if they control aspects of a _question_
rather than a page).

In addition to `content.md`, each directory can also contain a file called
`preload.py`, which is typically used to set these magic variables.  Each page
inherits the values resulting from the `preload.py` "above" it in the directory
structure.  In particular, on each page load:

* An empty environment $E_1$ is created
* All the `preload.py` files leading up to the requested page are executed in $E_1$, one after the other, starting with the root.
* User authentication occurs
* Includes are processed
* All Python tags on the given page are executed in $E_1$
* Each question tag on the page creates a new environment $E_i$ inheriting from $E_1$, and the code from the question tag is evaluated in $E_i$

So values set in the top-level `preload.py` affect all pages beneath them
(unless those values are overridden).  Values set in Python tags in a
particular page's `content.md` affect only that page, and values set in
`question` tags on a page affect only that particular question.

<section>Static Files and Linking</section>

Static files (i.e., those not generated by a `content.md`) are treated
differently.  They should be placed inside a directory called `__STATIC__`
within a page's folder.

Both static files and dynamic content can be linked to using a short-hand
syntax.  For example, imagine that there is a page `course_root/homeworks/week1'
and a static file `course_root/homeworks/__STATIC__/an_image.png`.

In the `content.md` for the course, these could be linked to as `CURRENT/week1`
and `CURRENT/an_image.png`, respectively.  `CURRENT` always referes to the
location of the page currently being loaded.

Similarly, from any page within the course, those files could be linked to as
`COURSE/homeworks/week1` and `COURSE/homeworks/an_image.png`, respectively.

<section>Controlling Access to Pages</section>

<subsection>Permissions</subsection>

<subsection>Users, Roles, and Sections</subsection>

<subsection>Release and Due Dates</subsection>

`cs_release_date` controls the date at which a page is "released" to a student
(i.e., that it becomes visible to those with the `view` permission).  It can
always be specified as a string `"YYYY-MM-DD:HH:MM"`, and it can also be
specified based on course-specific meeting times (see the `preload.py` file for
more information).

Similarly, `cs_due_date` controls when the questions on a page come due.  In
CAT-SOOP, the default behavior is to allow submissions after the due date.  To
implement a hard deadline and lock students out from submitting after a
deadline, set `cs_auto_lock = True`

<subsection>Password-Protected Pages</subsection>

`cs_require_activation` is a Boolean that determines whether a password needs
to be entered to access a page for the first time.

<section>Timed Exercises</section>
