Body
When creating a Moodle quiz or test, it is possible to set a value for the total quiz points or maximum grade that differs from the sum of the individual question points. However, doing so will scale each of the individual question's points, and therefore can't be used by itself to set a value lower than the sum of points to allow for extra credit or a situation where students are to only complete 3 of 4 possible questions. In order to achieve this, a setting in the gradebook must be adjusted in order to compensate for the scaling.
Setting up the quiz points
To begin, set up the quiz as normal, assigning each question the actual points you want it to have, including any extra credit questions (for variable points possible for an extra credit question, enter the maximum points possible). By default, Moodle will sum up the total of all the questions and enter that in the Maximum grade field at the top right of the quiz editing page.
Once your quiz is complete, adjust the Maximum grade to reflect the total points the quiz should have, ie the Total of marks minus the extra credit points or optional question points (in the following example, there are 4 extra credit points possible, so 101 - 4 = 97.) and save the quiz.
Rescaling individual point values
At this point, the quiz is set to scale each of the individual questions by the ratio of Maximum grade/Total of marks, (here 97/101 or 0.96). In order to maintain the desired Maximum grade (97), but keep each question point total as defined, it is necessary to scale each question back up. To do so, go to the gradebook setup (from the side menu Grades and then select the Setup tab), and select the Edit link to the right of the quiz and click on Edit settings from the drop-down menu.
From the Edit grade item page, click on the Show more... link to expand the Grade item section.
In the expanded Grade item section, there is a Multiplicator field, which serves to scale, or multiply, each grade item by a set factor. In this field, you will enter the inverse of the amount that the quiz is being scaled down because of the total of the Maximum grade being smaller than the Total of marks. So you must create the following ratio: Total of marks/Maximum grade. In the example case, this would be 101/97 , or 1.0412. With this number in the Multiplicator field, each question value will be multiplied up back to the original value, but the maximum points will remain as set in the quiz settings, in the case of extra credit, this allows for more total points available than the Maximum grade, and in the case of optional questions, it does not penalize students for not completing all the questions. Save these settings and you are done! The correct grade will now appear in the gradebook. See below for important notes about how the grades and points are reported to students and instructors.
Important notes about viewing totals
It is important to note that the scaling down and scaling up necessary to make the optional questions/extra credit points work correctly will result in the correct percentage or score to be reported in the gradebook for both students and teachers. However, the display of scores that students see when returning to the quiz, or that teachers see when selecting View attempts from the quiz page will not show the correct values. A teacher will see scaled down values for each of the questions (along with a green check for correct, and a red X for incorrect/partially correct answers), as well as for the total which is displayed in the column Grade/Maximum grade (in the above example Grade/97.00). These numbers should be ignored, as they do not reflect the actual/recalculated points.
Students will see two different scores. The first is the total rescaled points (ie. actual points as entered in the quiz settings) out of the Total of marks (unscaled). In our example, this is the total possible out of 101. The second score is the scaled grade out of the Maximum grade possible, here the scaled total out of 97. There is also a report of the "final grade" reflecting the amounts in the second score. It will be important to inform students that they need to refer to the gradebook score, OR take their grade as the Marks reported divided not by the total marks possible, but by the Maximum grade shown above the second column.