From: W. Trevor King Date: Fri, 8 Feb 2013 03:39:18 +0000 (-0500) Subject: ui.cli: Add a `skip` command to the quizzer shell X-Git-Tag: v0.2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=92b6f5ce41ce074ee72ec213a02bedeef3115fc3;p=quizzer.git ui.cli: Add a `skip` command to the quizzer shell This lets you bypass a difficult question on the stack and continue with the rest of the quiz. --- diff --git a/quizzer/ui/cli.py b/quizzer/ui/cli.py index 94255a2..e5a8e49 100644 --- a/quizzer/ui/cli.py +++ b/quizzer/ui/cli.py @@ -107,6 +107,13 @@ class QuestionCommandLine (_cmd.Cmd): self._reset() return True + def do_skip(self, arg): + "Skip the current question, and continue with the quiz" + self.question = self.ui.get_question() + if not self.question: + return True # out of questions + self._reset() + def do_hint(self, arg): "Show a hint for the current question" self._reset()