Maybe I'm missing something, but I am unable to find any setting that will allow the custom cert to be viewed in a new window or tab. Is this not a feature, or does it have to be customized in the code?
https://github.com/mdjnelson/moodle-mod_customcert/issues/405 will address this. Will go into the next release.
Wonderful, thank you Mark!
Hi Mark,
Just upgraded to Custom certificate, mod_customcert, 3.11.1, 2021051701 and still don't see the option to have the certificate open in a new window. Was this left out for some reason or am I doing missing something?
Thanks for working on this code, it puts the finishing touches on learning...
Just upgraded to Custom certificate, mod_customcert, 3.11.1, 2021051701 and still don't see the option to have the certificate open in a new window. Was this left out for some reason or am I doing missing something?
Thanks for working on this code, it puts the finishing touches on learning...
Sorry for the false hope everyone but it doesn't seem the library I am using that generates the PDF supports this functionality. See https://github.com/moodle/moodle/blob/master/lib/pdflib.php#L183 for the list of options that are made available. If I was to add this option I would need to create a hack, so I have created https://github.com/mdjnelson/moodle-mod_customcert/issues/429 to deal with just opening in a new tab. I won't get time to work on it until a few weeks from now.
So I just ran into this, with the "View certificate" Button and it was getting frustrating for our end users. I ended up editing the code and I added this line to make it happen:
$downloadbutton = '<br><a href="/mod/customcert/view.php?id='.$cm->id.'&downloadown=1" class="btn btn-primary" target="_blank">View certificate</a>';
Instead of using the render function, just built the HTML and added it in there for the time being.
Thanks.