Closed (duplicate)
Project:
Quiz
Version:
6.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
24 Jul 2008 at 09:05 UTC
Updated:
29 May 2012 at 04:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
westwesterson commentedthis functionality does not exist. however i would commit a submitted patch which provides this functionality without breaking current function.
Comment #2
marcus_clements commentedI'm looking at the best way to do this.
Questions are nodes and quiz_take_quiz renders the nodes one by one tracking progress with a session variable.
I'm looking at all the questions on one page as being a special case, as is one question per page. Maybe the admin should have a "Number of questions per page" select which defaults to 1 and offers 1,2,3,4,5,6,7,8,ALL (for example).
We split the form rendering in the question module so that it renders the form contents separately and from the form wrapper and submit. Each question element id should be prefixed by the question id.
The quiz iterates through the questions up to the set number per page and builds the form by calling each question nodes form contents function.
Question nodes would still be able to render their own form as standalone questions...
Any thoughts?
Comment #3
westwesterson commentedthoughts as follows:
1. I'm hoping by question.module you meant quiz.module. multichoice.module would not be an appropriate place to render multiple questions.
2. my preferred way to handle the number of questions per page would be to not have a fixed selection for the number of questions per page. Instead it would be called: maximum questions per page or something similar. I think it should be enough to have this as a global quiz variable, i don't see a need to further clutter the already cluttered quiz creation form. If people want to do this per quiz a contrib. module would probably suffice
3. the rest of your proposal sounds good enough.
Comment #4
marcus_clements commentedNo I like your system of questions as nodes and invoking module methods render each question. I only suggested altering multichoice.module because it renders questions as a whole form. By providing a function which just renders the question markup (select, text box, whatever) the quiz module can ask each question node for it's question when rendering a page of questions.
Ideally I'd like to change it to include the nid in the select id so that multiple questions on a page have unique ids.
Otherwise I could call multichoice_render_question and strip off the form tags, and stuff in the node nid to keep the select ids unique but its a bit clunky.
Hmm... OK. So all quizzes have the same max num questions per page and its hard-coded?. So if I set that to 5 and there are 4 questions then it's one page. If I set it to 2 and there are 5 questions then there are three pages? I had started to experiment adding a field in the properties database so it could be a per quiz variable but no worries.
Are you saying I should override in a new module rather than editing the code in yours? Is that practical for functionality like this? I could try that....
Comment #5
westwesterson commented@rayvaugn i just can't think of a good use case for having a different number of questions per page per quiz. If you can provide one, i am easily swayed. I guess I'm trying to avoid features for the sake of features.
Comment #6
marcus_clements commentedSure.
It's a music production course I'm designing, split into topics and units.
I'm planning course units of 3-7 pages of tutorial, linking to a unit test (quiz) of 2-5 questions which maybe text multichoice or questions on provided audio/video samplesand/or images. (How these will be embedded in the quiz is another issue).
Each topic of 2-5 units will also have a longer test over several pages which is a randomised selection of the unit test questions.
In some topics the tests will mostly contain images and samples, so the questions are likely to take up more real-estate on the screen. It would be advantageous if those quizzes with larger questions could set less per page.
Still the crucial thing for me is to be able to show all the questions on one page for a start so I'll keep working on that first.
By the way, have you chosen to store the quiz parameters as individual database fields for performance reasons?
We could use a props array which is serialized before storage which would allow added features without changing the database schema.
If you want to hold back on this stuff for future versions, no probs. I'll keep working on the 2.0 code as a base and if any of my stuff looks useful for v3 of quiz you can commit patches later.
best
Marcus
Comment #7
westwesterson commentedexcellent idea, i'm sold. And the multiple fields in multiple places is for both views support and performance.
Comment #8
Renee S commentedAny luck on implementing this for 6x? From a usability standpoint alone having multiple questions per page makes sense. It's also what a lot of the "quizzy" sites already do, so users know the format and expect it.
Comment #9
Renee S commentedComment #10
Anonymous (not verified) commentedif something like this is to be implimented, it may be possible to borrow some of the code from the FAQ module which permits opening an FAQ in a new page or underneath
You can either display all questions, questions and answers. or open in new page
Comment #11
mbutcher commentedHere's the status on this one:
1. Sivaji's GSoC proposal includes an AJAX version of Quiz that might allow some variant of this (e.g. answer the first question, see the next question below).
2. I have looked at writing an all-in-line version, and while it is possible, it requires deep and invasive surgery into Quiz. What I would like to do in Quiz 4 is do with Quiz what I have just done with Quiz Question: encapsulate the common quiz logic in a library that can then be used by multiple quiz node types.
The upshot of this approach would be that we would have a highly configurable Quiz node type, but without having the tremendously complex administration screen.
However, both 1 & 2 are slated for Quiz 4. Nothing like this will be in Quiz 3.
Comment #12
elijah lynnHi,
So is there a way currently to display multiple questions per page? Sorry if I missed it in the above posts. It appears as if it does not right now but I just wanted to make sure.
Elijah
Comment #13
mbutcher commentedElijahLynn,
No, there is currently no method to display multiple questions per page.
Matt
Comment #14
elijah lynnThanks Matt
Comment #15
sivaji_ganesh_jojodae commentedThis feature has been addressed in my GSoC proposal, it will be ported in quiz-4.x.
Comment #16
elijah lynnAwesome Sivaji!
That is great you got accepted for Google Summer of Code! Quiz module has need some love for a while and it is exciting to see yourself, Matt and the other active developers whipping this Quiz module into shape!
I hear webchick actually started quiz module as a Google Summer of Code project.
Comment #17
sivaji_ganesh_jojodae commentedThanks ElijahLynn,
Comment #18
sivaji_ganesh_jojodae commentedadding "ToDo" tag
Comment #19
finex commentedIs this feature already available in the Alpha version of Quiz 4 ?
Comment #20
404 commentedsubscribe!
Without multiple questions per page, i just can't convince my company to use the quiz module.
Comment #21
Vic96 commentedDoes the quiz module support multiple questions on a page now?
Comment #22
falcon commentedNo. I think it is planned for quiz 5. There are several issues on this already.
Comment #23
linuxeasy commentedI have made changes in the version 3, by which display of multiple questions became possible on the page, and it also accepts the answers correctly too.
I am just testing for bugs and will post them shortly :)
Comment #24
Rob Knight commentedSubscribing
Comment #25
nw commentedSubscribing - this is a very useful feature.
Comment #26
linuxeasy commentedExtremely sorry and apologetic for delay in submitting my code!
I have attached my changes in the module.. and I have tested at my end.
I have made changes to the functions such as quiz_take_quiz() of quiz.module, and quiz.pages.inc
I have tested it on all answer types and it works successfully...
please try it out and let me know if you face any probs...
I have attached the zip file, what simply you can do it.. just replace its files with your existing quiz module files (sorry as for now.. i couldn't get time to follow and override or patch techniques of drupal, may be later). However, changes are made only to quiz.module and quiz.pages.inc files, all other files are unchanged!
these changes are made to quiz 3 module.
After replacing it with existing module files... all the questions in a particular quiz will come all at once!
please let me know further recommendations and your valuable feedbacks...
credits to core quiz module developers for making this module in a way that I didn't got too tedious work to implement this feature!
Comment #27
Deborah Lillis commentedFantastic information and great information. Will be submitting to your RSS feed.
Comment #28
scottrigbyduplicate of #503228: All questions in a single page
Comment #29
lyosef commentedThank you. I am very grateful for your efforts.
Comment #30
nirvanajyothi commentedThumbs up.
Comment #31
jasperlevi commented@linuxeasy
Thanks so much for posting the edited module. It's a big help.
However, it throws up an error every time the quiz is used. Please check the following link:
http://www.samachar4media.com/s4mmediaquiz/