ui.cli: `skip` shifts the current question to the back of the stack
authorW. Trevor King <wking@tremily.us>
Fri, 8 Feb 2013 03:41:40 +0000 (22:41 -0500)
committerW. Trevor King <wking@tremily.us>
Fri, 8 Feb 2013 03:41:40 +0000 (22:41 -0500)
Rather than dropping skipped questions, just save them for later.
This gives you another stab at them without having to restart the
quiz.  If you still can't answer the questions once you reach them
again, you can always `quit` ;).

quizzer/ui/cli.py

index e5a8e4906731d01400e60b2c3f16c048a8a42f33..60ce8968df1b2b7f3217e7c826a4eadb346f43fe 100644 (file)
@@ -109,6 +109,7 @@ class QuestionCommandLine (_cmd.Cmd):
 
     def do_skip(self, arg):
         "Skip the current question, and continue with the quiz"
+        self.ui.stack.append(self.question)
         self.question = self.ui.get_question()
         if not self.question:
             return True  # out of questions