Merge branch 'MDL-60596_master' of git://github.com/dmonllao/moodle

This commit is contained in:
Damyon Wiese 2017-11-06 10:19:10 +08:00
commit 1ada616c56

View File

@ -69,10 +69,8 @@ class completion_enabled extends \core_analytics\local\indicator\binary {
$course = $this->retrieve('course', $sampleid);
$cm = false;
if ($sampleorigin === 'course_modules') {
$cm = $this->retrieve('course_modules', $sampleid);
}
// It may not be available, but if it is the indicator checks if completion is enabled for the cm.
$cm = $this->retrieve('course_modules', $sampleid);
$completion = new \completion_info($course);