Grades don't calculate with subcategories in weighted mode

Grades don't calculate with subcategories in weighted mode

by Padraic McMickle -
Number of replies: 3

Hi All,

this is my first time posting, so I hope I don't breach protocol, apologies in advance if I do.

I have recently come across a problem in moodle when calculating grades using weighted mean of grades. We are currently using moodle 2.9. In our previous version (2.6) we used the same method for grades and the calculations came out OK. I think we have the problem "solved" but we don't know where to go to enable the solution inside the code or database (likely some sort of setting that was missed). So, on with the problem:

When calculating the weighted average, moodle will weight the grades in a category properly. When it goes to the course grade, it looks back at the categories and sees that they have a grade in them. It then assumes that 100% of the grades are in as it only looks at the parent categories, not the subcategories. Doing the math by hand has confirmed that this is the case as I was able to replicate the numbers moodle gets for the grades.

In our old version of moddle (2.6), we had an option to "Aggregate including subcategories", however, in moodle 2.9 we no longer have that option. I am enclosing 2 screen shots, 1 from each, from where I assume the problem lies. These are from the Site Administration -> Grades -> Grade category settings area. If somebody could help explain where I need to enable the setting so they are selectable, I would be very thankful. We are trying to avoid a teacher "tech-heavy" solution as we have several teachers who are petrified by technology. This means no making a "graded" and a "non-graded" folder and working the math out with each grade that is entered.

We tried changing the skins back to the default in case it got hidden but no joy.

Attachment moodle26GoodSettingsA.jpg
Attachment moodle29MissingSettingsA.jpg
In reply to Padraic McMickle

Re: Grades don't calculate with subcategories in weighted mode

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Have you looked at switching to Natural grading?  You can set weights there however you want - the gradebook will still pull Total Grades from Category Totals but you have the option to say how the SubCategories play into the Category totals.

In my mind, that is how it should be...

In reply to Emma Richardson

Re: Grades don't calculate with subcategories in weighted mode

by Padraic McMickle -

Hi Emma,

after reading about natural weights, I am not sure if that will work. However, since you have experience, let me ask you since you seem to have experience with them.

Lets suppose I have 3 categories Group work, Individual Work and Exams. Group work is 10% of the total grade and has 3 items (A is 3% of the total, B is 3% of the total and C is 4% of the total). Individual work has 4 items worth 30% of the course total (A = 7.5%, B = 7.5%, C = 5%, D = 10%; D is a sub-category with 2 items, each worth 5% of the course total). Exams is 60% of the course total with 5 items (A = 5%, B = 5%, C = 5%, Midterm = 15% and Final = 30%). 

In my example, weighted means without categories would work fine in my system, but management has a standard of the categories, so that is not much of an option. Moodle will calculate the weights of each category correctly. But let us pretend that we are missing Individual C and the FInal Exam (total of 35% of the course grade). Moodle with weighted averages as it is set now will calculate as if 100% of the grades are in because each of the 3 categories has a value. It should divide by 65%.

Now, let us look at natural weights and see if my assumption about it is correct after reading the moodle documents on Natural_weighting. First, all items are graded from 0 - 100% (management standard, not flexible). We would still use the same weights listed above as the weight value as that is how much it will contribute to the final grade for the categories. However, if we add in an extra item under Individual as part of D, the number of course points goes up by 100 and this would alter all of the  weights for all items based on the new total points for the course, going from 1300 points to 1400 points. So each of the items would be re-weighted to be "item weight" * 100/1400? So this means that we effectively count up from 0 to 100 and once students hit a specific point value (say 60% for argument sake), they pass the class? I recognise that is how weighted averages work if you don't divide by the sum of weights, however, students don't usually do that many calculations.

We have tried to get away from this because we have noticed that there is significant drop off of student interest after they hit the passing point. Some will literally stop doing any work as they have reached their goal of "passing" a course. This is a bad method given the habits of the students we are facing. 

Please feel free to correct my assumptions if you notice something wrong with them.

In reply to Padraic McMickle

Re: Grades don't calculate with subcategories in weighted mode

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

1.  Natural grading is based on points - points are only limited by your admin settings.  You can have items worth whatever you want.

2.  While, Natural will adjust the weights accordingly, you can override all or any weights along the way. 

3. Natural course totals will be determined in the following way - total points attained divided by total points attempted.  If an item has not been attempted yet, it will not be included in either side of the equation (unless you select that option in your gradebook setup - aggregate only non-empty grades).  This provides the student with a running percentage in the class but does not infer that they have passed or not passed the course.  You could use completion settings for that...If you want a running total, you can have Natural just show points, aggregate the empty grades and then the students will see how far they have to go.  As a student, I always liked being able to slack off at the end of the semester.  I figure if they have worked hard enough to make that many points at the beginning, they should get a break at the end but that does not work if you want them working consistently throughout the course!

The biggest obstacle I see is that you want a subcategory to carry 10% of the total grade instead of the category (that it belongs to) grade which is not really how subcategories are supposed to work.  I suggest making your Subcategory a regular category and that would solve that problem.  To keep management happy, you could have Category C - Exams and Category D - Exams (Final Exams) or something similar using the names of the categories to link them but keeping your math correct.