MDL-52064 cbe: Exporters are generic exporters - not for output

Making the persistent_exporter implement templatable, implies that the
exporters are designed for output - but they are not - they are designed
for any data returned through an external function. So lets not make them templatable,
and make the default function name "export".
This commit is contained in:
Damyon Wiese
2016-04-18 10:58:41 +08:00
committed by Frederic Massart
parent a214d35ec2
commit 5db5c22c15
14 changed files with 40 additions and 41 deletions
@@ -104,7 +104,7 @@ class course_competencies_page implements renderable, templatable {
$context = $contextcache[$competency->get_competencyframeworkid()];
$exporter = new competency_exporter($competency, array('context' => $context));
$record = $exporter->export_for_template($output);
$record = $exporter->export($output);
array_push($data->competencies, $record);
}
$data->canmanagecompetencyframeworks = $this->canmanagecompetencyframeworks;