Add 'target="_blank"' to view custom certificate form - Open Certificate in New Tab or Window

Add 'target="_blank"' to view custom certificate form - Open Certificate in New Tab or Window

by Joey Roberts -
Number of replies: 1

I would like the view certificate button to open the certificate in a new page. I know that this functionality will be enabled in the next update. I have a deadline fast approaching and need this to work before the next update comes out. The easiest way I can see to achieve this is to add the 'target="_blank"' parameter to the form that is submitted to display the certificate. Where would I be able to add this. I have tried in .../customcert/view.php but because it is dynamically generated using php I am having trouble getting it included. Any direction would be appreciated. Thanks.

Average of ratings: -
In reply to Joey Roberts

Re: Add 'target="_blank"' to view custom certificate form - Open Certificate in New Tab or Window

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
You could try https://github.com/mdjnelson/moodle-mod_customcert/blob/MOODLE_310_STABLE/view.php#L143 and see if the single button takes that as an attribute, or see if https://github.com/mdjnelson/moodle-mod_customcert/blob/MOODLE_310_STABLE/view.php#L143 takes a different variable to display in another tab.