MDL-48362 enrol_cohort: Correct variable naming for course sync
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 2 Mar 2016 23:55:07 +0000 (07:55 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 2 Mar 2016 23:55:10 +0000 (07:55 +0800)
$course->id => $instance->courseid

enrol/cohort/lib.php

index 93bdf44..179671e 100644 (file)
@@ -155,7 +155,7 @@ class enrol_cohort_plugin extends enrol_plugin {
 
         require_once("$CFG->dirroot/enrol/cohort/locallib.php");
         $trace = new null_progress_trace();
-        enrol_cohort_sync($trace, $course->id);
+        enrol_cohort_sync($trace, $instance->courseid);
         $trace->finished();
 
         return $result;