Hi,

Is it possible to have some way to tell the Quiz module how many userpoints should be given for each question?

I have 2 scenario's:
1. A 1 question quiz that when answered correctly, xxx points will be earned.
2. A series of questions where you can get variable userpoints e.g.
Q1: 10 userpoints
Q2: 150 userpoints
etc ...

For scenario 2 maybe add a php field to each question where you can type your own points-calculation for this question.

Thanks in advance
FF

Comments

Sivaji_Ganesh_Jojodae’s picture

Category: feature » support

Is it possible to have some way to tell the Quiz module how many userpoints should be given for each question?

Yes. In "manage question" tab set max score to desired value. If the question is answered correctly the respective point will be added to userpoints at the end of the quiz. Hope this will help.

FreeFox’s picture

Thanks very much for the quick answer. This is what I was searching for, except ... the max points there is 99.
Any idea where I can raise the max score?

Thanks in advance
FF

Sivaji_Ganesh_Jojodae’s picture

I can't imagine a question with max score > 99.

Anyways here the fix. In quiz.admin.inc around line no. 850 change to '#maxlength' => 3,

      $form[$fieldset]['max_scores'][$id] = array(
        '#type' => 'textfield',
        '#size' => 2,
        '#maxlength' => 2,
        '#default_value' => isset($question->max_score) ? $question->max_score : 0,
      );
FreeFox’s picture

Thanks again for you quick answer ;)

The reason why > 99 = that the site is working with userpoints and when answered the question correctly you get 500 points extra, can be even > 10.000 ;)

I'll change the code accordingly and keep this alive as feature request.

Thanks
FF

FEATURE REQUEST
------------------
Please provide a field in the quiz settings where you can enter the maximum points.

Thanks in advance

FreeFox’s picture

Category: support » feature

Change category

djdevin’s picture

Component: Code - Quiz module » Code - Quiz core
Issue summary: View changes
Status: Active » Closed (outdated)

This issue is being closed because it is filed against a version that is no longer supported.