If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Implementation of true negative marks in MC-type questions

From MoodleDocs


The purpose of this development project is to implement true negative marks for multiple choice-type questions in quiz. Up to now (1.8+), negative marks for incorrect answers are offered in the configuration options of individual multiple choice questions but are not reflected in the calculation of final quiz scores. Instructors wishing to use negative marking in their quizzes cannot do so or must rely on a potentially harmful hack to achieve the desired result.

Example: An instructor might wish to design a quiz consisting of 20 multiple choice questions with four options each (one correct, three incorrect, only one option selectable). An incorrect response on one question should, for example, lead to the subtraction of one full mark (-100%) from the final score so a student making five correct responses, two nonresponses and 13 incorrect responses should obtain a final raw score of 5x1 + 2x0 + 13x-1 = 5 + 0 -13 = -8 Marks.

Note: True negative marks are conceptually different from penalties applied in adaptive mode. The latter allows a quiz taker to make multiple attempts on the same quiz, obtain feedback and change his/her answers. Penalties are the "price" quiz takers pay for obtaining additional information and changing their responses. Confidence Based Marking (CBM) is a didactically much more refined approach to obtaining valid quiz scores which encourages quiz takers to critically reflect on their abilities. However, CBM is not the object of the present proposal. This simpler form of negative marks is required if we are to reporduce various existing paper-based quizzes in Moodle.

Please make suggestions & comments here:


  • full implementation of true negative marks in multiple choice questions,
  • correct calculation of final quiz scores and scaling to percentages,
  • appropriate representation of the negative marks in the various report formats,
  • clean integration with multiple attempts and at least the option set "each attempt builds on the last" & "highest grade"


This section is work in progress. Developers are cordially invited to make suggestions and bids.

  • separation and mutual exclusion of a "true" or "simple", the adaptive and (potentially)a CBM mode,
  • modification to the table structure to reflect this (input needed)
  • code changes (branching, calculation modes)
  • small changes to UI and documentation - Quiz Settings (addition of a quiz marking mode selector "simple/true"; "adaptive"; (confidence-based)); greying out of options incompatible with the chosen marking mode, e.g. penalty factors, to avoid confusion.

Terms & Conditions

Limited funding is available to support the project. The exact status of the solutions (core, patch/hack, add-on) is immaterial as long as it is GPLd, designed for 1.9 and back-portable to 1.8+

I am very much looking forward to estimates of the workload and bids.