number of question field in view shows "0" even if I have questions in the quiz

Comments

mbutcher’s picture

Status: Active » Postponed (maintainer needs more info)

I need more information.

Does this happen with every quiz? Have you tried clearing the cache? What types of questions are you adding?

wallbay1’s picture

I 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

mbutcher’s picture

That 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

sdboyer’s picture

Assigned: Unassigned » sdboyer
Category: support » feature
Status: Postponed (maintainer needs more info) » Fixed

So 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.