1
0

Phase 3: instructor in-class UI

Live mode with resolve-before-next call flow and one-tap outcomes
(assessments, missing, skip); printable numbered call lists with
pictures and a blank notes column; a day editor for after-class
outcome entry, replacing hand-editing of call_list TSVs; and a
per-course settings page (selection mode, weight factor, assessment
visibility). Selection honors opt-outs and the course's mode: weighted
draws use full-course answered-call history, cycle mode calls everyone
once per day before starting over and treats skips as never called.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 16:40:04 -07:00
parent 52afc57ebd
commit 903209d3d5
16 changed files with 849 additions and 56 deletions

View File

@@ -1,25 +1,4 @@
import pytest
from coldcall_lti import create_app
from coldcall_lti.config import Config
from coldcall_lti.db import Base
def make_app(tmp_path, dev_mode):
class TestConfig(Config):
TESTING = True
DATABASE_URL = f"sqlite:///{tmp_path}/test.sqlite3"
DEV_MODE = dev_mode
SECRET_KEY = "test"
app = create_app(TestConfig)
Base.metadata.create_all(app.extensions["db_engine"])
return app
@pytest.fixture
def dev_client(tmp_path):
return make_app(tmp_path, dev_mode=True).test_client()
from conftest import make_app
def test_healthz(tmp_path):
@@ -33,7 +12,7 @@ def test_dev_routes_absent_outside_dev_mode(tmp_path):
def test_views_require_launch(dev_client):
assert dev_client.get("/instructor").status_code == 403
assert dev_client.get("/instructor/").status_code == 403
assert dev_client.get("/me").status_code == 403
@@ -45,7 +24,6 @@ def test_dev_instructor_launch_shows_roster(dev_client):
assert resp.status_code == 200
page = resp.get_data(as_text=True)
assert "8 active students" in page
assert "Ada Lovelace" in page
def test_dev_student_launch(dev_client):
@@ -54,5 +32,6 @@ def test_dev_student_launch(dev_client):
)
page = resp.get_data(as_text=True)
assert "Ada Lovelace" in page
# A student cannot reach the instructor view.
assert dev_client.get("/instructor").status_code == 403
# A student cannot reach the instructor views.
assert dev_client.get("/instructor/").status_code == 403
assert dev_client.get("/instructor/live").status_code == 403