Esempio 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'))
Esempio n. 2
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"))
Esempio n. 3
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')
Esempio n. 4
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')