Completion indication

Re: Completion indication

by Richard Vialls -
Number of replies: 1
I think I've cracked this. In case anyone else has the same problem, here's the solution:

You need a function _get_coursemodule_info($coursemodule) in lib.php at the top level of the plugin.
This needs to contain something along the lines:

$info = new cached_cm_info();
$info->name = $->name;

if ($coursemodule->completion == COMPLETION_TRACKING_AUTOMATIC) {
$info->customdata['customcompletionrules']['completionsubmit'] = $->completionsubmit;
}
return $info;
Average of ratings: Useful (1)
In reply to Richard Vialls

Re: Completion indication

by Sergio Comerón -
Picture of Core developers Picture of Plugin developers
Oh! Thank you very much, I had been with this issue for several days without succeeding. Damn function! I think the documentation should state it.