- 🇨🇦Canada No Sssweat
Sounds like a bug.
I will check soon if this issue still persists in the latest version as of this writing, 3.0.4
- 🇨🇦Canada No Sssweat
The problem is that the
[current-user:display-name]
token always uses the current logged in user.To solve this issue, we can add the user ID as part of the path to the certificate pdf route. Then use the user ID in the path to get the user's name.
You will have to use the new token,
[opigno_certificate:user_name]
This will involve patching multiple Opigno modules.
- Status changed to Needs review
over 1 year ago 8:03am 19 April 2023 - 🇪🇹Ethiopia tsega
@No Sssweat, thanks for these awesome patches!
One change to the patch that updates the Progress class #certificate_url ( adds-user-to-cert-pdf-route-3280394-3-opigno_learning_path.patch → ), the user id to use should be picked from the
$accounrt_id
not from the$uid
(current user id). - 🇵🇰Pakistan usmanjutt84 Islamabad
@no-sssweat, thanks for the patches.
In the template preprocess, the user is needed to be fetched from the route parameters (user) as it is used on the certificate to indicate the recipient to whom the certificate is awarded. This solves the wrong name issue for the group owner while downloading the certificate for another recipient.
- 🇵🇰Pakistan usmanjutt84 Islamabad
The patch file name is fixed for #6 🐛 Getting wrong user name on the downloaded certificate Needs work