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
+2 -2
View File
@@ -93,9 +93,9 @@ class plan_page implements renderable, templatable {
// Prepare the data.
$exporter = new competency_exporter($comp, array('context' => $framework->get_context()));
$competency = $exporter->export_for_template($output);
$competency = $exporter->export($output);
$exporter = new user_competency_exporter($usercomp, array('scale' => $scale));
$competency->usercompetency = $exporter->export_for_template($output);
$competency->usercompetency = $exporter->export($output);
$data->competencies[] = $competency;
}