.
This commit is contained in:
@@ -181,6 +181,8 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
exam.recreate_json = True
|
exam.recreate_json = True
|
||||||
exam.save()
|
exam.save()
|
||||||
|
|
||||||
|
exam.get_exam_json()
|
||||||
|
|
||||||
return redirect("{}:exam_overview".format(self.app_name), pk=pk)
|
return redirect("{}:exam_overview".format(self.app_name), pk=pk)
|
||||||
|
|
||||||
@method_decorator(login_required)
|
@method_decorator(login_required)
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ class Long(models.Model):
|
|||||||
return [ans for ans in answers if not ans.is_marked()]
|
return [ans for ans in answers if not ans.is_marked()]
|
||||||
|
|
||||||
def get_json(self, question_id):
|
def get_json(self, question_id):
|
||||||
|
# self == q?
|
||||||
q = get_object_or_404(Long, pk=question_id)
|
q = get_object_or_404(Long, pk=question_id)
|
||||||
|
|
||||||
#exam_order.append(q.id)
|
#exam_order.append(q.id)
|
||||||
|
|||||||
@@ -1016,4 +1016,6 @@ def question_json_recreate(request, pk):
|
|||||||
question.recreate_json = True
|
question.recreate_json = True
|
||||||
question.save()
|
question.save()
|
||||||
|
|
||||||
|
question.get_question_json(pk)
|
||||||
|
|
||||||
return redirect("longs:question_detail", pk=pk)
|
return redirect("longs:question_detail", pk=pk)
|
||||||
Reference in New Issue
Block a user