Welcome to PyMoxQuizz’s documentation!¶
Contents:
A MozQuizz question library for Python. See http://moxquizz.de/ for the original implementation in TCL.
-
class
moxquizz.quiz.
Question
(attributes_dict)¶ Represents one MoxQuizz question.
-
LEVELS
= (1, 2, 3, 4, 5)¶ The available
level
difficulty values,TRIVIAL
,EASY
,NORMAL
,HARD
andEXTREME
.
-
answer
= None¶ The answer. Arbitrary text; required. Correct answers can also be covered by the
regexp
property.
The question author. Arbitrary text; optional.
-
category
= None¶ The question category. Arbitrary text; optional.
-
comment
= None¶ A comment. Arbitrary text; optional.
-
level
= None¶ The difficulty level. Value must be from the
LEVELS
tuple. The default value isNORMAL
.
-
parse
(attributes_dict)¶ Populate fields from a dictionary of attributes, usually provided by a
QuestionBank
parse
call.
-
question
= None¶ The question. Arbitrary text; required.
-
regexp
= None¶ A regular expression that will generate correct answers. Optional. See also the
answer
property.
-
score
= 1¶ The points scored for the correct answer. Integer value; default is 1.
-
tip
= []¶ An ordered list of tips (hints) to display to users. Optional.
-
tipcycle
= 0¶ Indicates which tip is to be displayed next, if any.
-
-
class
moxquizz.quiz.
QuestionBank
(filename)¶ Represents a MoxQuizz question bank.
-
KEYS
= (u'Answer', u'Author', u'Category', u'Comment', u'Level', u'Question', u'Regexp', u'Score', u'Tip', u'Tipcycle')¶ The valid attributes available in a MoxQuizz question bank file.
-
LEVEL_VALUES
= {u'normal': 3, u'hard': 4, u'easy': 2, u'baby': 1, u'extreme': 5, u'trivial': 1, u'difficult': 4}¶ Text labels for the
Question.level
difficulty values.
-
filename
= u''¶ The path or filename of the question bank file.
-