MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / teacher_session

Function teacher_session

tests/src/util/__init__.py:39–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38
39def teacher_session() -> Optional[_Session]:
40 global _teacher_session
41
42 if not _teacher_session:
43 if "teacher_auth" not in get_auth():
44 warnings.warn(f"Could not test for teacher session")
45 return None
46
47 data = get_auth()["teacher_auth"]
48 _teacher_session = login(data["username"], data["password"])
49
50 return _teacher_session
51
52
53def allow_before(d: datetime) -> bool:

Callers

nothing calls this directly

Calls 2

loginFunction · 0.90
get_authFunction · 0.85

Tested by

no test coverage detected