mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-60631 analytics: Pass evaluation analysables filters as objects
This commit is contained in:
parent
40f1801c4b
commit
8c7db03a56
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user