bozoh / moodle-mod_simplecertificate

It's NOT RECOMMENDED to install version below 2.2.6 (MOODLE_31), due a security issues See more in README
17 stars 44 forks source link

Download zip archive - all user names are set as admin username #231

Closed halmaclean closed 4 years ago

halmaclean commented 4 years ago

Describe the bug When downloading all issued certificates, the username on each is set to the name of the admin downloading. They should retain the original username of the person they are issued to as this is a way to backup and provide copies offline to those people who have been awarded a certificate.

Moodle Version(s) The moodle version 3.7+

To Reproduce Steps to reproduce the behavior:

  1. Go to any live certificate instance with user data as a site administrator
  2. Click on Bulk Actions
  3. Select any number of users
  4. Choose a bulk action operation to download as zip file, or as one PDF
  5. The file downloads as expected, but all the certificate names (using {firstname} {lastname} ) are set to the current user - i.e. the admin account doing the download.
  6. QR code verification works, and shows the actual user's name.

Expected behavior For all downloaded copies to contain the personal details of the user the certificate was awarded to. For example, the certificate is awarded to 'John Smith' then the downloaded file should show that name. Currently it shows 'Admin User' and not 'John Smith'.

Desktop (please complete the following information):

behoof commented 4 years ago

Would be nice if this is solved

bozoh commented 4 years ago

Would be nice if i get some help ...

halmaclean commented 4 years ago

Thanks for your work on this - please don't feel too stressed!

I have a skilled developer on my team who can put in some hours on this for you if you would like?

If you are able to give some direction as to how you'd like to resolve this one, I'll make sure it is passed on - he can run some code, and you can verify / validate? I'm more than happy to dedicate some developer time to this - the plugin is awesome... thank you!

bozoh commented 4 years ago

It will be nice, since i don't work with moodle anymore (developing other things now). I am trying to dedicate some of free time to this plugin, but it's very hard.

Due to COVID-19 lock-down in my city, i can manage to get some free time. :smile:

halmaclean commented 4 years ago

Totally understand! Like you, locked down here in Manila... my developers also. I hope you are ok where you are!

Do you have any initial thoughts on the issue here? I saw your response on #232 about changing names... hoping it isn't the same thing leading to this. Happy to connect through email directly if you prefer. hal dot maclean at mac dot com.

bozoh commented 4 years ago

I don't think so, first i will try to reproduce this error :smile:

bozoh commented 4 years ago

Sorry but i can't reproduce this error, i'm using moodle latest version (3.9), and works without error

image

image

image