Skip to content

Commit

Permalink
The scantron class will now honour the collate option.
Browse files Browse the repository at this point in the history
  • Loading branch information
philsc committed May 5, 2013
1 parent 4905c34 commit 7f77dc0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions scantron.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,18 @@ def add_sheet(self, data, match=1, position=1):


def populate(self, data, matches=1, collate='on'):
for match in range(1, matches + 1):
if collate == 'on':
for match in range(1, matches + 1):
for position in range(1, 7):
self.add_sheet(data, match, position)
self._canvas.showPage()
self._reset_values()
else:
for position in range(1, 7):
self.add_sheet(data, match, position)
self._canvas.showPage()
self._reset_values()
for match in range(1, matches + 1):
self.add_sheet(data, match, position)
self._canvas.showPage()
self._reset_values()


def save(self):
Expand Down

0 comments on commit 7f77dc0

Please sign in to comment.