We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 271e41e commit f6e1af6Copy full SHA for f6e1af6
1 file changed
bases/rsptx/web2py_server/applications/runestone/controllers/peer.py
@@ -174,7 +174,9 @@ def _get_current_question(assignment_id, get_next):
174
idx = 0
175
db(db.assignments.id == assignment_id).update(current_index=idx)
176
elif get_next is True:
177
- idx = assignment.current_index + 1
+ all_questions = _get_assignment_questions(assignment_id)
178
+ total_questions = len(all_questions)
179
+ idx = min(assignment.current_index + 1, max(total_questions - 1, 0))
180
181
else:
182
idx = assignment.current_index
0 commit comments