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:
committed by
Frederic Massart
parent
a214d35ec2
commit
5db5c22c15
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user