Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0+2025.10.28T13.41.31.134Z.87861f3a.master
0.1.0+2025.11.03T15.31.30.155Z.0dd51980.berickson.logging
25 changes: 25 additions & 0 deletions docs/concepts/system_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,31 @@ stack. That means a request handled for an instructor can pick up
instructor-specific defaults while a system job, using the same accessor, still
observes the site-wide configuration.

### What context we pass today

Every call into `pmss_settings` names the setting through the `types` list. We
build that list from the canonical namespace of the setting—`['server']` for the
public port, `['redis_connection']` for Redis, `['modules', module_name]` for
module flags, and so on. Because the list mirrors the hierarchy defined in
`creds.yaml`, we get deterministic lookups even when overlays layer additional
rules on top.

Selectors (the `attributes` argument) are rarer. Only features that genuinely
vary per request provide them today. For example, roster resolution passes the
requesting user's email domain and the LTI provider so the `roster_data`
configuration can pick the correct backend, and the dashboard logging toggle
adds the user's domain to honour tenant-specific overrides. Most other settings
still rely solely on the namespace lookup.

### Where we want to go

We want every lookup that depends on request context to assemble the same
attribute payload in the same place. Rather than sprinkling ad-hoc conditionals
around the codebase, helpers should gather the domain, provider, role, or other
selectors once and pass them through every relevant PMSS call. This keeps the
setting definitions declarative, makes it obvious which selectors operators can
target in overlays, and avoids drift between different parts of the system.

## Extending the system settings surface

Adding a new capability follows a consistent pattern:
Expand Down
6 changes: 6 additions & 0 deletions docs/reference/system_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ runtime.
| `aio.session_secret` | Secret used to encrypt and sign aiohttp session cookies. Generate a unique value per deployment. | required | [`learning_observer/learning_observer/webapp_helpers.py`](../../learning_observer/learning_observer/webapp_helpers.py) |
| `aio.session_max_age` | Session lifetime in seconds. | required | [`learning_observer/learning_observer/webapp_helpers.py`](../../learning_observer/learning_observer/webapp_helpers.py) |

### Dashboard Settings (`dashboard_settings` namespace)

| YAML path | Description | Default | Used in |
| --- | --- | --- | --- |
| `dashboard_settings.logging_enabled` | Determine if we should log dashboard sessions. | `false` | [`learning_observer/learning_observer/dashboard.py`](../../learning_observer/learning_observer/dashboard.py) |

### Redis connection (`redis_connection` namespace)

| YAML path | Description | Default | Used in |
Expand Down
2 changes: 1 addition & 1 deletion learning_observer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0+2025.10.14T13.37.19.878Z.ec3193cb.master
0.1.0+2025.11.03T15.31.30.155Z.0dd51980.berickson.logging
Loading
Loading