Certificate code generated by Moodle

Certificate code generated by Moodle

by Marcelo Lopes -
Number of replies: 1

We've discovered two certificates with the same code in one of our installations.

I know  the Certificate module uses the moodlelib/random_string() function to generate a string with characters randomically choosen. However, there's no garantee that this string will be unique - and a unique certificate code is a requirement of our client.

I'm about to create a function that generate unique codes. Has anybody already faced the same issue?

Average of ratings: -
In reply to Marcelo Lopes

Re: Certificate code generated by Moodle

by Raymond Fürst -

Some time ago Sandra King started a thread in this forum about turning the code into some kind of serial number. Read this:

http://moodle.org/mod/forum/discuss.php?d=151299

I'm not sure if  there is a working solution by now, but maybe some posts in this thread contain ideas or code suitable for you.