|
@@ -19,7 +19,8 @@ from apps.examination.exam.models import ExamAnswerLog, ExamAnswerOptionLog, Exa
|
|
from apps.examination.exampaper.models import ExamPaper, ExamPaperDetail, ExamQuestion
|
|
from apps.examination.exampaper.models import ExamPaper, ExamPaperDetail, ExamQuestion
|
|
from apps.examination.exampaper.filters import ExamPaperFilter
|
|
from apps.examination.exampaper.filters import ExamPaperFilter
|
|
from apps.examination.exampaper.serializers import StaffExamPaperSerializer
|
|
from apps.examination.exampaper.serializers import StaffExamPaperSerializer
|
|
-from apps.examination.examquestion.models import ExamQuestionOption, ExamQuestionFill
|
|
|
|
|
|
+from apps.examination.examquestion.models import ExamQuestionOption, ExamQuestionFill, ExamQuestionFeedback
|
|
|
|
+from apps.examination.examquestion.serializers import ExamQuestionFeedbackSerializer
|
|
from apps.practise.errorbook.models import ErrorBook
|
|
from apps.practise.errorbook.models import ErrorBook
|
|
|
|
|
|
class ExamLogViewSet(CustomModelViewSet):
|
|
class ExamLogViewSet(CustomModelViewSet):
|
|
@@ -323,3 +324,15 @@ class ExamLogViewSet(CustomModelViewSet):
|
|
traceback.print_exc()
|
|
traceback.print_exc()
|
|
return response_error(str(e))
|
|
return response_error(str(e))
|
|
return response_ok()
|
|
return response_ok()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+class ExamQuestionFeedbackViewSet(CustomModelViewSet):
|
|
|
|
+ permission_classes = [IsStaff, ]
|
|
|
|
+ queryset = ExamQuestionFeedback.objects.filter()
|
|
|
|
+ serializer_class = ExamQuestionFeedbackSerializer
|
|
|
|
+
|
|
|
|
+ def perform_create(self, serializer):
|
|
|
|
+ super(ExamQuestionFeedbackViewSet, self).perform_create(serializer)
|
|
|
|
+ instance = serializer.instance
|
|
|
|
+ validated_data = serializer.validated_data
|
|
|
|
+ SysLog.objects.addnew(self.request.user, SysLog.INSERT, u'添加试题错误反馈,id=%d' % instance.id, validated_data)
|