Overview & Requirements
The client came to us with a detailed product idea and wanted us to develop a solution for them, both functionally and a very lucrative design which should be simple, dark and engaging. Also an advanced quiz and test handling mechanism was to be developed to be able to give the site administrator full control over the tests, question composition, category and difficulty level compositions.
Questions should have a category (again admin managed), a difficulty quotient (easy, moderate, hard, difficult). Questions can be of different types - like True/False, Image/Video questions, Multi-choice, option mapping etc. Each question was supposed to have different marks for the correct answers and an optional negative marking for wrong answers.
Each Question, as mentioned above were supposed to be mapped to categories. Also, as mentioned above each question had a difficulty quotient. Now difficulty quotient calculation was of two modes - static & dynamic. The static mode was where an admin explicitly selected a difficulty quotient. As the test progresses and a substantial number of users have taken the test, the admin should have an option to select a category and mark questions for dynamic difficulty quotient calculation. Once they flipped a option switch, a dynamic difficulty level was calculated for each questions in each category based on correct response to the number of appearance ratio and all questions from that category were awarded a dynamic difficulty quotient.
Quiz roll out mechanism needed to be incorporated. Admin could create and roll out quizzes as and when required. Each quiz could be of different types - static questions, where admin picked the questions manually from the question bank, and dynamic questions where questions were assigned to a quiz based on a pattern. For this admin needed to mention the number of categories and number of questions from each category. here there will be a shuffling of difficulty. A dynamic calculation mechanism will allow the quiz to be having varied difficulty level sections for different quizzes. So two users taking a quiz can get a difficult section A and other can get a relatively easy section B, but that will be then compensated by aa easy section B for first user and a difficult section B for second user. SO in other words, users might get sections of varied difficulty but overall difficulty of the test remains constant.
Another important part was the statistics part. There was a leaderboard section where an user taking the test can see his ranking. Also, he sees about 15 graphs measuring his score against his peers across different age groups, job roles, educational qualifications and demographics. All test takers fills out the informations related to age groups, job roles etc while they register and then information is used at the end of the test to roll out the statistics.
Also the client required different admin graphs, like questions appearance per category for automated test creation, total tests taken, total number users started the test but not completed it etc. Also, each registered user can access various graphs that would show comparison of their performance across various factors. There graphs are for general test performance, as well as their performance per test.
For a basic architecture of questions and quizzes we used the awesome quiz module in drupal. It provided us a base for the basic quiz configuration as well as different types of questions the client required. Then we used the extensive custom code and API usage to build features on top of that and enhance and extend the features. A quiz add on module was written to provide the difficulty level maintenance for automatic question assignment. Also modules were written down to calculate automatic difficulty quotient assignment and flipping between automatic and manual difficulty assignments per category questions. Then there was a separate custom module written down for comparison graphs employing highcharts API. Also, there was a separate admin section implemented where admin could test the site and the quizzes in the live environment without affecting actual site results. Also, admin could clear the test data at will. Also a very clean looking theme was designed and implemented which makes the site very interesting and fun to use.
There were a lot of challenges we faced with this project. The basis of this project was laid out by quiz module, which has already done a good job and the module is very flexible as well. The most of the requirements of this project, needed us to extend that to a very large extent, in order to provide the necessary complex functionality that client wanted. For example, they needed that each test will have a certain category and difficulty level composition of questions. So each test will have 25% each from 4 categories, but then all the questions will have a 25% each from each difficulty level. The difficulty level might vary from level to level, but the overall difficulty composition must be same. So some might have a tough Category A, and other might have a tough category B, but overall test difficulty feel shall remain same. This is just one instance, and there were numerous such requirements which made the project very challenging. Another challenging feature was the comparison graphs. This site compares a staggering amount of data, and there are around 62 comparison graphs in this. We implemented the awesome high charts API for this, but this required a lot of research and computation and some advanced MySQL query on our part for getting the data ready to be fed to high charts. Also, the high charts API was used extensively to change the look and feel of those graphs.
The client who initially did not have much idea regarding the drupal backend, found it extremely easy to manage. They were very happy to see the complete control they had over the questions and quiz management. Also the little admin testing mechanism we provided also proved to be very helpful to undertake various tests and make sure that the quizzes work as expected.
Lines of code
Members in the Team