Posts made by Tim Hunt

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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:

  1. 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.

  2. 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.

  3. 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:

  1. At the top of the review attempt page:

    We will add rows to this table for any sectional scores, before the overall total.

  2. 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.

  3. 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.)

Average of ratings: Useful (9)
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you are able to look at the data directly in the database (which requires 2 things - access permissions to the server, and enough knowledge of Moodle's DB schema) then you might be able to pin down the problem data and amend it.

E.g. if the problem is indeed a question_category where the contextid refers to a contex id that is not in the context table, then it is reasonably safe to change that id to piont to a context that does exist - especially if you can work out an apporopriate one like the course those quetiosns are used in.
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The other option is:

  1. In the question bank, choose Edit -> History for the question.
  2. Select all the verstions that you don't want. (The checkbox in the header row does select all. The usage column lets you see which versions are not used.)
  3. At the bottom, do With selected -> Delete.

(Note, if you accidentally select a version that is used somewhere. Moodle won't acutally delete it, it will just set it's status to Hidden.)


But yes, someone should code the scheduled task everyone wants. I am busy with other things (that lots of people, or at least the people who pay my wages, want) so would be better not to wait for me to get to it.
Average of ratings: Useful (5)