Ejemplo n.º 1
0
def end_test():
    if not loggedin():
        return redirect("/")
    if not "attempt_id" in request.form:
        return redirect(url_for("dashboard"))
    if request.form.get("finished") == "1":
        model.save_attempt(request.form["attempt_id"])
    return redirect(url_for("dashboard"))
Ejemplo n.º 2
0
	def POST(self):
		i = web.input()
		attempt_id = i.attempt_id
		if i.finished == '1':
			model.save_attempt(attempt_id)
		raise web.seeother('../dashboard')