A module implementing functionality for certifying students.
Use cases
Self going course: After the students have studied the course content they take a test, and if the result is better than a pass score set by the course creator, the student will be able to download a course certificate.
Homework: The student does a quiz as homework. A course certificate gets emailed to the student and the course instructor when the student finnishes the quiz.
Implementation
Implemented as a module.
Dependencies: Quiz, maybe FillPDF
More details will follow.
Comments
Comment #1
vegardjo commentedWe're thinking of this as a Drupal port of a similar module we made for ATutor, see the details here:
http://atutor.no/2009/06/announcing-certify
The post above will probably be the most clarifying, but the logic is:
for the end user this is what happens:
A certificate is made out of a PDF template that holds a set of text fields, like "username", "certificate name", "date completed" etc. Admins can upload their own pdf templates if they do not wish to use the standard template.
The use case for this is for "self going courses" which makes use of data that can be automatically calculated, like MCQ test results. It could be used to certify that you are allowed to use a certain set of equipment at a hospital, or just homework for students, or something else entirely!
So, we will (try to) get this one figured out (and done) in the following months, but would love feedback from the community here as we need to develop it again following Drupal logic and coding style! Here are some questions / issues I have thought of so far:
There is probably a lot more, fire away! :)
Comment #2
sivaji_ganesh_jojodae commentedI really really like this feature. This is something very much required for an e-learning quiz engine. Great that you have also implemented the same feature to ATutor.
Few things that i would like to tell you
1. I would like to see this module as an addon to quiz module.
2. Try to use already existing functions instead of writing your own function (eg: to create a table of quiz results).
3. Use coder module (http://drupal.org/project/coder). This will help you to follow drupal coding standard (http://drupal.org/coding-standards)
4. I would suggest to create new questions type (certifying quiz) using QUIZ_QUESTION module (if you want to save a lot of time and lines of code) which will act as container for one or more quiz and lets the quiz creator to define time duration, pass percentage, certificate template etc.
5. I am not clear about using points earned via the user points module. User Points module is an API allows you to integrate it with other module like quiz, forum comment etc. You can consider userpoints score if it works only with quiz module.
FYI : quiz 3.x and above already has userpoints integration. You can test it here
6.
Make it as a table row instead of having it as blocks. Lets have a page (like quiz result page) where user with role student will be able to see only his certifying quiz status/download link and the user with role quiz creator will be able to see certifying quiz status/download link of all the students as a rows of table.
7. I can't understand the purpose of Fillpdf module. AFAIK there is no drupal module to manipulate PDF document. I am against the use pdftk, i want the quiz module to be a plug and play module. Dont want to give too much of installation and configuration headache to users. I would suggest to use PDFLib library or dompdf (where you can generate HTML certificate using drupal theme function and convert it to pdf).
Please let me know your thoughts on this :D
Comment #3
turadg commentedLooking forward to this. (subscribe)
Comment #4
sivaji_ganesh_jojodae commentedis there any strategy to prevent fake certificates ?
Comment #5
vegardjo commentedThanks a lot sivaji, these are very useful comments for us! I don't do much coding myself but can comment on a few things here:
Regarding userpoints this was more a general idea that a certificate in theory could be issued based on different conditions. Quiz results is one, but you could also have cases where you wish to issue a certificate on the basis of test results and, say, forum activity. So if the user / student had passed the quiz(es) *and* replied to x forum posts (and earned x points for that) the certificate could be issued. However, this is very far down on the list of priorities :)
As for pdfs I agree that pdftk isn't the most user friendly (or rather admin friendly) solution as it needs to be installed on the server, which isn't plug and play and can be a hassle. The reasons we did go for it in the first place was that many pdf generating methods generate the PDF on the client side, and some of these require Adobe Acrobat. That means they won't work in the default Preview on Mac or on any of the default pdf readers on Linux. We also needed our instructors to be able to upload their own templates, which I believe there also was some issues with.
However, we wish to use what is best practice for generating pdfs, and preferably a method that doesn't require you to install anything on the server - all tips are appreciated!
Regarding strategies to prevent fake certificates the short answer to that is "no". I am not clear on how we would go about ensuring that, so all tips appreciated on that one too!
And thanks again for your tips and comments, they are very helpful! :)
Comment #6
navpar commentedWe use a testing software, but we print and send our certificates. Our configuration might help as well. Here is what we do:
1. The test is emailed to a set of users.
2. If new users are added, we can just click a button and it sends the test to the new users.
3. There is an option to send the test to all users who have not completed their test as yet (it would be good to have an option to specify a date so that you do not end up sending the reminder to people who have received their Test email only yesterday).
4. The person can click on the link and give the test.
5. If they pass, the system sends a designated person in our office an email with 2 attachments
5.1 Certificate with their name on it (using a template uploaded by us)
5.2 a personalised letter with their name and address placed such that it appears in the window when you slip it into an envelop. This again uses a template.
6. If they fail (i.e. less than a certain number of correct answers), the system sends them a mail saying that they can resit the test after 24 hrs. It increments the number of attempts to 1 and sends us an email to inform us of the same.
Hope the above helps.
Cheers,
Navin
www.mendcentral.org
Comment #7
benthomas1975 commentedWOW! The aim of this module is amazing. Can you tell me how far along you are with it, as I'd love to implement it asap.
Cheers
Comment #8
falcon commentedI'm glad the module will be useful for others as well!
The module was assigned to me, but it will be one of my colleagues who writes the module. He has already written one for Atutor. He hasn't started on the drupal version yet AFAIK.
Comment #9
sivaji_ganesh_jojodae commentedWe could also add one more feature to certify module which automatically change the user's roles after receiving certificate.
Comment #10
elijah lynnsubscribing
Comment #11
vegardjo commentedBack from holidays :)
We are running a bit late on this one, but we'll update here when we're on our way. Sivaji: automatically change role after completion is an excellent suggestion, we'll make sure to add that to it!
Comment #12
elijah lynnAwesome Vegardjo!
Comment #13
sunsetco commentedTHis is a fantaastic feature. I had a developer do this for me on my site, but he had to use some licensed pdf generator code so I could not post it onto drupal.org (sorry). The problem I have now is that I am stuck on the older version of Quiz to keep this going...
I would love to see this as a module for the new Quiz!
Comment #14
vegardjo commentedThat is cool sunsetco, we are unfortunately still running late on this one, as we are focusing on quiz 4 right now, but if you would like to send us your module we could have a look at it, and maybe use it as a basis?
In theory I guess we should be able to plug different pdf generators into it, that could be downloaded from a third party site if necessary (much like many of the WYSIWYG editor modules work)..
Comment #15
nathanraft commented+1
Comment #16
iaminawe commentedsubscribe
Comment #17
docwilmot commentedsubscribe
Comment #18
titi88888888 commentedsubscribe
This would be one of the best QUIZ module SO FAR !
It woudl be great if the certificate template could contain the score obtained by taking the quiz !
Can't wait to see it working !
Comment #19
bbenone commentedI'm assuming that this has sort of hit a dead end development wise, but there is clearly a bunch of interest in this in the community.
We need this basic functionality for a client, so we are going to develop it. I don't know if this is against the rules or not, but here is a google doc with our current plans:
http://docs.google.com/View?id=dvc73g9_6cpvkbpdb
(This is a live document, so don't be surprised to see typos, comments, etc...)
We will make this available for the community once it's complete.
I would love feedback on what you guys think before things get rolling here. What features are we missing, what use cases aren't we thinking of, what approaches do you like/not like, etc, etc...
I'd be happy to include more features, but, if they are too far outside our needs, be forewarned they will likely not get done. I can put you in contact w/ the developer that will own this one, he might be interested in beefing it up after hours (for a price).
I want to get moving on this one soon... Speak up, or forever hold your peace. :)
-BB
Comment #20
turadg commentedWhat rules? :) You're more than welcome to develop it. Planning on Google Docs works, but you might get more involvement if you start a thread on the Education forum at groups.drupal.org.
One thing I noticed in your plan is that you plan to build on Quiz 3.x. Quiz 4.x introduces big improvements and will be much more supported than 3.x soon. I would suggest building on that instead. It will be hitting beta in the next few weeks.
Comment #21
vegardjo commentedWell, that's very nice to hear, but your assumption is wrong :)
We actually have a developer on this, but as he is new to Drupal, and also fairly new to php we haven't had anything to show yet. He'll be working on this for the rest of the year. I'm thinking it should be possible to cooperate on this one, and maybe divide some work between us? Your spec looks good on first glance, but we'll comment some more early next week!
Comment #22
sunsetco commentedI will send you a copy of the work I had done for me. It seems to work great.
I also have added the ability to add a unique certificate number to each one and to store the quiz data in the database to re-generate certificates if the user has lost it instead of storing the image of the certificate.pdf for each one.
You will also find some code in there allowing me to present a quiz as a class training. The Presenter of the training can use a list of students in the class to flag as passing the class and this sends out a certificate too.
I am not proficient with php coding, but I will do what I can to help.
I would like to send you the pdf generator files privately so that you can see if a more public licensed version would work too.
Please note that the attached Quiz code is a version 1.1 code.
Comment #23
sunsetco commentedI would like to add that a feature we had to include is to pull a user's "Real Name" from their User Profile to put on the certificate. Using their Username ended up with silly looking certificates and did not give a usable certificate for the student.
We included the Real Name in the database for the completed quiz info at the time of completion. That prevents a student from changing their "Real Name" to a friend's, reprinting the certificate for them, and then changing their name back.
Just a thought to add to your list of features to implement.
Let me know if I can help.
Comment #24
sunsetco commentedbbenone,
Your write-up looks great!
I think you are correct about using one certificate for multiple quizes. It would be nice to be able to set up a couple of basic certificates to choose from, and select the appropriate one for a given quiz (OR, "no Certificate" if none applies).
Comment #25
vegardjo commentedGreat writeup, I'll just add my comments on the main differences between our original approach and the one described here:
You are planning for one certificate per (single) quiz? We are thinking in the lines that a certificate can include any number of available quizes. Use case: A student should get a certificate after completing a course, and a course can consist of several tests / quizes. The flow of things for an admin / teacher would be to create a certificate (a content type), select which quizes should be the basis of this certificate and then store it.
Body field / certificate HTML / template management: We were not planning of creating the certificates in HTML at all, only as pdfs. The body field we would use for a textual description of the certificate (which could or could not be included in a certificate). The module would ship with one standard PDF template who would use data from the module, like quiz name, description, name of user, date of comptetion. You are able to upload a new pdf template per certificate, which takes precedence over the default one.
This might make it a bit harder to create a certificate for the casual teacher, and it also depends on pdf generating software. On our ATutor module we had to do this generating server side too (with pdftk), as we didn't find any good (cross platform) ways to generate pdfs client side.
The upside is that it'll be easier to create very custom certificates that look the same on all browsers, and the certificate creators does not need to know anything about CSS / HTML.
Also, for quiz version we are going for Quiz 4. However, I don't think the way the student scores are stored in the database between Quiz 3 and 4 are that different.
Here's a small video of the flow in our ATutor module (a bit rough, but you get the drift): http://www.youtube.com/watch?v=KIE04DOH5Yo
Comment #26
sunsetco commentedvegardjo:
The way I handled the certificates needed for a grouping of quizzes is to use a module for Quiz Pre-Requisites. I donated the code over at http://drupal.org/node/518104 . It was designed for Quiz 1.1, so I hope that someone with more knowledge can update it to Quiz4.
We set up a series of quizzes that required the one before it (i.e Quiz 4(Final) required Quiz 3 to be passed, Quiz 3 required Quiz 2, etc.). The only Quiz to provide a certificate was the final one.
It worked for me...
Comment #27
bbenone commentedvegardjo:
Thanks! I'm always up for cooperation! How far has he gotten code wise?
We planned to do this as HTML because that would allow it to display w/o the installation of any PDF generation engines. Then, as long as the HTML isn't too crazy, there are plenty of open source HTML->PDF engines out there (admittedly of varying quality) to wrap them as PDFs. That would be advanced functionality, that the site maintainer would have to configure... but I figure that this module should have ways to assist in that.
My company uses a closed source PDF generator called "PDF Reactor". I have been very pleased with it's ability to flawlessly convert everything HTML/CSS we've thrown at it. However, it's expensive, and they have a lame "per core" licensing structure.
I think that plain-jain HTML may be sufficient for most people tho, and this way wouldn't necessitate installation of any thirdparty software (or learning a new markup language). I think that if we put some sort of numeric hash on the cert as well that then a verification tool could be developed to prevent fraud. hash userid + unixtime + sitekey or something.
Also, I do have the ability to generate the certificate after the completion of multiple courses in the requirement doc, just listed as a requirement that will currently not be implemented. That isn't needed for our current needs, but it makes sense to design it to able to grow that direction.
sunsetco:
Awesome. Thanks for the code and feedback. We'll take a look at it.
Interesting concept w/ the issue of changing your name to reprint the certificate. We'll have to think about whether that can be solved via the verification tool I mentioned above.
---
I'll get some updates made to the document and then post over in the education group to collect feedback there as well...
Thanks all...
Comment #28
vegardjo commented@bbenone very sorry the late reply, been too buzy! we're not very far in the code just yet, partly because our developer must climb the steep Drupal developer ladder while conding it, so it's also an internal learning project :)
as of now we can create a certificate (a content type) which has a title and description, and have implemented a hook from Quiz to select available quizes, which we then can add to a certificate. I'm afraid it's not much to share or show yet.
also I suspect we are going in two slightly different directions, which might be hard to combine, at least in the start? having several quizes per certificate is a necessity for us, and as we are replicating an existing system to put it in production, we only need the server generated pdfs, and will not go in the direction of HTML templates, even though I fully understand that it is easier to install and use for the casual Drupal user. we're just not that user ourselves :)
in any case: will update this thread as we go, and hope you will do the same!
we've been very happy with pdftk BTW: http://www.accesspdf.com/pdftk/ it's GPL and can be installed quite easily on most Linux distros. we're simply using it to fill forms in a pdf template with values from the LMS / CMS and then flatten the pdf.
@sunsetco thanks a lot! sadly we haven't been able to have much of a look at it :/ I've noticed that it is Drupal 5 and Quiz 1 though, so it might require quite a bit of refactoring I suspect..?
also, the changing name and e-mail address issue is important, and I really don't know what is the best way to handle it.. we will also include a real name field in the certificates (we'll override theme_username() in our theme to display this, which I hope is sufficient), and we will need to give our users the ability to change the value of this field too.. I like the idea of a hash code that can be used to verify the certificate, but don't know how we could incorporate this issue in that check..?
Comment #29
falcon commentedUpdate:
Our new drupal developer who works on this module is off sick this week and next week as well.
If the module isn't finished by the end of this year it will probably end up on my plate in January 2010. In any case it will be released as a separate project, and not as a part of Quiz.
Comment #30
falcon commentedI mark this as won't fix because it won't be a part of the quiz module.
Comment #31
docwilmot commentedwe run an education site. we would like to be able to give certificates for many activities not related to quizzes or the quiz module, to allow the user to have evidence of attendance or participation. a certificate module that's not tied to quiz would be best for us, and perhaps for others too. i wish you would do it like this.
Comment #32
falcon commentedWe would also like to be able to give certificates for many different combinations of activities. Maybe for quiz at first, and then we will add more as we go. We will investigate the user points module. http://drupal.org/project/userpoints
Comment #33
tonyoconnell commentedsubscribe
Comment #34
rachel_norfolkInterested in this - subscribing and reading more...
Comment #35
fuzzy76 commentedI am the developer that has "inherited" the module vegardjo mentioned. It is a stand-alone module that uses pdftk for inserting fields into a certificate template (a pdf form file) and generates a flattened pdf file for download. It should be available shortly after Quiz 4.0 release, and I will update this issue when that happen.
Comment #36
fuzzy76 commentedI guess you can download the module from my CVS application to take it for a spin, just be warned: the code is not ready for daily use yet! http://drupal.org/node/830254
Comment #37
mogilews commentedFuzzy has been helping me troubleshoot quiz+certificate w/pdftk on windows systems on http://drupal.org/node/830254, but I was posting in the wrong forum according to someone called kiamlaluno.
I am pasting the results here in the hope that someone else has had some luck getting pdftk running, and so I don't get in any more trouble with the forum police.
mogilews - July 19, 2010 - 18:09
Having trouble getting this working on Drupal 6.1.4 on XAMPP for Windows Version 1.7.1.
I think there is something wrong with the way I am writing the path. I tried using double \ ("\\" for directory levels) as well and had the same error.
Certify Module Config:
Enter the path to the location where to store certificates.:
C:\xampp\htdocs\certificates
Path to pdftk.:
C:\xampp\htdocs\CMS\helperapps\pdftk.exe
Error log follows:
Execution of pdftk failed - not installed or wrong path?
Command line:
C:\xampp\htdocs\CMS\helperapps\pdftk.exe C:\xampp\htdocs\CMS\modules\certify\default_certificate.pdf fill_form C:\xampp\htdocs\certificates\cert_35_.fdf output C:\xampp\htdocs\certificates\cert_35_.pdf flatten 2>&1
Output:
Unhandled Java Exception: java.io.CharConversionException at 0x0056175e (Unknown Source) at 0x00561c52 (Unknown Source) at 0x00561d03 (Unknown Source) at 0x0057692d (Unknown Source) at 0x0055f64d (Unknown Source) at 0x006bc0ad (Unknown Source) at 0x006994e0 (Unknown Source) at 0x00567a96 (Unknown Source) at 0x0056e8f2 (Unknown Source) at 0x0056e92c (Unknown Source) at 0x00445fa6 (Unknown Source) at 0x0048b15e (Unknown Source) at 0x0048b5b8 (Unknown Source) at 0x0048c238 (Unknown Source) at 0x0046c81f (Unknown Source) at 0x00469301 (Unknown Source) at 0x00466810 (Unknown Source)
fuzzy76 - July 20, 2010 - 15:48
The "Command line" part of the error log is the actual command line it tries to execute, and it actually looks fine as far as I can tell (though I seldom use Windows). The last element in the line might is POSIX-dependant, but I think Windows should ignore it.
The error looks to be the same error I got when I tried to run it on a Mac using the pdftk executable from Macports. Which as far as I could figure out was due to bad character set support in GCJ which was used for compiling pdftk from Java to an executable. Atleast the error indicates that the files involved probably was loaded ok, but couldn't be parsed for some reason.
Do you have any other pdftk ports for Windows you could try? I can test it under Windows myself, but I am on vacation right now and won't have time for that until august.
mogilews - July 20, 2010 - 16:57
I am using the windows executable from http://www.pdfhacks.com/pdftk/pdftk-1.41.exe.zip
I also tested it standalone (outside Drupal/Quiz) in the command line and got the same error
Unhandled Java Exception
java.io.CharConversionException
I saw that this had similar issues in Ubuntu 9.10 until patched, the GCJ environment was mentioned as a culprit there also.
Not sure where I can get another windows port for the current version.
Tried historical release PDFTK 1.12 Windows EXE from http://www.accesspdf.com/pdftk/#history, got the following when testing the EXE as a standalone app:
Error: Failed to open FDF (data) file:
xxx.fdf
No output created
Comment #38
barckhoff commentedsubscribe
Comment #39
truatavis commentedI am also very interested in the progress of this module and am very grateful for those of you who put so much of your time and energy into it. Please keep up the good work. I look forward the final result! :)
Comment #40
fuzzy76 commentedUnfortunately, my CVS application is taking some time. While waiting, I am rewriting the module to allow for mandatory viewing of book pages as well. Hopefully, I will soon be able to upload the module as a separate project. :)
I don't have time for now to figure out why pdftk throws a fit under Windows and OS X. I think it might be something in the default certificate template that triggers it, so if anyone wants to try to replace the default template, that might help.
Comment #41
zeezhao commentedsubscribing
Comment #42
fuzzy76 commentedJust wanted to let you all know that my CVS account is approved, and the code should shortly be commited to http://drupal.org/project/certify :)
Comment #43
druupydog commentedsubscribing
Comment #44
fuzzy76 commentedThe module has now been commited :) http://drupal.org/project/certify