Commit dfd4ad15 authored by raida's avatar raida

Change the seed

parent 18b23061
......@@ -1640,9 +1640,6 @@ def WEI1A(request, sock, kwargs):
form = forms.WEI1AForm(request.POST)
if form.is_valid():
# sock.write(json.dumps(["wei_compute_form", [ "1a", form.cleaned_data, ], ]))
# out = nk.full_read(sock)
request.session["wei1A2019"]["nom"] = form.cleaned_data["nom"]
request.session["wei1A2019"]["prenom"] = form.cleaned_data["prenom"]
request.session["wei1A2019"]["genre"] = form.cleaned_data["genre"]
......@@ -1664,7 +1661,7 @@ def WEI1A(request, sock, kwargs):
return (variables, "note/wei_1a.html")
else:
variables["succes"] = True
variables["liste"] = algo1a.test(True, [], 1)
variables["liste"] = algo1a.test(True, [], request.session["wei1A2019"]["nom"] + request.session["wei1A2019"]["prenom"])
return (variables, "note/page_form.html")
else:
......@@ -1709,12 +1706,12 @@ def WEI1Aalgo(request, sock, kwargs):
if request.method == "GET":
variables["form"] = forms.WEI1AForm(label_suffix=_(u" :"))
variables["type"] = '1a'
variables["liste"] = algo1a.test(True, [], 1)
variables["liste"] = algo1a.test(True, [], request.session["wei1A2019"]["nom"] + request.session["wei1A2019"]["prenom"])
elif request.method == "POST":
separator = "#" if request.session["quest"] != "" else ""
request.session["quest"] += separator + request.POST.get("reponse")
variables["liste"] = algo1a.test(True, request.session["quest"].split("#"), 1)
variables["liste"] = algo1a.test(True, request.session["quest"].split("#"), request.session["wei1A2019"]["nom"] + request.session["wei1A2019"]["prenom"])
else:
messages.add_error(request, "Requête inattendue : {}".format(request.method))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment