summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
W. Trevor King [Wed, 6 Feb 2013 17:45:51 +0000 (12:45 -0500)]
quizzes: Use complete sentences with punctation for prompts
This makes multi-sentence prompts less awkward.
W. Trevor King [Wed, 6 Feb 2013 17:41:23 +0000 (12:41 -0500)]
cli: Add the --questions option to list questions on the stack
This lets you see what a quiz will ask without actually taking the
quiz. In the future, it may be useful for jumping to a specific
question.
W. Trevor King [Wed, 6 Feb 2013 14:59:11 +0000 (09:59 -0500)]
cli: Add the --tags option to list tags on the stack
W. Trevor King [Wed, 6 Feb 2013 14:57:16 +0000 (09:57 -0500)]
quizzes/git: Tag existing questions
W. Trevor King [Wed, 6 Feb 2013 14:56:47 +0000 (09:56 -0500)]
Add --tag option and Question.tags sets for filtering large quizzes
W. Trevor King [Wed, 6 Feb 2013 14:47:26 +0000 (09:47 -0500)]
cli: Add --all for easy review of previously-answered questions
W. Trevor King [Wed, 6 Feb 2013 14:39:59 +0000 (09:39 -0500)]
answerdb: Timestamp answers
This may provide insight into the learning process (e.g. after I
reviewed the Git index, everyone started doing better).
W. Trevor King [Wed, 6 Feb 2013 14:27:43 +0000 (09:27 -0500)]
quizzes/git: Add 'git commit --amend' question
W. Trevor King [Wed, 6 Feb 2013 03:17:11 +0000 (22:17 -0500)]
README.rst: Add a symlink for GitHub's README renderer
W. Trevor King [Wed, 6 Feb 2013 02:58:48 +0000 (21:58 -0500)]
quizzes/git: Add 'git config --global user.{name,email}' questions
W. Trevor King [Wed, 6 Feb 2013 02:43:06 +0000 (21:43 -0500)]
quizzes/git: Add 'git checkout HEAD -- FILE' question
W. Trevor King [Wed, 6 Feb 2013 02:31:01 +0000 (21:31 -0500)]
question: Add a trailing newline to ScriptQuestion scripts
W. Trevor King [Wed, 6 Feb 2013 02:21:07 +0000 (21:21 -0500)]
question: Pass stdin through to the ScriptQuestion-invoked script
Use a temporary script to hold the answer script, to leave stdin open.
This allows users to use commands that need stdin (e.g. `git commit`,
which spawns an `$EDITOR`).
W. Trevor King [Wed, 6 Feb 2013 01:56:06 +0000 (20:56 -0500)]
quizzes/git: Add 'git add / commit' question
Remove the default timeout, to give users who spawn `$EDITOR` via `git
commit` time to write and save their message.
W. Trevor King [Tue, 5 Feb 2013 20:41:01 +0000 (15:41 -0500)]
Run update-copyright.py
W. Trevor King [Tue, 5 Feb 2013 20:38:11 +0000 (15:38 -0500)]
.update-copyright.conf: Configure update-copyright.py
http://blog.tremily.us/posts/update-copyright/
http://pypi.python.org/pypi/update-copyright/
W. Trevor King [Tue, 5 Feb 2013 20:37:04 +0000 (15:37 -0500)]
Add `# Copyright` tags to Python files
W. Trevor King [Tue, 5 Feb 2013 20:33:32 +0000 (15:33 -0500)]
.gitignore: Ignore MANIFEST and dist/ packaging side effects
W. Trevor King [Tue, 5 Feb 2013 20:33:13 +0000 (15:33 -0500)]
MANIFEST.in: Distribute COPYING and quizzes/*.json
W. Trevor King [Tue, 5 Feb 2013 20:31:03 +0000 (15:31 -0500)]
setup.py: Package with distutils
W. Trevor King [Tue, 5 Feb 2013 20:30:27 +0000 (15:30 -0500)]
README: Flesh out description and add example typescript
W. Trevor King [Tue, 5 Feb 2013 20:11:44 +0000 (15:11 -0500)]
README: Mention Python 3.3 dependency
W. Trevor King [Tue, 5 Feb 2013 20:10:42 +0000 (15:10 -0500)]
COPYING: Distribute quizzer under the GPLv3+
W. Trevor King [Tue, 5 Feb 2013 20:09:41 +0000 (15:09 -0500)]
quizzes/git: Add preliminary Git quiz (repository creation)
W. Trevor King [Tue, 5 Feb 2013 20:07:32 +0000 (15:07 -0500)]
Add Question.multiline and associated handling
Some questions can't be answered in a single line without reqiring
more shell knowledge than we need (e.g. `&&`).
W. Trevor King [Tue, 5 Feb 2013 19:39:02 +0000 (14:39 -0500)]
ui.cli: Import `readline` for more comfortable input() editing
W. Trevor King [Tue, 5 Feb 2013 19:37:21 +0000 (14:37 -0500)]
quizzes/posix-shell: Add a preliminary POSIX shell language quiz
W. Trevor King [Tue, 5 Feb 2013 19:10:03 +0000 (14:10 -0500)]
quizzes/posix-utilities: Rename from posix-shell.json and flesh out
Added few more questions:
* print the current directory to stdout
* change to your home directory
* change to the parent of your current working directory
* print the contents of README file to the terminal
The renaming is because the tests are testing knowledge of POSIX
utilities, not knowledge of the shell syntax itself.
W. Trevor King [Tue, 5 Feb 2013 19:09:05 +0000 (14:09 -0500)]
question: Normalize tempdir paths in stdout/stderr
Otherwise it's hard to test `pwd`, since tempdir will change between
the expected and user-supplied answer runs.
W. Trevor King [Tue, 5 Feb 2013 18:54:18 +0000 (13:54 -0500)]
question: Add ChoiceQuestion for one-of-several correct answers
W. Trevor King [Tue, 5 Feb 2013 18:51:04 +0000 (13:51 -0500)]
quizzes: Move quizzes into a subdirectory
W. Trevor King [Tue, 5 Feb 2013 18:46:31 +0000 (13:46 -0500)]
Add script invocation to ScriptQuestion
We need Python >= 3.3 for the `timeout` argument to
Popen.communicate().
W. Trevor King [Tue, 5 Feb 2013 17:19:18 +0000 (12:19 -0500)]
Remove debugging print(self.stack) from UserInterface.get_question()
W. Trevor King [Tue, 5 Feb 2013 17:18:21 +0000 (12:18 -0500)]
Initial ScriptQuestion framework
W. Trevor King [Tue, 5 Feb 2013 16:52:30 +0000 (11:52 -0500)]
Fix 'hint' -> 'help' typos
W. Trevor King [Tue, 5 Feb 2013 16:39:43 +0000 (11:39 -0500)]
question: Use Question._state_attributes in __init__ and __setstate__
W. Trevor King [Tue, 5 Feb 2013 16:05:15 +0000 (11:05 -0500)]
question: Add Question._state_attributes for easier subclassing
This way subclasses can extend the list instead of overriding
__getstate__.
W. Trevor King [Tue, 5 Feb 2013 15:58:40 +0000 (10:58 -0500)]
Add question class storage (lookups in QUESTION_CLASS)
This allows us to specify questions with alternate processing classes.
As a simple example, I've added NormalizedStringQuestion, which
softens the string comparison used in the basic Question. The next
step is to add a command-line question ;).
W. Trevor King [Tue, 5 Feb 2013 15:45:11 +0000 (10:45 -0500)]
ui.cli: Rework display_result() for multiple answers per question
W. Trevor King [Tue, 5 Feb 2013 15:37:41 +0000 (10:37 -0500)]
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).
W. Trevor King [Tue, 5 Feb 2013 15:27:16 +0000 (10:27 -0500)]
question: Add Question.__str__() and __repr__()
For easily viewing questions in lists.
W. Trevor King [Tue, 5 Feb 2013 15:16:26 +0000 (10:16 -0500)]
Catch EOFError (control-d) in CommandLineInterface input() call
W. Trevor King [Tue, 5 Feb 2013 15:15:16 +0000 (10:15 -0500)]
Add dependency storage (list of question IDs)
W. Trevor King [Tue, 5 Feb 2013 15:08:52 +0000 (10:08 -0500)]
Use question.id instead of question.prompt for answer indexing
This decouples the keying from the prompt, which is useful if you want
to use another value for the `id` (e.g. a question number).
If `id` is not specified, it defaults to `prompt`.
W. Trevor King [Tue, 5 Feb 2013 15:01:49 +0000 (10:01 -0500)]
Add trailing newlines to saved JSON files
W. Trevor King [Tue, 5 Feb 2013 15:01:25 +0000 (10:01 -0500)]
Add a persistent answers database
W. Trevor King [Tue, 5 Feb 2013 14:34:03 +0000 (09:34 -0500)]
Visually separate the results from the questions
W. Trevor King [Tue, 5 Feb 2013 14:29:58 +0000 (09:29 -0500)]
Add .display_results() for showing users their results and scores
W. Trevor King [Tue, 5 Feb 2013 14:19:36 +0000 (09:19 -0500)]
Display results (but not the correct answers)
W. Trevor King [Tue, 5 Feb 2013 14:09:50 +0000 (09:09 -0500)]
Don't crash with IndexError when we run out of questions
W. Trevor King [Tue, 5 Feb 2013 14:07:18 +0000 (09:07 -0500)]
Make get_question() a bit more interesting
W. Trevor King [Tue, 5 Feb 2013 14:06:44 +0000 (09:06 -0500)]
Add a simple command line interface
W. Trevor King [Tue, 5 Feb 2013 13:49:54 +0000 (08:49 -0500)]
Added saving, loading, and a test quiz
W. Trevor King [Mon, 4 Feb 2013 23:05:32 +0000 (18:05 -0500)]
Stubbing out the initial framework