Question Bank looks like a great idea but how you are looking to group them ? I would prefer to be grouped according to chapter and tagged for associated target section. In this way, while reading the chapters from difficulty level 0 to 2 (top-down), the question bank will include the ones which were also targeted to the previous sections and randomizes the questions to test the thorough revision of the chapter.
We should focus on collection of questions first and then we can eventually build up the system later on. We can collect questions in a sophisticated data structure in some kind of database to make this happen. Another task would be adding already deployed quizzes to that database. The database can be made up of JSON, YML or even using online tools like Google Sheets, Google Form etc.
Question Bank is a simple database of questions which is uniquely identified by id
and has attributes question
and options
. question
has the question string and options
is an array which contains series of options for the question.
_data/question_bank.json
>
{
"1": {
"question": "Is `0110103` a binary number ?",
"options": [
{
"name": "No",
"correct": true
},
{
"name": "Yes",
"correct": false
}
]
},
"id": {
"question": "Your Question ?",
"options": [
{
"name": "Answer A",
"correct": true
},
{
"name": "Answer B",
"correct": false
}
]
}
}
In order to map Questions to Docs, we have to maintain a seperate mappings data structure which will be responsible for selecting the questions by their id
s. The Mapping is defined by associating nav_order
of the docs (which is unique w.r.t. parent) to the array of questions id
. This array of questions is the "target" question(s) for the chapter.
_data/question_mappings.json
>
{
"Parent": {
"nav_order_child#1": [ "question_id#1", "question_id#2" ],
"nav_order_child#2": [ "question_id#3", "question_id#4" ]
},
"Binary representation": {
"l0s000": [ "101", "102", "105" ],
"l0s001": [ "106", "109", "202" ]
}
}
Let's say we want to build 5 questions for a specific page. We divide the question type into 2 categories -
- Target Questions : Target Questions are simply the questions intended to test the knowledge of current page.
- Associated Questions : Associated Questions are all the questions which are before the current page (in
nav_order
) and present in the same chapter.
My initial thinking says that to build up 5 questions, we can take 3 random target questions and 2 random associated questions. In a generalized form, I would say 3:2 of Target and Associated Questions.
Special Case: the first page has to have 5 random target questions.
Implementation is simple one as it will be purely based on Liquid.
We have to work on some python scripts to migrate the pop quizes to question_bank JSON. We should also work on automating the creation of new quizzes with proper validation and typo checks through python scripts.