-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF certificate name should be student dependent #455
Comments
Maybe we can change in template.php, when the PDF is generated, and add the name of the student/user? |
Closing as a copy of #132. Please leave any comments there. |
Unfortunately there is currently no one else except myself working on this module and I do it in my free time. If you want you could contact https://catalyst-au.net/contact-us to get a quote on the work required, otherwise you will have to wait for me to implement the feature. Sorry. |
Reopening as this could be a quick solution to the certificate name confusion. |
Solution from @ricardoh34.
@ricardoh34 Do you want to create a MR? |
I assume this won't break on some user names, has that been tested? |
Hello @mdjnelson No need to create a MR, I think the change is really small. I´m working on including the course name also, when I got it, I´ll tell you. I have tested some names, also null names should simply not appear. As it is included in clean_filename function I think it will also protect against strange name combinations. I will try strange names, with quotes and similar to assure it. Thanks! |
I have tested with quotes simple, double and with < > in the full name of $USER and it seems like clean_filename erases strange symbols and allows characters and numbers. |
I just wanted to credit you for the fix that's why I asked about the MR. :) |
Thanks! I would love that! I have updated this change and included the name of the course after a sql query to customcert table. This afternoon I send you the patch to check if it is worth to use. |
Hello @mdjnelson I have added the name of the course, considering the template id is unique and univocally related to the courseid. This is the patch:
Hope it is useful, |
Are you able to do this as a merge request @ricardoh34? |
Include name of student and name of the course in the PDF certificate so as to ease organization of the certificates downloaded, solving issue mdjnelson#455
I think I have done it now, sorry, but I have to update myself to github behaviour! Tell me if it is ok, |
Hello, this does not apply to the pdf file name in the mail that will be send to other users. Any suggegtions? |
The code for the single download is good. But mail feature is missing. |
Include name of student and name of the course in the PDF certificate so as to ease organization of the certificates downloaded, solving issue mdjnelson#455 Erase tabs Added new space in line 266 Added original space in line 266. Corrected mistakes from @mdjnelson comments @mdjnelson ammendments and corrections. I have changed full_name to fullname again. I expect everything works now. Add student name to PDF certificate file Add student name to PDF certificate file Update template.php Changed tabs and try to distinguish fullname and full_name. If still persists the error maybe we can´t use fullname($USER)? I have added also defined('moodle_internal') || die(); if that´s the problem.
I think that the name of the PDF file generated for each student should be different if the certificate name uses a variable like "student name" in it. Maybe it could also be an option (checkbox)? Anyone is working on this? Thanks!
The text was updated successfully, but these errors were encountered: