Toya0421 commited on
Commit
b949c97
·
verified ·
1 Parent(s): 9d6390b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -67,7 +67,8 @@ def log_to_csv(entry: dict):
67
  )
68
 
69
  def log_event(state: dict, **kwargs):
70
- now = (datetime.utcnow() + timedelta(hours=9)).strftime("%Y-%m-%d %H:%M:%S")
 
71
  entry = {"time": now, "user_id": state.get("user_id"), **kwargs}
72
  log_to_csv(entry)
73
 
@@ -158,7 +159,7 @@ def start_test(student_id, state):
158
  question = generate_question(text)
159
  displayed_time = datetime.utcnow() + timedelta(hours=9)
160
 
161
- # ✅ startログ(choice/correct/actionsは空)
162
  log_event(
163
  state,
164
  question_number=1,
@@ -167,7 +168,7 @@ def start_test(student_id, state):
167
  question=question,
168
  choice=None,
169
  correct=None,
170
- actions=None,
171
  )
172
 
173
  return (
 
67
  )
68
 
69
  def log_event(state: dict, **kwargs):
70
+ # Excelで#####になりにくいよう「JST」を付けてテキスト化
71
+ now = (datetime.utcnow() + timedelta(hours=9)).strftime("%Y-%m-%d %H:%M:%S") + " JST"
72
  entry = {"time": now, "user_id": state.get("user_id"), **kwargs}
73
  log_to_csv(entry)
74
 
 
159
  question = generate_question(text)
160
  displayed_time = datetime.utcnow() + timedelta(hours=9)
161
 
162
+ # ✅ startログactions列に "start test pushed" を入れる
163
  log_event(
164
  state,
165
  question_number=1,
 
168
  question=question,
169
  choice=None,
170
  correct=None,
171
+ actions="start test pushed",
172
  )
173
 
174
  return (