There are two Default scoring options on the Question configuration page for Multiple choice questions.

They are:

1. Give minus one point for incorrect answers.

or

2. Give one point for each incorrect option that hasn't been chosen.

I would never use either one of those in the courses I teach.

We really need a third option:

3. Give each incorrect answer a score of 0.

Comments

sandra@digitalworldbiology.com’s picture

The best choice would be to have the option to set the lowest question score at zero. That keeps us from ending up with negative scores for questions.

djdevin’s picture

There's this method called 'MultichoiceQuestion::forgive'

It tries to "fix" your score if chosen/not chosen points. In case this, it's fixing them incorrectly.

I vote that we get rid of it and just obey the point values.

/**
   * Forgive some possible logical flaws in the user input.
   */
  private function forgive() {
    if ($this->node->choice_multi == 1) {
      for ($i = 0; isset($this->node->alternatives[$i]); $i++) {
        $short = &$this->node->alternatives[$i];
        // If the scoring data doesn't make sense, use the data from the "correct" checkbox to set the score data
        if ($short['score_if_chosen'] == $short['score_if_not_chosen'] || !is_numeric($short['score_if_chosen']) || !is_numeric($short['score_if_not_chosen'])) {
          if (!empty($short['correct'])) {
            $short['score_if_chosen'] = 1;
            $short['score_if_not_chosen'] = 0;
          }
          else {
            if (variable_get('multichoice_def_scoring', 0) == 0) {
              $short['score_if_chosen'] = -1;
              $short['score_if_not_chosen'] = 0;
            }
            elseif (variable_get('multichoice_def_scoring', 0) == 1) {
              $short['score_if_chosen'] = 0;
              $short['score_if_not_chosen'] = 1;
            }
          }
        }
      }
    }
    else {
      // For questions with one, and only one, correct answer, there will be no points awarded for alternatives
      // not chosen.
      for ($i = 0; isset($this->node->alternatives[$i]); $i++) {
        $short = &$this->node->alternatives[$i];
        $short['score_if_not_chosen'] = 0;
        if (isset($short['correct']) && $short['correct'] == 1 && !_quiz_is_int($short['score_if_chosen'], 1)) {
          $short['score_if_chosen'] = 1;
        }
      }
    }
  }
djdevin’s picture