Hi!

I have a quiz with several scale quetions. Checking the quiz result i find for each question the same chart result. I suppose they mean the overall result. What sould I change to get the separate result for each question?

Comments

pedropablo’s picture

Find the same problem. You can solve it modifying the code at quiz_reports/question_types/scale_report/scale_report.module file

In function scale_report_get_statistics, substitte this:

   $sql .= "FROM 
             {quiz_scale_user_answers} answers
           INNER JOIN
             {quiz_node_results} results USING(result_id)
           WHERE
             results.vid = %d";
    $result = db_fetch_array(db_query($sql, $vid));

With this

  $sql .= "FROM 
             {quiz_scale_user_answers} answers
           INNER JOIN
             {quiz_node_results} results USING(result_id)
           WHERE
             results.vid = %d and answers.question_vid = %d";
  $result = db_fetch_array(db_query($sql, $vid,$question->question_vid));

Note that the original query simply aggregates all scale questions in the quiz, while the modified query also add the specific question we are creating the report for

BTW; cute module, but seems a bit abandoned... :-(

kovacsaba’s picture

Thank you very much!

I will try it.

kovacsaba’s picture

Status: Active » Closed (fixed)