ui: Add dependency handling to UserInterface.get_question
authorW. Trevor King <wking@tremily.us>
Tue, 5 Feb 2013 15:37:41 +0000 (10:37 -0500)
committerW. Trevor King <wking@tremily.us>
Tue, 5 Feb 2013 15:37:44 +0000 (10:37 -0500)
commitefac56f80f609dc3e4cd139a300c0be7352f1990
treebc10abbb4de4f8f57b1a7c865e7893a1404dd59f
parent2fa4bc84af9ac6d323462d97cd85d571b48148b5
ui: Add dependency handling to UserInterface.get_question

We start the stack with all the leaf questions (i.e. questions that
are not dependencies of other question).  If the user gets one wrong,
we push the question back on the stack (so they can try again later),
and also push all of that questions direct dependencies onto the stack
(so they can get the background they need to answer the question they
got wrong).
quizzer/quiz.py
quizzer/ui/__init__.py