Since this version has many changes (you need to click on Admin>Notifications to update), I would appreciate it if I could get some feedback from testers.
This version includes locking options: by course grade, time spent in the course, graded activities, taking survey, questionnaire, or feedback, or any combination--thanks to Mike Churchward for his help with the locking code.
Another new option is the ability to enter email addresses for receiving notifications of received certificates. Thanks to Eloy Lafuente for this code.
There is also an option to print Credit hours on the certificate, updated help files, all images can be either JPEG or PNG 8, and a fix so it will not issue a certificate until button is clicked. The non-unicode types (which are recommended, since the Unicode types create much larger pdf files) should work with umlauts, accents, etc. if they are entered in Unicode format. This version includes two Unicode types--use these if your language includes symbols.
thanks - tried it again and this time it worked fine - sorry to have troubled you.
Sorry but seem to have run into a problem.Downloaded the latest version
[Am using my localhost trial platform (Win XP Moodle 1.8.1,(2007021510) Mysql 4.1.22 & PHP 4.3.9 ]
Have been trying Certificate 4.3 FAT recently so I deleted this via admin|module - which completed successfully and then I manually removed the mod/certificate directory &files from the moodle directory structure
I installed your certificate module , copied the certificate.php to the lang en-uft8 folder as per the documentation & then went to admin notifications to update.
Notification reported installation completed successfully.
Went to a course and added a certificate
on the "editing certificate" page I found that the links to the various help files do not work (except for watermark,grade format,print grade , print teacher,print signature,print seal and group mode - all the rest report the associated html file could not be found.)
On attempting to save the new certificate I get the following message
"This SQL relies on obsolete tables! Your code must be fixed by a developer."
Any thoughts or have I done something wrong?
Thanks for sending the zip file.
Have now installed it & I really like the module - many thanks for the work you have put in. I find that it seems to generate the certificate a lot faster than certificate 4.3 FAT I was trying before - I dont know if you are using different code but it certainly seemed to help on my testsystem. If you are going to amalgamate the two you might want to consider/review this aspect
However whilst trying a few things I have identified a couple of possible bugs(?) to do with dependent activities and it's use with the new feedback module for v1.9
I set up a course with a quiz , a feedback form and a number of certificate
Cert 1 requires 70% pass mark in quiz
Cert 2 requires feedback form to have been completed
Cert3 requires 70% passmark on quiz + feedback form
Cert 4 requires feedback form + 70% passmark in quiz.
I then setup a number of users - user1 , user2, user3, user4 etc
with user1 took test and filled in feedback
with user 2 just took test
with user 3 just filled in feedback form
with user 4 did nothing
with each user then tried to get a certificate.
The problems I encountered are:
1) when certificates are initially being set up they don't seem to be saved correctly in that the dependent activity is not saved . If you set up the certificate then immediately check it by going to update it the dependent activity has not been set. If you then update the certificate to correct this it is saved correctly.
2) I could not get certificate to work with the feedback module - every time, no matter what the combination and whether the feedback form had been completed , it reported that the activity grade must be completed before issue.
Hopes this feedback helps.
Thanks for testing. Leonardo used only the unicode types for his version--which requires embedding of the entire font(s) into the pdf--thus making the pdfs very large. Unicode should only be necessary for langs with characters.
As for 1--we'll have to look into that.
For 2- Is this an anonymous feedback by any chance? I just looked at that code, and it appears that no user ids are stored in the db for anonymous feedbacks--thus, locking won't work. I'll ask Andreas about that.
Thanks for the information - that explains why creating the pdfs did had a big impact on my local system - I had to extend the php max script run times to 60 seconds to get Leonardo's version to work ( which I would probably have trouble doing on my main site which is hosted by a third party).
For 2 - No when I set up the feed back form I selected the option "user's name will be logged and shown with answers".
Can you point me to the location of the code that controls whether or not I can see the certificate page, based on the availability of any assignment it's attached to? I'm not having much luck finding the code that controls this.
Basically, I want to be able to lock the certificate based on an assignment. However, I want this assignment to be hidden to students. If I hide the assignment, though, then when I click on the link to the certificate as a student, I get redirected to the assignment (in the breadcrumbs) and a page that shows, "Sorry, this activity is currently hidden."
I know it's a little squirrelly, but we use this assignment as sort of an easy manual switch for trainers to individually assign each participant the ability to download the certificate when the trainer feels they have successfully completed the course. In other words, we don't want it to be a completely automatic process.
I hope I'm making sense. Is there a way to have the certificate page display, regardless of whether or not any activity it's attached to is hidden? Or is there a better way to go about achieving what we're doing that I've overlooked?
However, I just tested it an you are right--the code to check the availability of a locked activity (at the bottom of the lib file) doesn't like it if it is hidden.
We'll have to look into this.
I have a question for you. I am trying to force my students to follow a certain path, in other words, I want them to have to view and acknowledge reading a document before they are allowed to go further in a course. Is a certificate the way to do this? I am using 1.8, I know about the activity locking module but it is still in testing and not for a production server. My network, admin won't allow us to put it on because of this.
I have a suggestion for you for your hidden assignment. A long time ago, I created a section block that allowed you to add resources and activities to a block on a course page. Then, you could hide the block (but not the individual items in the block), and those activities were still accessible, e.g. via a link, but "hidden" from view on the course page.
Since then, Mike Churchward updated that block and it is available here.
I assume the block hiding trick still works--give it a try.
I couldn't quite discern from the description, but does this still list any activity (like an assignment) you create with the rest of the activities in the Activities block?
What I had been doing up until now, was creating a hidden section at the bottom of the course site (topics format). This sounds to be very similar to what this does. This hidden section would contain things like this certificate triggering assignment, links for the teacher, etc., that we didn't want students to access.
However, the problem I have now is that while the assignment is hidden on the main page to students because it's contained in a hidden block, students can access this "teacher only" certificate triggering assignment if they click on the Assignments link in the Activities block because I can't hide the assignment itself anymore. If this block you mentioned effects the same changes that my hidden section method above does, then I'm assuming I'll end up running into the same issue with it as well...
This code is entirely different than Leonardo's which I believe might rely on the same mod code I use in the certificate to print the mod grade--thus only one activity can be locked. This code relies on each activity's own functions--thus if the activity is hidden, the locking function doesn't work (although the certificate can still be set up to lock on a hidden activity--it won't work until the activity is made visible).
As for the assignment index page--yes I believe those assignments in the block (since they are not hidden) will still show up there. You could contact Mike Churchward regarding doing some coding to the block so that if it is hidden, the activities will not show on the index page--he's really a very clever coder.
If not, is there a way I can go in the opposite direction? Can you point me to the code that controls this? When I was using Leonardo's version of the certificate, I was able to hide the required assignment and students still had the ability to access the certificate (given the assignment was satisfied), which is the desired behavior in my case.
The issue is in the activity library code. The code that checks for elements of the activity, checks access levels for the user accessing it. If its hidden, and the user is not allowed to access hidden activities, than it returns that page. I believe this was introduced in 1.7.
You can't get around it if you use the activity API's to get things like grades. In the case of the assignment, simply instantiating it to use it checks the access - if its hidden, and you can't view hidden activities (capability viewhiddenactivities), then it returns that message.
The only way you could code around it would be to bypass the assignment API completely, and write custom code to do it all on its own - or change the code in the assignment module. This is not a good thing to do for something that will be widely distributed.
But, if you had a solution before that was working, use it and don't set any activity conditions for the certificate.
Thanks for the explanation; this makes sense.
Unfortunately, I haven't yet found a solution that has worked 100% for us. I may just need to re-think it a bit more and see if there's a better way to get the end result.
One of the bigger obstacles we have, is that we don't like to assign actual grades to people. So one of the initial factors in wanting it hidden from the students was to alleviate trainers' concerns about assigning numerical grades to students. Instead, we use a custom scale of Completed/Not Completed. However, using a custom scale like this doesn't seem to lend itself to activity locking based on a grade. I tried browsing the code to see how difficult it would be to add that sort of a check in there and my initial thought was that it's probably not easy (at least, for me).
I would like to create a lesson and after 4 questions or more if answers are all correct the student would be redirected to a certificate ?
Is it possible?
Thank´s in advance
How can i create a watermark, i do create a png image and after uploading to the pix\watermark directory i choose the new watermark but it gives me the error message: TCPDF error: Alpha channel not supported: /direcotory/image.png
How can i produce images with no alpha chanell?
Thank´s in advance
This certificate is really working well for us. Thanks.
I do however have a question. I am not all that advanced in modifying code but can work my way through usually if pointed in the right direction.
We need to add a student id or license number to the certificate. Currently we have a custom field in the main student profile information in our Moodle 1.8.3 installation that collects this information. Can someone point me in the right direction for modifying the certificate.php file to allow it to print each student's id? We do not use the print teacher function so I was thinking that there may be a way to modify that code to pull the id instead of the teacher name.
Any help would be appreciated. Thanks
Just a thought.
cert_printtext(170, 500, 'C', 'Times', '', 10, utf8_decode($USER->idnumber));
Getting the info from a custom field will require writing a function to get that number for each user from the user_info_data table, then using that function in the type file. Like Colin mentions, try looking at the student name function in the lib file and using it as an example.
Print teacher isn't a good example since it uses the roles functions to print the name of the teacher set at the module level on each certificate--it isn't unique for each user.
Chardelle & Colin:
Thank you both for your responses.
I see where using the teacher would not be a good choice now.
I have no problem changing over to a non-custom field. The only problem would be that I would need to use one that the students can enter themselves and that I would be able to modify the label on. Id is an auto field isn't it?
I'll look at the student name file and see if I can figure out something. This looks like it may be beyond my knowledge though so we may just have to have the students fill in the blank themselves manually after they print it off.
Thanks again for the help.
Hello, I just recently upgrade my production server to use moodle 1.8.2, during the upgrade, I forgot to bring certificate along for the ride.
Anyway, I just downloaded the most recent version of the certificate module for 1.8 and this is the errors it gives me when I try to update the database.
(mysql): ALTER TABLE `mdl_certificate` ADD `customtext` TEXT AFTER `printteacher`
1054: Unknown column 'printteacher' in 'mdl_certificate'
(mysql): ALTER TABLE `mdl_certificate_issues` CHANGE `classname` `classname` VARCHAR( 254 )
1146: Table 'fldb.mdl_certificate_issues' doesn't exist
(mysql): ALTER TABLE mdl_certificate ADD emailothers TEXT after emailteachers
1054: Unknown column 'emailteachers' in 'mdl_certificate'
Any ideas on what to do?
Are you upgrading from 1.5 by any chance? If so, the certificate was entirely re-written from 1.6 on and isn't compatible with older versions so you will have to uninstall your current version first, then install 1.8 and see if that works. If not, let me know.
I am really getting frustrated. I have asked this question on other forums here and no one responds constructively. I installed the certificate module. It appears in the activity list. When I click on the Certificate button nothing happens. Just a white page. What should I be looking at to correct this? Am I using the certificate activity correctly?
Topic 12 looks like this. I want to add a certificate to Topic 12.