I have been working on this module for the past few days and have got to a point where I have made a patch of the 1.65 CVS version... This is my first real attempt at patching, so forgive me if I've got it all wrong...
Changes
- Quiz works on the new schema which WebChick set out here
- Added a "quiz admin" section where results can be viewed in a table and individual answers can be seen
- Generally tweaked it all up
There are probably plenty of bugs left in - but this is a preliminary submission. One thing that remains is the scoring - I'm not happy with the way it works, but it does work. It doesn't store the result in the results table, it works it our for each one everytime
I'd also like to implement some taxonomy filters on the admin/quizzes page.
I'd appreciate people's feedback on this.
Comments
Comment #1
robertdouglass commentedGreat work Nic! With this and the gradebook module coming into action, Drupal is going to start making waves in the education scene!
Comment #2
deekayen commentedWith as stale as this module has gotten, are there any objections to just committing this patch and file new bugs from that point, or does anyone want to give this patch a review?
Comment #3
webchickYeah, I think go for it. I browsed through the patch and apart from some minor code style things, nothing stands out to me.
However, the .install file is missing and since the schema was changed, the whole thing will come crashing down without that, methinks.
Thanks very much, Nicholas! If you could just attach your quiz.install file, I think this is probably good to go.
Comment #4
nicholasthompsonOopsy! Of course! I'll do that first thing tomorrow morning (UK Time). Just out of interest, what were the coding style issues? I read through the docs and tried to standardise it where I thought was necessary. I'd appreciate knowing where I went "wrong".
Once this is submitted, I have some more work scheduled to do to this over the coming week. This includes the ability for a user to review all their results and a few other extra's.
Comment #5
deekayen commentedI agree it's not anything big, but I can always be picky without even having run it :)
I ordered them in my opinion of significance:
while(list($key, $value) = each($var))is way faster and less memory intensive because foreach makes a copy of the array before it cycles where each just moves the pointerexplode("-", substr(could beexplode('-', substr(Comment #6
nicholasthompsonI've applied the suggestions you made - thanks for taking the time to do that. The foreach/while thing is unbelievable. I seriously think that might be why the Cateogies module is so damn slow... I attach a file containing a new patch (based on the 10.05.06 CVS version
Thanks again - I attach the new file.
Comment #7
webchickExcellent, thanks! I've had a chance to test this, and have some additional feedback... most of this is minor, except the last point... any chance you could take another look?
(there's a db_queryd stuck in the patch somewhere)
Comment #8
nicholasthompsonThanks Webchick - most of those are on my to do list for the next week.
The reason I submitted the patch "early" was so the public version could at least be semi-working. There is still, as you've pointed out, PLENTY to do. I have many plans for this module :-)
Comment #9
webchickNo, that's cool. I'm all about incremental patches. :) However, I can't get your version of quiz module to actually work (same problem as the current one; can't take quizzes). Can someone else test this patch and let me know if I'm just on crack, or if it's a PHP 5 thing, or..?
Comment #10
nicholasthompsonMy dev server is PHP4.0 (I think), so unless they've decided to depreciate something usefull - it shouldn't be that.
Its more than possible I've made a booboo making the patch - not particularly experienced at this side of Drupalling yet ;-)
What exactly are the problems you're experiencing?
Currently you can take tests but when it finishes you just get your overall score.
When I get a minute I'll try to download a clean Quiz install and apply the patch myself (while keeping a backup of my current version!)
Comment #11
webchickI created two multichoice questions, then a quiz with 2 questions, then clicked the "take quiz" tab, I just get "Your score: 0", no question actually there for me to click.
Comment #12
nicholasthompsonNow THATS interesting! Were the questions set to Always? Was the quiz within the date range you set for it?
Comment #13
webchickHaha, d'oh. Goes to show how long it's been since I last looked at this. ;) Yes, I forgot to add questions to the quiz. That'll do it. ;)
Marking RTBC. I've added you under the CVS access tab for the Quiz project, so please feel free to commit this. Great work!
Comment #14
webchickHey, Nicholas!
Just checking up, as I noticed this wasn't committed yet. Are the CVS permissions working ok? If you don't have time or whatever and would prefer myself or one of the other maintainers to commit this for you, then let me know and we can do that. :) I was just wanting to give you "credit" for the commit (it would show up under your user account as a contribution), since you did all this work. :)
Comment #15
nicholasthompsonSorry about the delay - I'll try to get it done today. I've had a really busy few days recently.
Comment #16
webchickHey no problem at all. It's been broken for a few months now, a few more days won't hurt. ;)
Comment #17
seanbfuller commentedHere's a quick updated version of this patch that fixes a few issues:
Hopefully that will help get these changes pushed to cvs. If you have another version that is further along, please pardon the post.
Comment #18
nicholasthompsonThats fantastic - I'll be trying this VERY soon indeed! I (well actually, my colleague who is going to be picking this up from me) will be looking to submit this to CVS VERY soon. We need this finished and tested for our own product before october.
Unfortunately, until now I've been swallowed up with a project which kept getting bigger (moving a site (http://www.sportbusiness.com) into Drupal).
Comment #19
webchickOk, seeing as:
1. It's been way long enough that this has been sitting in the queue. :)
2. Sean is starting to create additional patches and needs something stable to work from
3. Nicholas has informed me that he's no longer working on this
I committed this patch to the module. Thanks a lot for your help, guys!
Comment #20
(not verified) commented