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

{USERNAME} attribute changes to another user after changing delivery-method! #260

Closed Urpokarhu1 closed 1 year ago

Urpokarhu1 commented 1 year ago

Describe the bug {USERNAME} attribute changes to another user after changing delivery-method!

Moodle Version(s) Moodle 3.9 mod_simplecertificate 2.2.10 (2020041238)

To Reproduce Steps to reproduce the behavior:

  1. Create simple certificate with certificate text that has {USERNAME} and delivery method "open in a new window"
  2. Open simplecertificate as a student
  3. As administrator go to "issued certificates" -> open issued certificate PDF -> notice how {USERNAME} is the students user name
  4. As administrator go to simple certificate settings and change delivery to "email"
  5. As administrator go to "issued certificates" -> open issued certificate PDF -> notice how {USERNAME} now the administrator user name, not the students

Expected behavior {USERNAME} should stay as student username even when changing delivery method.

bozoh commented 1 year ago

I don't think it's a bug

1- Any changes in certificate configuration makes all certificate to be invalidated, by setting a reissued flag to all issued certificates 2- Only students certificates is saved, (admin, teachers ... is not saved), so this admin certificate will not be issued to students.

I think if you go to bulk operations and click issue all (anything like that), and after that go to issues certificate, it will display the right certificate data

Urpokarhu1 commented 1 year ago

Hello,

Why would changing delivery method invalidate certificates?