I tried to improve this page providing explanations of the examples, generalize the content, correct some minor errors.
As of october 2018 there is no more 'Categories and items' to click in Grades. Also, the image https://docs.moodle.org/39/en/images_en/6/68/neweditcalculation.png is outdated. Probably https://docs.moodle.org/39/en/Grade_calculations#Setting_a_grade_calculation should be rewritten.
I wanted to add the exactly same comment. Click the 'Categories and items' is not even a proper phrase IMHO.
I have discovered through trial and error that if the condition in a grade calculation includes an equals sign / comparison operator, it must be double.
Furthermore, functions can be written in uppercase or lowercase letters.
I've seen on the document attached to MDL-64414 that these are the supported comparison operators : • greater, using (>) character • greater or equal, usign (>=) characters • less, using (<) character, • less than, using (<=) characters • equal, using (==) characters
It seems like the idea was to bring that documentation to the wiki but nobody did it.
A month ago I just noted that functionality and added some examples but it makes sense to copy that full document here, doesn't it?
Iñigo, you are right. Will you include the documentation in the page?