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 details)
Built Distribution
File details
Details for the file noodle_quiz-0.1.3.tar.gz
.
File metadata
- Download URL: noodle_quiz-0.1.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 448e2970b5dbba19c04fd992bf0136c37b3ad35940052396a8f490288dc8636e |
|
MD5 | cb60cd38f11e81323030d1a16257d765 |
|
BLAKE2b-256 | 8677accd86c3a60a3346480e6bf0c99e15628fccc6d383a03895e9230476ca2a |
File details
Details for the file noodle_quiz-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: noodle_quiz-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f954494f3ba2af884e31db4f426e524b1b2eb10bae5997398103e28d0f2176d4 |
|
MD5 | b2a1bec06a4bb7b49b1f7f33d1727bc5 |
|
BLAKE2b-256 | a50e9fc8f3baef4c965a2ea2a36920773c0ccbea8d180091c8ec58a8051e941e |