From 92b6f5ce41ce074ee72ec213a02bedeef3115fc3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 7 Feb 2013 22:39:18 -0500 Subject: [PATCH] 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. --- quizzer/ui/cli.py | 7 +++++++ 1 file changed, 7 insertions(+) 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() -- 2.26.2