.
This commit is contained in:
+11
-4
@@ -41,6 +41,9 @@ from anatomy.views import AnatomyExamViews
|
||||
from rapids.views import RapidExamViews
|
||||
from longs.views import LongExamViews
|
||||
|
||||
from generic.forms import QuestionNoteForm
|
||||
from generic.models import QuestionNote
|
||||
|
||||
|
||||
@login_required
|
||||
def profile(request):
|
||||
@@ -147,10 +150,14 @@ def exam_submit(request):
|
||||
|
||||
def feedback_create(request, question_type, pk):
|
||||
if question_type == "anatomy":
|
||||
content_type = ContentType.objects.get(model="AnatomyQuestion")
|
||||
question = AnatomyQuestion
|
||||
elif question_type == "rapid":
|
||||
content_type = ContentType.objects.get(model="Rapid")
|
||||
question = Rapid
|
||||
elif question_type == "long":
|
||||
content_type = ContentType.objects.get(model="Long")
|
||||
question = Long
|
||||
|
||||
return JsonResponse({"success": False, "error": "Invalid exam type"})
|
||||
return JsonResponse({"success": False, "error": "Invalid exam type"})
|
||||
|
||||
class AddQuestionNote(LoginRequiredMixin, CreateView):
|
||||
model = QuestionNote
|
||||
form_class = QuestionNoteForm
|
||||
Reference in New Issue
Block a user