Finished Quiz Console

This commit is contained in:
2022-06-16 01:03:06 +01:00
parent 2ea778143e
commit b9d45f94fe
8 changed files with 110 additions and 13 deletions

View File

@ -49,8 +49,8 @@ def _submit_quiz():
id = request.get_json()['id']
answers = request.get_json()['answers']
entry = Entry.query.filter_by(id=id).first()
if not entry: return jsonify({'error': 'Unrecognised ID.'}), 400
test = entry['test']
if not entry: return jsonify({'error': 'Unrecognised Entry.'}), 400
test = entry.test
dataset = test.dataset
success, message = dataset.check_file()
if not success: return jsonify({'error': message}), 500