Non-linear grade calculations in Moodle gradebook

Re: Non-linear grade calculations in Moodle gradebook

by Joost Elshoff -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Testers

Sometimes, it pays to investigate and play to find a solution. The Moodle Docs aren't really clear on how to create this kind of non-linear formulas for grade items, but I found the following:

the proper 'if' formula is constructed this way:

=if(condition, (calculation), else)

For a Quiz that has a maximum of 100 points, with idnumber 'item1' and the conditions that I elaborated above, this becomes:

=if(item1>=70;(((item1-70)*(4,5/(100-70)))+5,5);(((item1)*(4,5/70))+1))

You can replace the tipping value of 70 with whichever value you'd need. ';' and ',' are there because of Dutch langpack, these would need to be replaced with ',' and '.' for English.