This is something which people have been asking for, on and off, for as long as I can remember. There was one recently and that is one of many. What I am talking about is the ability for a single quiz to compute multiple total scores, for example a total for each section (MDL-74610, also MDL-53639, MDL-61548 and MDL-21977).
I have actually been working on this, on and off, for a while to make sure it was feasible before I promised too much. This is something we want at the Open University, and have for years, but it took a while to get to the top of our priority list. Something I have neglected to do until now is to talk about it here, and discuss how the UI should look. I would like to do that now (better late than never) and see if it is possible to get at least the initial implementation of this into Moodle 4.4.
Scope
The bulk of the new functionality is how the teacher sets this up. Then there are some changes to display the additional scores where necessary.
In order to get something useful finished, my proposal is to initially implement the most minimal version of this feature possible. Then, once that is working, we can make it better, but it is often easier to have that discussion about what else is desirable after there is something concrete to look at. So, for the present, I think the following items should be out-of-scope, but are likely to be added later:
-
Sending additional grades to the gradebook. It is possible for one Moodle activity to send multiple grades (e.g. Workshop does it) but how that works is not well documented, and from discussions I have had, not everyone seems to want it this.
-
Conditional feedback based on section grades, like the ‘Overall feedback’ based on the total attempt score. This is certainly something we are likely to want to add in time, but I think better done as a separate follow-up change.
-
Quiz statistics. For now I won’t change this. Quiz statistics will still be computed based on the overall quiz total. If anyone ever wants something more sophisticated than this, we can discuss it, but I am not currently sure what exactly people would want.
Displaying grades
Let’s deal with the smaller changs first. The places we need to display the additional grades. I am going to show the current UI, and then just describe how I think the new information can be added:
- At the top of the review attempt page:

We will add rows to this table for any sectional scores, before the overall total. - On the quiz front page where it lists all of a student’s previous attempts:

Actually,this UI has just changed (MDL-80880, recent discussion here) so this is now the same as 1 above. - In the quiz reports for teachers:

Here, we will add additional columns, after the overall total, for any sectional scores.
Teacher setup UI
Thinking about how busy the ‘Questions’ page in the quiz already is, I decided that if you want this advanced feature, it would be perfectly reasonable for there to be a separate page to set it up, so we have typical Boost tertiary navigation to get to a new ‘Multiple grade setup’ page. (If anyone can thing of a better name, that would be good. Thanks.)

Selecting that gets you to a page with two sections:

The top half lets you create the score categories you want. The bottom half lets you control, for each question in the quiz, which score category it gets counted in. (You can have questions that are not added to any category).
When you first go to this page before setting anything up, it looks like this:

I am considering adding a ‘Automatically create a grade for each section’ button when nothing has been set up. I am also considering adding a ‘Remove all advanced grade setup’ (with an ‘Are you sure’) when things have been set up.
That is it really. As I say, this is a first implementation of this feature, but one, I think, we can build on in the future. What do you think?
(For technical people, the Database schema changes required to support this are just a new table quiz_grade_items with columns (id, quizid, sortorder, name) and a new quizgradeitemid column in the quiz_slots table.)
