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

This commit is contained in:
Andrew Nicols
2017-10-31 12:08:01 +08:00
2 changed files with 9 additions and 1 deletions
@@ -44,7 +44,11 @@ abstract class by_course extends base {
// Default to all system courses.
if (!empty($this->options['filter'])) {
$courses = $this->options['filter'];
$courses = array();
foreach ($this->options['filter'] as $courseid) {
$courses[$courseid] = new \stdClass();
$courses[$courseid]->id = $courseid;
}
} else {
// Iterate through all potentially valid courses.
$courses = get_courses('all', 'c.sortorder ASC', 'c.id');
@@ -197,6 +197,10 @@ abstract class base {
$dataset = $this->calculate_indicators($sampleids, $samplesorigin, $indicators, $ranges);
if (empty($dataset)) {
return false;
}
// Now that we have the indicators in place we can add the time range indicators (and target if provided) to each of them.
$this->fill_dataset($dataset, $calculatedtarget);