extra names printed on certificate

extra names printed on certificate

by Brian Schmidt -
Number of replies: 7
Recently, we noticed that the certificates are now being generated with not only the instructor's name, but also all of the site admin names. The only thing that has changed from when it had been previously working great for months was that I had upgraded us to 1.9.4+ (from 1.9.3+). Has something changed with the way Moodle finds users, that would be causing the certificate to add all of the extra names now?

We are using Moodle 1.9.4+ (Build: 20090225).
The version of the Certificate listed in the admin section of Moodle is 2008041801.

TIA,
Brian


Average of ratings: -
In reply to Brian Schmidt

Re: extra names printed on certificate

by Brian Schmidt -
Just as an FYI, I've so far tried selecting both "Prevent" and "Prohibit" in the user permissions for certificate:printteacher for all roles these users are in, but they're still being printed on the certificates.
In reply to Brian Schmidt

Re: extra names printed on certificate

by Chardelle Busch -
Picture of Core developers
Yes, this has changed and I just haven't fixed that in cvs yet--.

To fix this yourself, open your certificate/type/anytype/certificate.php file.

Replace this line of code toward the bottom of the file:

if ($teachers = get_users_by_capability($context, 'mod/certificate:printteacher', '', $sort='u.lastname ASC')) {



With this:

if ($teachers = get_users_by_capability($context, 'mod/certificate:printteacher', '', $sort='u.lastname ASC', '', '', '', '', '')) {


Now, click to update a certificate, click on the Locally assign roles tab, add whatever people you want to print as teachers to the Editing teacher role--those names will print on the cert.
Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: extra names printed on certificate

by Brian Schmidt -
Excellent! It is working perfectly again, Chardelle - thanks!
In reply to Chardelle Busch

Re: extra TEACHER names printed on certificate

by Alan Cherwinski -
I've downloaded (March 8,2010) the latest version for 1.9 and I am still getting all teachers listed on the certificate. I've changed the locally assigned role. To a single user, but multiple names appear...

Thank you,
Moodle 1.9.6+ (Build: 20091028)

In reply to Alan Cherwinski

Re: extra TEACHER names printed on certificate

by E. L. Cooper -
A couple of things to consider. If you are accessing a previously generated certificate you may continue see it as it generated. Also check for role assignments at the site and category level.
In reply to E. L. Cooper

Re: extra TEACHER names printed on certificate

by Alan Cherwinski -
Thank you for the reply. I've made all my site level permissions hidden in an attempt to eliminate the extra names without any positive result.

How do I eliminate the previously generated certificates to test if the thing is working properly? I've made the certificate Not Saved, but they do appear to be cached as the time of generation does not appear to update.


Thank you,

In reply to Alan Cherwinski

Re: extra TEACHER names printed on certificate

by E. L. Cooper -

I don't know if hiding site roles will fix it but first just put another certificate instance in and see if it only has one name. Also check Administration> Appearance> Course managers to be sure only teacher role is selected there

If you have people assigned to the teacher role on a site level (generally not a good idea but there are reasons to do so) they may still appear in the certificates. To get around that in one moodle that I admin I created a duplicate of the teacher roll  called it global teaching and assign those who I needed to have teacher ability in all classes to that role.

Now as to the odd certificates. If you are good with phpmyadmin or editing data bases in general you can delete them in mysql. Personally I love the free tool Scriptly if I want to edit a table.

Make a new certificate in the class and use login as each student who was already issued. It will have the current date (but it would if you delete the earlier ones anyway) if you do that. If you are not so hot on data bases it is at least user friendly