Our gradebook has different units with differing numbers of Pass, Merit, and Distinction criteria. Each criteria is given a grade item and assigned a scale with 3 achieved codes and 5 non-achieved codes. I have been looking for a way of getting Moodle to calculate the end grade for each unit. The problem was that BTEC requires every pass criteria to be achieved for a pass to be awarded, no matter if all the merit and distinction criteria were met.
To get around this, Distinction criteria were given a weighting of 1. Merit and Pass criteria were then given suitable weightings so that achieving all Distinction criteria were not worth a Merit, and achieving all Distinction and Merit criteria was not worth a Pass criteria.
i.e.
Unit has 8 Pass, 3 Merit, and 2 Distinction criteria.
The distinction criteria are given a weighting of 1. (You do not need to use the weighting options in the gradebook. They do not work with Grade Items anyway. We will give weightings in a customised grade calculation)
Since there are 2 Distinction criteria, each Merit needs to be worth 3.
3 Merits, each worth 3 gives 9 in total. Add the 2 Distinctions and a Pass should be worth at least 12.
The next problem was not having a Boolean scale (achieved/fail). To get around this I took the log of the grade (by assigning a IDnumber and multiplied by a suitable number (for 8 grades by 0.26).
i.e. 0.26*log(P1+1)
The +1 in the calculation is needed to avoid an error with log(0).
All the achieved grades come out above 0.5, and non-achieved below. I then used the round function to transform them into Boolean 1s or 0s.
i.e. round(0.26*log(P1+1)
All the achieved grades are now worth 1, and non-achieved worth 0. They each get multiplied by the weighting of each level of criteria:
=(16*(round((0.26*log(1P1+1)))+round((0.26*log(1P2+1)))+round((0.26*log(1P3+1)))+round((0.26*log(1P4+1)))+round((0.26*log(1P5+1)))+round((0.26*log(1P6+1)))+round((0.26*log(1P7+1)))+round((0.26*log(1P8+1)))))+(3*(round((0.26*log(1M1+1)))+round((0.26*log(1M2+1)))+round((0.26*log(1M3+1)))))+round((0.26*log(1D1+1)))+round((0.26*log(1D2+1)))
Since I have six units, I needed to adjust the weightings to make sure to achieve a PASS overall I could utilise the letter scales with fixed percentages.
Since I have 8 Pass criteria, each worth 12, that is 96 total. 3 Merit at 3 each is worth 9. 2 Distinctions worth 2. 107 in total.
To get a pass in total you have to score 96/107 = 89.7%. Since most of my other units returned a percentage of 92%, I increased the weighting to 16 (as you can see above in the formula) so that every unit returned PASS at 92%, MERIT at 98%, and DISTINCTION at 100%.
I probably haven't explained everything in full detail, but I know there are people out there who would like to solve this issue.
If you would like to know how to get it to work for you, drop me a message.