diff --git a/scantron.py b/scantron.py index 6155875..e97d8ac 100755 --- a/scantron.py +++ b/scantron.py @@ -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):