Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Not sure if this is a issue related to the new quiz or to the "pages" functionality. But when I try to insert a page and then indent questions under it (to create a quiz on a page), I get an error saying that qnr_id and qnr_pid must be 4 characters and they are 5. I've looked for this definition in the code, but I can't find it (nor do I probably have enough experience to do so).
Any thoughts? Thanks!
-tiffani
Comment | File | Size | Author |
---|---|---|---|
#6 | qnr_id_and_qnr_pid_have-2408959-6.patch | 796 bytes | djdevin |
#5 | qnr-ids-values.jpg | 64.91 KB | Sherif Darwish |
#5 | qnr_ids.jpg | 62.83 KB | Sherif Darwish |
quizissue-qnr.gif | 65.49 KB | edboost |
Comments
Comment #1
edboost CreditAttribution: edboost commentedActually, searched some more and found the max values in quiz.admin.inc and raised to 5.
Process goes through now.
Have not gotten the page to work, but at least it's not erroring out.
Sorry to post prematurely. But, if anyone thinks my hack might be preventing the single page from working, please chime in!
Thanks!
Comment #2
edboost CreditAttribution: edboost commentedNevermind -- it works!
But please do chime in if you think my hack broke something I can't see.
And, it might be worth upping that value if I'm not the only one with really long ids.
Comment #3
djdevinDo you have more than 9,999 questions?
I'll see if there's a better way to do this.
Comment #4
edboost CreditAttribution: edboost commentedNo, I only have about 2500 questions. But... there are LOTS of revisions of each question and I feel like that might be boosting the numbers. Is that possible?
Changing the max values does seem to be working, even if it's not an elegant fix.
Quizzes, are, intermittently (or does it vary by quiz I can't figure it out!) not scoring properly (sometimes they don't assess answers at all... sometimes some questions assess and others don't). Don't think it's related to my hack, but haven't tracked it down well enough yet.
Back to the issue cue for me!
Thanks for looking into it.
Comment #5
Sherif Darwish CreditAttribution: Sherif Darwish commentedHi,
i am also getting the same error message "qnr_ids cannot be longer than 4 characters but is currently 5 characters long." when i try to manage questions assigned to quiz from node/[nid]/quiz/questions , every time i try to save i receive this error
i went through the form validate handler and i can see the field qnr_id defined as below have a maximum length as 4 characters and this is why i am receiving the error, i am not sure however why it have this maximum as the database column is int(10)
I updated the maximum length #maxlength to 6 and it worked with me but not sure if this can have an impact somewhere else
by the way, i only have around 300 questions but it seems the number is getting higher because of the revisions
Comment #6
djdevinThere's no reason to have #maxlength here, so let's remove it.
@edboost haven't been able to reproduce Quizzes not scoring...but if you do figure out please open a new issue.
Comment #7
djdevinFixed!