feat: 立即开始停止学习并整理学时历史与界面
This commit is contained in:
@@ -205,6 +205,13 @@ def fetch_training_detail(db: Session, employee_id: str, path: str, client_facto
|
||||
return _live(db, employee_id, client_factory, lambda client: client.training_detail(path))
|
||||
|
||||
|
||||
def fetch_study_history(db: Session, employee_id: str, client_factory=EunivClient) -> dict:
|
||||
items = _live(db, employee_id, client_factory, lambda client: client.study_history())
|
||||
if not isinstance(items, list):
|
||||
items = []
|
||||
return {"items": items, "total": len(items)}
|
||||
|
||||
|
||||
def _auto_attempts(db: Session) -> int:
|
||||
from admin.settings import auto_attempt_count
|
||||
|
||||
|
||||
Reference in New Issue
Block a user