.
This commit is contained in:
@@ -1019,6 +1019,14 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
if sk == exam_length - 1:
|
||||
next = False
|
||||
|
||||
view_feedback = False
|
||||
if (
|
||||
request.user.groups.filter(name=self.checker_group).exists()
|
||||
or request.user.groups.filter(name="feedback_checker").exists()
|
||||
or request.user in question.author.all()
|
||||
):
|
||||
view_feedback = True
|
||||
|
||||
return render(
|
||||
request,
|
||||
"{}/question_detail.html".format(self.app_name),
|
||||
@@ -1029,6 +1037,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
"previous": previous,
|
||||
"exam_length": exam_length,
|
||||
"pos": pos,
|
||||
"view_feedback": view_feedback,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user