Skip to content

Commit 7fce0ab

Browse files
Fatima-Tahirihalaij1
authored andcommitted
Fix empty quiz exercise if user submitted during grader downtime
Fixes #1466
1 parent 2e77826 commit 7fce0ab

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

exercise/views.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,13 @@ def get_page(self, request: HttpRequest, students: List[UserProfile]) -> Exercis
311311
.first()
312312
)
313313
if submission:
314+
if self.feedback_revealed and not submission.feedback:
315+
# We cannot show feedback (grader service was probably down), so load a blank exercise page
316+
return self.exercise.load(
317+
request,
318+
students,
319+
url_name=self.post_url_name,
320+
)
314321
if self.feedback_revealed:
315322
page = ExercisePage(self.exercise)
316323
page.content = submission.feedback

0 commit comments

Comments
 (0)