Hello
im not sure if it is an issue or something that i missed.
For personality tests i dont want the user to see the solution of the questions since these are personality tests. So in a personality test i have the display solution box unchecked and when the quiz is finished he can see only the result but not the questions and the solutions as i want. But when the user goes to see his quiz results and views a personality test he did in the past he can see the questions and the solutions. If it is something that i missed please share.
Thank you

Comments

moraleslevi’s picture

I am also experiencing this issue. Even with "Display Solution" unchecked, users can still see the correct answers to their quiz questions when reviewing their results.

moraleslevi’s picture

It looks like the multichoice type question doesn't check for the $showfeedback property in the getReportFormResponse() function in multichoice.classes.inc. I'm fairly new to drupal so I'm not sure how to fix this in the most appropriate way. I just modified a few lines in the function theme_quiz_user_summary() in quiz.pages.inc. This worked for my purposes but a real fix should probably be applied by someone more well versed in drupal.

function theme_quiz_user_summary($quiz, $questions, $score, $summary) {
  // Set the title here so themers can adjust.
  drupal_set_title(check_plain($quiz->title));
  
  global $user;

  if (!$score['is_evaluated']) {
    $msg = t('Parts of this @quiz have not been evaluated yet. The score below is not final.', array('@quiz' => QUIZ_NAME));
    drupal_set_message($msg, 'status');
  }

  // Display overall result.
  $output = '';
  $output .= '<div id="quiz_score_possible">'. t('You got %num_correct of %question_count possible points.', array('%num_correct' => $score['numeric_score'], '%question_count' => $score['possible_score'])) .'</div>'."\n";
  $output .= '<div id="quiz_score_percent">'. t('Your score was: @score %', array('@score' => $score['percentage_score'])) .'</div>'."\n";
  if (isset($summary['passfail']))
    $output .= '<div id="quiz_summary">'. $summary['passfail'] .'</div>'."\n";
  if (isset($summary['result']))
    $output .= '<div id="quiz_summary">'. $summary['result'] .'</div>'."\n";
  // Get the feedback for all questions.
  //$output .= drupal_get_form('quiz_report_form', $questions, FALSE, TRUE);
  if ($quiz->display_feedback || in_array('administrator', array_values($user->roles)))
  {
    $output .= drupal_get_form('quiz_report_form', $questions);
  }
  return $output;
}
djdevin’s picture

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.