With the Open LMS 3.6 release a quiet change was made to the gradebook; I thought it might be nice to go over the change and visit the Natural grading method and talk about how it is useful.

# Grade calculations get ifs

Buried in the footnotes that I am sure you read on a regular basis was a mention of an update to the gradebook's calculated grades feature. It is a request that goes way back to Moodle 1.9 (aka 2009) that has finally added for your enjoyment.

### Calculated grades background

If you weren't aware, in the gradebook you can create a grade item that is based on a calculation of other grade items. With it you could make a category total that is not just the weighted mean of the grades, but a custom weighted total of selected grade items. I know it sounds pretty advanced, and really it kind of is, but it really comes in handy for the specific times that I need it. How about if you need to go beyond the built in min and max functions? For example, you could make a grade item that is the average of the highest score value of 6 pairs of graded items, I'll take the highest score from each week's homework with two assignments per week in a six week course. Well the calculated grade can handle that for me; the grade total would be =average(max([[Item1]],[[Item2]]), max([[Item3]],[[Item4]]), max([[Item5]],[[Item6]]), max([[Item7]],[[Item8]]), max([[Item9]],[[Item10]]), max([[Item11]],[[Item12]]))

### Put an if in there

Well now as of the 3.6 release, you can add an IF statement to the calculation. So if I state in my syllabus that I will add 10 bonus points to the exams total if all the assignments have been turned in(for me this means they've got scores above 0, I'm only dishing out 0's for not trying), I can do that automatically in the gradebook.

=if(min(Assignment1, Assignment2, Assignment3, Assignment4, Assignment5) >0, sum(Midterm1, Midterm2, Final, 10), sum(Midterm1, Midterm2, Final))

Now I could add in logic to make sure the bonus score does not exceed the maximum total score for the exams, or weight the exams, or take the average of the scores whatever logic needs to be in the calculation can be nested in there. Overall the idea is that the if function works like an if in coding or logic.

if(condition, then this, else the other)

if(condition, calculation1, calculation2)

The if starts with the condition to check. If the condition matches, the middle clause happens for the calculation, if the condition does not match then the third clause is the calculation.

Seems pretty straightforward and lots of potential for fun!

# Natural grading method

Introduced a few years back, the Natural grading aggregation feels like the new kid on the block still. I get questions about it pretty regularly so I thought we could discuss it here. What is natural about it and why would I use it?

The simple version of what is the natural aggregation is that it is the sum of the grade values scaled by their weight. It is a sum with an implied weighting based on the size of the grade item. Five assignments with the same maximum score will all have the same weight, an exam worth double the points will have an effective weight that is double the others. The "natural" bit is that it tries to follow what we naturally mean when we have 5 items in a gradebook with the same total points; they get the same weight. They have the same impact on the final grade because they are worth the same amount.

### How does it work?

Natural aggregation functions as a sum of grades when the weight boxes are left alone. In this situation, the numbers in the weight boxes are just informational and show the effective weights in the sum. Natural aggregation assumes that all of the points will total up to 100% and automatically weights everything based on their contribution to that amount. Here it automatically suggests or shows weights for the assignments based their relative maximum scores. This first one is out of 100 points, that other assignment is out of 40 points so it is 40% of the weight of the first and so on.

In my course set up, I weight my assignments, participation, and tests grades to be specific amounts of the final grade. Now pen and paper me used to put in the effort before the term to make sure that my number of assignments and their point totals got me to the right total number for the assignments grades part of the course grade. Here in my online course I can do the same thing, but what if I didn't? What if my assignments totalled up to 400 points and the course was 900 points but I wanted the assignments to be worth 25% of the total score, not 44.4? The natural method can support this easily. When I look at the category grade settings, I can just click on the checkbox to override the grade weight for the category. The value there is created by a calculation based on the total points (not including extra credit) in the category compared to the total number of points available in the course. If I override the weight, I can set the assignments to be worth 25% and the participation to be worth 50%. The aggregation will automatically assign the remaining third category of grades to be worth the remaining 25% of the weighting in order to keep the total to 100.

### Where credit is due

If you are looking at that Assignment category layout in the screenshot above, you might have picked out that the total in the weights seems off; the weighting adds up to 110. What happened there? Has the natural method let me down? Don't worry, one of the assignments that is worth 10 in the weighting is also marked as extra credit.

This item does not actually add to the total available points, but just adds it's value to the student's score in this section. It's weight indicator shows how much potential it has to lift grades in the Assignment category that I have set up. Students who complete this with a perfect score have a potential to move their grade in the assignments by 10%, more generous than I normally am.

### So why use the natural aggregation?

It is not a radical departure from the other methods, and that is a good thing. However in my mind it offers one clear advantage. If I add a collection of activities to my course worth the points that I have given each one and do nothing else, the natural method will gather them up and create a total that acts more or less exactly how I would expect it to handle the scores without me doing anything else.I can see the implied weighting and make changes as needed, but if I took my pen and paper course layout for grades and translated it directly to an online gradebook, natural would give me exactly the same grade I got by hand.

Natural merges some of the functionality of several of the older grade aggregation methods into one method and adds extra credit support without having to choose a special version of a method. Rather than use sum of grades and then switch to weighted means to get custom weights and then make sure that the weights add up to the right total, I can use natural and have the single aggregation method handle all of that without me needing to keep switching and correcting.