Commit 63ccc41f authored by Robert Lyon's avatar Robert Lyon

Bug 1826284: Allow the exporttype to filter down to the block rendering

behatnotneeded

Change-Id: I0e7fc96211c9eda6f9f8bd4e0b0621585efed991
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 177cdb2d
......@@ -71,7 +71,6 @@ class PluginExportHtml extends PluginExport {
public function __construct(User $user, $views, $artefacts, $progresscallback=null) {
global $THEME;
parent::__construct($user, $views, $artefacts, $progresscallback);
$this->rootdir = 'HTML';
$this->exporttype = 'html';
......@@ -497,6 +496,7 @@ class PluginExportHtml extends PluginExport {
$smarty->assign('blocks', $blocks);
$smarty->assign('view', false);
}
$content = $smarty->fetch('export:html:view.tpl');
if (!file_put_contents("$directory/index.html", $content)) {
throw new SystemException("Could not write view page for view $viewid");
......
......@@ -73,6 +73,7 @@ class PluginExportLeap extends PluginExport {
parent::__construct($user, $views, $artefacts, $progresshandler);
$this->smarty = smarty_core();
$this->exporttype = 'leap';
if (!check_dir_exists($this->exportdir . '/' . $this->filedir)) {
throw new SystemException("Couldn't create the temporary export directory $this->exportdir");
}
......
......@@ -157,7 +157,6 @@ abstract class PluginExport extends Plugin implements IPluginExport {
*/
public $exporttype;
/**
* Whether the user requested to export comments as well
*/
......
......@@ -45,6 +45,7 @@ class PluginExportPdf extends PluginExportHtml {
public function __construct(User $user, $views, $artefacts, $progresscallback=null) {
global $THEME;
parent::__construct($user, $views, $artefacts, $progresscallback);
$this->exporttype = 'pdf';
$this->zipfile = 'mahara-export-pdf-user'
. $this->get('user')->get('id') . '-' . $this->exporttime . '.zip';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment