Closed (fixed)
Project:
Quiz
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 May 2009 at 06:19 UTC
Updated:
24 May 2009 at 18:20 UTC
number of question field in view shows "0" even if I have questions in the quiz
Comments
Comment #1
mbutcher commentedI need more information.
Does this happen with every quiz? Have you tried clearing the cache? What types of questions are you adding?
Comment #2
wallbay1 commentedI was adding multiple answer questions.
the field in view is : Configure field Quiz: Number of random questions
but it still display 0 even if i have question on the quiz , even when they are shuffled
Comment #3
mbutcher commentedThat will only display > 0 if there are more than 0 *random* questions.
Unfortunately, the only way to get the number of *questions* on a test is to count the number of questions assigned to the test in quiz_node_relationship where question_status is 1, and then add it to the quiz_node_properties.number_random_questions field for the same quiz.
I'll have to ask sdboyer how to do that in Views. That's out of my skillset.
Matt
Comment #4
sdboyer commentedSo I took a crack on this on Friday, and committed some (cold) code: http://drupal.org/cvs?commit=208896 . There should be a new aggregation field that properly grabs the number of questions, and allows you to either include or exclude questions set to 'random' in that count. If it works, great - if not, change the issue status and lemme know what happens (it could even be a big ugly error), and I'll debug it on my box properly.