.
This commit is contained in:
@@ -15,6 +15,7 @@ from django.utils.decorators import method_decorator
|
|||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import urllib
|
||||||
|
|
||||||
from django.views import View
|
from django.views import View
|
||||||
|
|
||||||
@@ -424,6 +425,13 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
if not exam.active:
|
if not exam.active:
|
||||||
raise Http404("No available exam")
|
raise Http404("No available exam")
|
||||||
|
|
||||||
|
|
||||||
|
if request.GET.get('_'):
|
||||||
|
base_url = redirect("{}:question_json".format(self.app_name), pk=sk)
|
||||||
|
query_string = urllib.urlencode({'_': request.GET.get('_')})
|
||||||
|
url = '{}?{}'.format(base_url, query_string)
|
||||||
|
return redirect(url)
|
||||||
|
|
||||||
return redirect("{}:question_json".format(self.app_name), pk=sk)
|
return redirect("{}:question_json".format(self.app_name), pk=sk)
|
||||||
redirect()
|
redirect()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user