h2. Issue summary.

When calculating quiz score, QuizPagesResponse calls parent method getMaxScore(). In fact, it should always return 0 (consistent with QuizPagesQuestion::getMaximumScore())

h2. Suggested solution

Add QuizPagesResponse::getMaxScore() that will always return 0

CommentFileSizeAuthor
#2 2711647.patch616 bytesvalthebald
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

valthebald created an issue. See original summary.

valthebald’s picture

Status: Active » Needs review
FileSize
616 bytes
djdevin’s picture

Hi,

Does it not return 0 now?

Because the QuizPagesQuestion::getMaximumScore() is 0 it should really not be able to return anything greater than 0 for the response score.

valthebald’s picture

I looks like this case is returning (quiz_question.core.inc, lines 625-628)

      if ($relationships) {
        // This is the weighted max score of the question.
        return reset($relationships)->max_score;
      }

djdevin’s picture

Status: Needs review » Closed (cannot reproduce)

I wasn't able to reproduce this being a problem. Setting up a quiz with quiz pages and questions only took into account the questions, not the pages.

If you can provide steps to reproduce setting up a quiz that exhibits some bad behavior I'll have another look.