The Drupal Quiz Module
Sat, Sep 5, 2009 by Jonathan
My first experience with the Quiz module was amusing, to say the least. A project, which I had just finished, required registered users to be able to take different quizzes and successfully complete them in order to receive a certificate. I turned to the quiz module to avoid any custom coding. Overall, I was able to do what I needed. However, below I have listed three issues I had ran into:
1. No import/export of quizzes.
The quiz module uses nodes to represent each quiz and then associates that quiz to other nodes that are of type “question”. This method works flawlessly through the user interface because the actual quiz node has a page (manage questions) that allows you to filter/search for a question to add to the quiz. This way, a question can appear in multiple quizzes. The problem arose when I had to deploy the project to different locations (server). There was no way to export/import the quizzes that I had already built, short of copying the entire database. To work around this, I wrote updated scripts to do a node_save() of the quiz to create the quiz and then an import function, which would create question nodes from a csv file that contained the question details.
2. Questions all have their own page
The current build (3) of the quiz module does not allow the quiz to have all the questions displayed on the same page. This results in the user needing to answer one question at a time and then clicking a “next” button to proceed with the next question. I was lucky enough to have clients who agreed to this type of functionality. I did not need to do any custom coding, but I think this feature might be a nice addition for future builds.
3. Scoring of multiple choice questions with no correct answer
The module allows you to specify the correct answer for each multiple choice question but there are times when questions/quizzes do not have correct answers (scale of 1 to 5). This proved to be problematic because one of the project requirements was to compare user scores on a scale and since the module only tracked right or wrong answers, the module could not accommodate this requirement out of the box.
To get around this, I had to retrieve the multiple choice questions from the database, assign a value to each option via its delta, and then compare each user result answer to get the score for that question for that user. It was not a very complex query, but custom nonetheless.
Obviously before using the module I read up on its current capabilities and I was happy to see that most, if not all, of these features were being included in the next version of the module. Unfortunately, I’m disappointed at the same time because was hoping to use them for this project. I do not know the specific date set for Quiz 4 completion, and as I write this I believe it is currently in its Alpha build state.
linuxeasy posted on June 25, 2010 5:40 pm
http://drupal.org/node/503228
I have made a customization in the quiz module and posted it in the given link..
with this customization, the display of multiple questions per page becomes possible and working:)
Jonathan posted on September 10, 2009 12:19 am
I think my post failed to give credit where credit was due and I apologize if my wording came off as being critical of the module, its functionality and the work that was put into it. The Quiz module, in its current state does a very good job of doing what it is supposed to do. None of the fixes I posted required me to hack the core quiz module which is a testament to how well built and planned the module actually is.
I felt that most of the questions/issues posted regarding the module were geared more towards what other people need it to do or what would be a more “desired” behavior for it based on specific use cases and my scenario was no different. During the planning phase of my project I researched on different possibilities to achieve the desired outcome and it took a significant amount of google-ing to verify that Quiz 3 could not do certain things, the main goal of my post was simply to clearly outline what was missing and I think I stated that the fixes were in fact on the way, so people should wait, if they can afford/need to, for Quiz 4.
The project was completed earlier this week and in hindsight I do admit that consulting community posts for fixes/patches/ideas might have saved me time and effort, so I credit this to experience. The very nature of Drupal, open-source and community driven, dictates that this should be our first course of action when we encounter a problem.
Matt Butcher (TechnoSophos) posted on September 8, 2009 8:54 pm
btopro: I'd love to see the Rubric module. I'd meant to ask you about Quiz when we were all in Madison.
Ryan: The one-question-at-a-time thing is historically the way most online academic quizzes have worked (viz. the GRE and other CATs). However, we're very likely to change this in Quiz 4, because most of us hate it, too. As part of his GSOC project, sivaji already provided an alternative quiz taking logic. That will likely become the default for 4. In 5, we will likely completely re-factor the gateway logic to de-couple the display logic from the evaluation logic (the main problem with the Quiz architecture right now).
Matt Butcher (TechnoSophos) posted on September 8, 2009 8:50 pm
I'm the current "senior maintainer" of Quiz. There are five of us who actively contribute. I'm sorry if I've missed any of your posts in the issue queue, but I certainly don't recall chatting with you in IRC, or seeing comments in the issue queue. We would have been able to help, had I known about these issues ahead of time.
#1: Regarding imports and exports, there are already numerous tools to do generic content migration within Drupal. In the Quiz module specifically, though, there are both importers and exporters available for questions and quizzes. They are currently under active development, and we certainly would have benefited from your testing, input, and patches.
#2: Many online quiz formats (notably CATs) require the presentation of one question at a time. Thus, that is our default mode. Again, had you gotten in touch with us we would have pointed you to Sivaji's new test-taking workflow that incrementally adds questions to the page. In this workflow, questions are revealed one at a time, but the entire quiz is viewed on one page.
#3: I believe you are trying to use multiple choice questions to mimic scaling questions. There is a scaling question type in Quiz 4 that would have directly met your needs.
Honestly, it disappoints me that you did not choose to interact with our community on your needs (especially given that you saw fit to publish this critique). We work hard to be an open sub-community within Drupal that is responsive to requests, quick to embrace contributions, and generally interested in doing what is best for the community at large.
Obviously, we cannot provide 100% coverage of every user's needs. However, the examples you site above -- the things you have chosen to criticize -- are things that we have already been working to address.
It sounds like you have done a lot of work to customize Quiz for your own client, and I have no doubt that your work would have introduced us to some new use cases. I'd really like you to consider working with us to finish off Quiz 4, which is in its final development cycle.
falcon posted on September 7, 2009 8:14 am
Edit: Corrected the links...
My employer wants to use the quiz module on our e-learning site. Because of this I'm now a co-maintainer on the quiz project.
As being noted in the blog post we are indeed trying to solve a lot of the issues in quiz 4.
The questions will however still be separate nodes, but we will try to make it easier to attach nodes to quizzes. We will also make it easier to know if you are taking a quiz or just viewing a node.
Please contribute your patches and thoughts in the projects issue list so that we can make the quiz module suit more use cases.
dalin posted on September 6, 2009 4:23 am
Commonly in a blog post like this you would post links to the issues, maybe offer a patch or two, and then a follow-up blog post in a couple weeks about how you've managed to improve things.
btopro posted on September 5, 2009 8:56 pm
I had a similar experience with Quiz when I played around with it. We were looking to use it for some of the courses we offer as a style of low-stakes assignment. Not a fan of the question node, bank setup. I recently created a Rubric module though for scoring items and hope to propose the implementation of it within the Quiz module. This could allow for subjective assessment of things like free-response quiz questions or also help to allievate the issue you mentioned with "questions that have no correct answer" like likard scaling (which we use it for currently as the stand alone project).
Good write up though, now I don't have to look into using the project just quite yet and also confirms that an integration might be useful to fill in some gaps :)
Ryan posted on September 5, 2009 1:20 pm
I just implemented this module as well and was totally thrown off by the questions as nodes related to quiz nodes thing. I found it confusing for users to know when they were actually taking a quiz vs. when they were coming back to a quiz in session. I also noticed the same things you did about the nature of display... Gimme a quiz with all 10 questions at once and a simple scorecard when I'm done. : P
In the end, I was able to deploy with this thanks to the hooks for quiz completion, but I still found it a little bit of an odd tool.
Post new comment