PDFs should be inline not attachments #153
This commit is contained in:
parent
75dbbf661d
commit
ebfc1c029d
2 changed files with 4 additions and 2 deletions
|
@ -320,7 +320,7 @@ class template {
|
|||
return $pdf->Output('', 'S');
|
||||
}
|
||||
|
||||
$pdf->Output($filename, 'D');
|
||||
$pdf->Output($filename, 'I');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4
view.php
4
view.php
|
@ -139,7 +139,7 @@ if (!$downloadown && !$downloadissue) {
|
|||
if ($canreceive) {
|
||||
$linkname = get_string('getcustomcert', 'customcert');
|
||||
$link = new moodle_url('/mod/customcert/view.php', array('id' => $cm->id, 'downloadown' => true));
|
||||
$downloadbutton = new single_button($link, $linkname, 'post', true);
|
||||
$downloadbutton = new single_button($link, $linkname, 'get', true);
|
||||
$downloadbutton->class .= ' m-b-1'; // Seems a bit hackish, ahem.
|
||||
$downloadbutton = $OUTPUT->render($downloadbutton);
|
||||
}
|
||||
|
@ -179,6 +179,8 @@ if (!$downloadown && !$downloadissue) {
|
|||
redirect(new moodle_url('/mod/customcert/view.php', array('id' => $cm->id)));
|
||||
}
|
||||
|
||||
\core\session\manager::write_close();
|
||||
|
||||
// Now we want to generate the PDF.
|
||||
$template = new \mod_customcert\template($template);
|
||||
$template->generate_pdf(false, $userid);
|
||||
|
|
Loading…
Reference in a new issue