Commit dc29067c authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review

Merge "Bug 1732810: Pass file's title to pdfjs download button"

parents a323c8d8 dcc794ec
......@@ -70,6 +70,9 @@ class PluginBlocktypePdf extends MaharaCoreBlocktype {
}
}
}
else if ($language == 'en') {
$language = 'en-GB';
}
$result = '<iframe src="' . $urlbase . 'artefact/file/blocktype/pdf/viewer.php?editing=' . $editing . '&ingroup=' . !empty($group) . '&file=' . $artefactid . '&lang=' . $language . '&view=' . $instance->get('view')
. '" width="100%" height="500" frameborder="0"></iframe>';
......
......@@ -48,6 +48,6 @@ if (get_config('cleanurls') && get_config('cleanurlusersubdomains') && !$editing
}
$smarty = smarty();
$smarty->assign('url', $urlbase . 'artefact/file/download.php?file='.$fileid.'&view='.$viewid);
$smarty->assign('url', $urlbase . 'artefact/file/download.php?file='.$fileid.'&view='.$viewid.'&title='.urlencode($file->get('title')));
$smarty->assign('title', $file->get('title'));
$smarty->display('blocktype:pdf:pdf.tpl');
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