summaryrefslogtreecommitdiff
path: root/routes/answer.py
diff options
context:
space:
mode:
authorEmma Koistila <ekoistil@local>2023-12-03 14:11:21 +0200
committerEmma Koistila <ekoistil@local>2023-12-03 14:11:21 +0200
commitb538d8236cd9cf92c36df47ddf244096896f5068 (patch)
treec94f2becffb7b213b7288405b4a6b3fa7b70b4e7 /routes/answer.py
parent83eefd51d79dc2c0fa778303042c581b4691e82e (diff)
Moving comparison calculations to SQL query.
Diffstat (limited to 'routes/answer.py')
-rw-r--r--routes/answer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/answer.py b/routes/answer.py
index 2307a83..2c2be82 100644
--- a/routes/answer.py
+++ b/routes/answer.py
@@ -31,12 +31,12 @@ def answer_id():
session["alert"] = "Koodilla ei löytynyt kyselmää"
return redirect(next)
- if next == "/#analyse" and not D.is_user_answered( aid, sid ):
+ if next == "/#analyse" and not D.quiz.user( aid, sid ):
session["alert"] = "Et ole vielä vastannut tähän kyselmään. \
Voit tutkia vastaksia vastattuasi."
return redirect("/#answer")
- if next == "/#answer" and D.is_user_answered( aid, sid ):
+ if next == "/#answer" and D.quiz.user( aid, sid ):
session["alert"] = "Olet jo vastannut valitsemaasi kyselyyn."
return redirect("/#analyse")