Noodle-Quiz (Not Moodle Quiz generator) is a set of utilities to generate quizzes for Moodle
Project description
Noodle-Quiz
Noodle-Quiz (Not Moodle Quiz generator) is a set of utilities to generate quizzes for Moodle
Example usage
from noodle_quiz import Quiz
from noodle_quiz.question_types import Description, Numeric, MultipleChoice
from noodle_quiz.answer_types import NumericAnswer, MultipleChoiceAnswer
q = Quiz()
d = Description('Exercice 1', 'Description')
a = NumericAnswer(100, 4)
n = Numeric('Question #1', [a], 'Calculate 2+2')
ans1 = MultipleChoiceAnswer(50, 2)
ans2 = MultipleChoiceAnswer(50, -2)
ans3 = MultipleChoiceAnswer(-100, 4)
qcm = MultipleChoice('QCM1', 'Solve for x: $$x^2 = 4$$', [ans1, ans2, ans3], single_choice=False)
ansX = MultipleChoiceAnswer(100, 42)
ansY = MultipleChoiceAnswer(0, 'Not 42')
qcu = MultipleChoice('QCM2', 'What is the product of 7 by 8 ?', [ansX, ansY])
q.add_questions([d, n, qcm, qcu])
q.save_to_path('test.xml')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
noodle_quiz-0.1.3.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for noodle_quiz-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f954494f3ba2af884e31db4f426e524b1b2eb10bae5997398103e28d0f2176d4 |
|
MD5 | b2a1bec06a4bb7b49b1f7f33d1727bc5 |
|
BLAKE2b-256 | a50e9fc8f3baef4c965a2ea2a36920773c0ccbea8d180091c8ec58a8051e941e |