Hello all,
I'm working on a custom activity type, mostly based on this docs page, and this example module (which required s/module/plugin/ in version.php and a couple of extra i18n values to work in 2.7, but otherwise seems ok so far?).
However, neither of these seem to include anything about making the activity gradeable. I looked at mod/assign/ for examples of what to do, and found this line in its mod_form.php:
$this->standard_grading_coursemodule_elements();
Ok, so there's a shortcut function to add the essential form elements. That's good. Looking deeper into the source, though, what it does seems dependent upon the behavior of modname_supports(), which enables an arbitrary set of FEATURE_* values.
Unfortunately, so far I've been unable to find any documentation on these other than a comment next to each one's definition in lib/moodlelib.php, and a few mentions in the developer docs.
It looks like just adding FEATURE_GRADE_HAS_GRADE to my module's _supports() function, incrementing the version and upgrading doesn't cause the appropriate database fields to appear (though it would be pretty awesome if it did!), so I figure there must be a reference somewhere that says for each FEATURE_* value which database fields, methods, etc must be defined for it to work.
...or will I just need to dig through the code to figure this out? For my immediate need, the source of standard_grading_coursemodule_elements() provides some hints, but a more comprehensive reference would be really useful.