Skip to content

Commit

Permalink
fix: gate result api
Browse files Browse the repository at this point in the history
  • Loading branch information
navinkarkera committed Jul 31, 2024
1 parent dffe5dd commit 65ce424
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions multi_problem_xblock/multi_problem_xblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ def get_test_scores(self, _data, _suffix):
"""
Get test score slide content
"""
if self.display_feedback == DISPLAYFEEDBACK.NEVER:
return Response(_('Not allowed to see results'), 400)
completed_problems, total_problems = self._get_problem_stats()
if completed_problems != total_problems and total_problems > 0:
return Response(_('All problems need to be completed before checking test results!'), status=400)
Expand Down

0 comments on commit 65ce424

Please sign in to comment.