From 9213df565eaaaae9452b1bf5ff535c93ff35a2a1 Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Sat, 15 Oct 2016 17:53:56 +0200
Subject: [PATCH] Closes #121

---
 templates/courses.html | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/templates/courses.html b/templates/courses.html
index d8ef682..d110443 100644
--- a/templates/courses.html
+++ b/templates/courses.html
@@ -9,7 +9,8 @@
 			</li>
 			{% if ismod() %} 
 			<li>
-				<a class="btn btn-default" href="{{ url_for('create', table='courses', handle='new'+(randint(0,1000)|string), title='Neue Veranstaltung', responsible=session.user.givenName, ref=request.url) }}">Neue Veranstaltung</a>
+				{% set newhandle = 'new'+(randint(0,1000)|string) %}
+				<a class="btn btn-default" href="{{ url_for('create', table='courses', handle=newhandle, title='Neue Veranstaltung', responsible=session.user.givenName, ref=url_for('course', handle=newhandle)) }}">Neue Veranstaltung</a>
 			</li>
 			{% endif %}
 			<li class="dropdown" style="padding-right: 0px">
-- 
GitLab