Support setting MAX_PROBLEM_RESPONSES_COUNT to None for unrestricted row count

This commit is contained in:
Kshitij Sobti
2018-03-29 05:11:59 +05:30
parent 1d507bf246
commit 8885092790

View File

@@ -580,9 +580,10 @@ class ProblemResponses(object):
response['title'] = title
response['location'] = ' > '.join(path)
response['block_id'] = block.block_id
max_count -= len(problem_responses)
if max_count <= 0:
break
if max_count is not None:
max_count -= len(problem_responses)
if max_count <= 0:
break
return student_data