generate keys
[edumed.git] / wtem / views.py
index a532732..465b11b 100644 (file)
@@ -47,6 +47,8 @@ def form_before(request, submission_id, key):
     if submission.key != key:
         return render(request, 'wtem/key_not_found_before.html')
     else:
+        submission.opened_link = True
+        submission.save()
         return render(request, 'wtem/main_before.html')
 
 
@@ -137,6 +139,9 @@ def start(request, submission_id, key):
     if submission.key != key:
         return render(request, 'wtem/key_not_found.html')
 
+    submission.opened_link = True
+    submission.save()
+
     i, exercise = submission.current_exercise()
     if not exercise:
         return render(request, 'wtem/thanks_single.html')