Closed (fixed)
Project:
Quiz
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2006 at 16:25 UTC
Updated:
9 Oct 2010 at 11:58 UTC
Jump to comment: Most recent file
Choosing a taxonomy item from the filter dropdown on the "add question" pages does not filter the questions.
Possibly related to this comment:
if ($_POST['op'] == 'Filter question list') {
//BE CAREFUL OF THE $_POST['edit'] ARRAY AS THIS VALUE IS LIABLE TO CHANGE WHEN VOCABS ARE ADDED AND DELETED...IF YOU HAVE MORE THAN ONE VOCAB, MAY GOD HELP YOU!!
$_SESSION['quiz_filter'] = $_POST['edit'][4];
}
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | taxonomy_filter_88674.patch | 6.55 KB | riverfr0zen |
Comments
Comment #1
nicholasthompsonThat comment certainly SOUNDS revelant - and could easily be WHY its not working! Maybe its hardcoded to use Vocab 4?!
I remember I DID get it working - but now its not, even though the terms are listed.
Comment #2
gilcot commentedmaybe some inspiration can be found here http://drupal.org/node/75626
Comment #3
riverfr0zen commentedI have a fix for this - will post a patch some time this weekend.
Comment #4
riverfr0zen commentedI guess last weekend didn't come around till just now :) Well, here it is - let me know what you think.
Comment #5
riverfr0zen commentedOooh .. i see that another change I'd made to prefix constants with 'QUIZ_' snuck in there. Pretty trivial, but let me know if anyones want me to separate.
Comment #6
webchickGlancing through, the only thing that caught my eye was...
This needs to check against t('Filter question list') ... if I translate that string in locale module to "Filter me!" then the button won't work.
Comment #7
webchickIt would also be lovely if we didn't have to do icky stuff like check $_POST directly, but that can be part of 'clean-up' in 5.x-2.x. ;)
+1 on renaming the constants.
Comment #8
riverfr0zen commentedhmm, that had been there before, and i didn't want to stray too far, but you are right. in fact, that entire 'filter' section should probably be it's own form, don't you think?
Comment #9
add1sun commentedJust doing some quick testing and I'm getting an error that borks it when trying to apply the filter in the Manage Questions screen:
Comment #10
add1sun commentedso the foreach:
gives you a var, not an array, so array_merge pukes. So I guess that would be more of an array_push but all in all it seems a bit too complicated to me (but I dunno what I'm talking about anyway so take all of this with a grain of salt.) If all you are doing is adding the $vocabulary var to the $filter_terms array can't you just do
$filter_terms[] = $vocabulary;?Comment #11
riverfr0zen commentedOk, I think I can guess why this is happening - I was testing with multiple vocabularies, one a single select, the other a multi-select - so the code assumes that. You likely were testing with only one vocabulary. The array structure returned by the form is likely different in the two cases, so the code needs to compensate. I'm a little overtasked, but I'll try to get a patch up in a day or so.
Comment #12
kkkkkkkkkkkkkkkkkkkkkkk commentedMy quiz module worked very well until I updated to the recent module. Now the quiz questions are no longer available. There is a complaint about " a script that does not respond."
Would any guru be kind enough to show me how to make quiz questions available. I am using the version 5.2
Thanks
mathsoft
Comment #13
kscheirerWhat version of the quiz module were you using?
I know a while back the taxonomy support was removed, and
now something has been added back, but its not the same.
Comment #14
awong commentedThe HEAD version taxonomy filter function on question page is different now.
Now you can put in the number in "Number questions to randomize:" to say how many random questions are there and select the terms on question page.
it will filter out all the questions by that term.
Comment #15
senpai commentedReverting the changes made to Priority and Version by post #12.
Also, this issue might be fixed by another patch that got committed to HEAD today. Is this one still a problem?
Comment #16
kylebrowning commentedIm not having issues with it
Comment #17
mbutcher commentedReversing version label and closing. No activity for about a year.