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.
I noticed that sometimes when editing an existing quiz, no questions would appear in the "Manage Questions" tab, even though questions were added to the quiz previously, and questions are displayed when viewing the quiz.
For me, the issue was that I had selected "random questions" on the quiz edit edit tab. In the quiz_get_questions function, the question_status value is provided the incorrect question status. It should be QUESTION_RANDOM instead of QUESTION_NEVER.
Patch is attached.
Comment | File | Size | Author |
---|---|---|---|
quiz_manage_questions.patch | 575 bytes | JuliaKoelsch | |
Comments
Comment #1
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented@Spry_Julia, thanks I will check and commit the patch tomorrow. Perhaps #1369386: questions do not appear in quiz take ("no questions found. please assign questions..") is same as this issue.
Comment #2
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedThanks. Patch committed to git 565622e..a49a0e8.
Comment #4
funkeyrandy CreditAttribution: funkeyrandy commentedi still see this issue on latest release 7.x-4.0-alpha4
im not using random anything, just a simple 2 question multiple choice quiz...when i retake the quiz a second time, the questions are gone
Comment #5
Lloyd CreditAttribution: Lloyd commentedThis is still present on the most recent version (7.x-4.0-alpha9). I've created 3 questions - 2 multiple choice and 1 direction. Once added to the quiz, the multiple choice questions no longer appear under Questions in this Quiz, and are not available to add either. The directions question displays properly. However, I can take the quiz and each of the questions (including the multiple choice) are present. So it just appears to be something quite buggy with managing the quiz page.
Comment #6
h.arefmanesh CreditAttribution: h.arefmanesh commentedhello,
this patch does not work for me and still full of error when I click start quiz.
Comment #7
falcon CreditAttribution: falcon commentedSounds strange. Haven't experienced this, but we need to look into it.
Comment #8
bburgI was brought to this issue after seeing https://drupal.org/node/1369386 marked as a duplicate of this one. After creating a quiz and adding questions, I get the message "no questions found. please assign questions..", which seems to be because the question_status value in the quiz_node_relationship table always seems to be set to 0 and I don't see any place to change status other than the standard node publish option. I removed that component of the query, but then I get a redirect loop.
Drupal 7.24
Quiz 7.x-4.0-beta2
Comment #11
ezraw CreditAttribution: ezraw commentedjohnbburg, have you tried this in 7.x-5.x-dev?
Comment #13
zeezhao CreditAttribution: zeezhao commentedStill seeing this error for existing quiz after upgrading from an old 4.x to latest 5.x
edit:
Found it... via .../node/node_ID/quiz/questions
Comment #16
djdevin