projects
/
quizzer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da7ccde
)
ui.cli: Add a `skip` command to the quizzer shell
author
W. Trevor King
<wking@tremily.us>
Fri, 8 Feb 2013 03:39:18 +0000
(22:39 -0500)
committer
W. Trevor King
<wking@tremily.us>
Fri, 8 Feb 2013 03:39:18 +0000
(22:39 -0500)
This lets you bypass a difficult question on the stack and continue
with the rest of the quiz.
quizzer/ui/cli.py
patch
|
blob
|
history
diff --git
a/quizzer/ui/cli.py
b/quizzer/ui/cli.py
index 94255a2f5e1df843f95aca7974d4119f0fa4e8cf..e5a8e4906731d01400e60b2c3f16c048a8a42f33 100644
(file)
--- 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()