Skip to content

Instantly share code, notes, and snippets.

@manjotsidhu
Last active March 11, 2021 12:00
Show Gist options
  • Save manjotsidhu/7eda495d8e805e2ff6b3f0b61fde64e2 to your computer and use it in GitHub Desktop.
Save manjotsidhu/7eda495d8e805e2ff6b3f0b61fde64e2 to your computer and use it in GitHub Desktop.
CV Question Bank System Ideas

Discussion Snippets

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

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
      }
    ]
  }
}

Docs-Question Mappings

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 ids. 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" ]
  }
}

Mixing Questions

Let's say we want to build 5 questions for a specific page. We divide the question type into 2 categories -

  1. Target Questions : Target Questions are simply the questions intended to test the knowledge of current page.
  2. 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

Implementation is simple one as it will be purely based on Liquid.

Migration

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment