Closed baris83 closed 6 months ago
I am experiencing exactly the same issue, and have tested this on 2 separate Moodles
Seems this is a 4.x issue. Thanks for reporting. Will work on it next week.
Have you been able to make any progress with this?
Looking at it today as I set some time today to work on this project.
I have a Behat test for this exact scenario. I ran all the Behat scenarios for my plugin and there are a bunch of failures. I am going to have to see what is going on with more detail to get them all working.
Hello, i have the same problem, i tried this to avoid the redirect:
when the certificate is generated and i scan the qr code, i get this link
mydomain.com/mod/customcert/verify_certificate.php?contextid=1304&code=d4LnWGduFg&qrcode=1
but, if i remove "contextid=1304" for example:
mydomain.com/mod/customcert/verify_certificate.php?code=d4LnWGduFg&qrcode=1
the redirection stops, i dont know how to remove this parameter automatically
This is what I expected was happening @davidmoralesrivera, thanks. All going well I will get a fix today.
Hello,
To fix this issue, edit the file: /mod/customcert/element/qrcode/classes/element.php
Comment out line 161:
// 'contextid' => $issue->contextid,
Now the QR code generates the link without the "contextid" parameter and the user is no longer redirected to the login page.
This worked for me.
Greetings.
Got a fix for this now. I kept thinking it was an issue on the verification page and was confused because Behat covered this but it's an issue with the QR code generating an incorrect url - doh.
Ok, pushed fix to github. It is now in the 4.0, 4.1 and 4.2 branches. :)
Hi, I realized that, on Moodle 4.1.1 setup, when trying to verify a certificate with QR code, user is redirected to login page. I've tried it with Boost and Classic themes. We have other sites which are Moodle 3.8 and 3.11 where we use custum certificates with no such issues.
There is also another user facing this problem https://moodle.org/mod/forum/discuss.php?d=444866
Settings: Allow anyone to verify a certificate : Yes Allow verification of all certificates : checked
Also tried to give Guest permissions to mod/customcert:verifycertificate mod/customcert:verifyallcertificates
But no success