bnmnetp/runestone — pull request #524 by StevenJamesMoore (2014-11-04 22:12:44+00:00)
Title: Fixed divide by 0 error for viewing group schedule

Added an if total > 0: line to keep the server from crashing with a divide by zero error due to the user having no user chapter progress. This occurs when a user has yet to view any of the chapters of the book and attempts to access the group schedule. Since the user's chapter progress will not exist, total will remain 0, causing this to break when it tries to calculate result by dividing by total, which will remain 0.