diff --git a/static/js/result.js b/static/js/result.js index f312722..220fb15 100644 --- a/static/js/result.js +++ b/static/js/result.js @@ -1,7 +1,3 @@ -$(document).ready(function () { - uploadAllAnswers(); -}); - $('.answer').addClass('disabled'); $('.answered').toggleClass('btn-outline-primary btn-danger'); $('.correct').toggleClass('btn-outline-primary btn-success'); diff --git a/utils.py b/utils.py index dd98ef0..43c0375 100644 --- a/utils.py +++ b/utils.py @@ -20,6 +20,8 @@ def save_answer(answer_id, user_id=None): user = get_user(user_id) if answer_id is None or user is None: return False + if user.end_time is not None: + return True # just ignore answer = Answer.query.get(answer_id) if answer is None: # TODO: log this, maybe it was right