Certify

falcon - June 25, 2009 - 11:32
Project:Quiz
Version:6.x-4.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

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.

  • #1

    vegardjo - June 26, 2009 - 11:09

    We'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:

    • An admin can add a certificate to their course (probably "site" in Drupal). The certificate has a title and a description.
    • The certificate acts as a container for quizes. That is, an admin can decide which quizes the certificate should make use of. In reality this will be the quiz results from a given (set of) quiz(es).
    • If a certificate is obtained or not is entirely up to the pass percent set on the quiz. So if you are 80% on your way to obtaining the pass percent of a quiz, and the certificate only contains that quiz you are also 80% on your way to obtaining a certificate. If a certificate holds more quizes this will be different.
    • An admin can see the progress of all students / users in their quests of obtaining a certificate

    for the end user this is what happens:

    • They take tests / quizes, and get a progress bar showing their progress as they go.
    • When they have obtained 100% of what the certificate requires, they get the option to download a pdf certificate.

    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:

    • First, we've been thinking of this as an addon to the quiz module, as it makes use of quiz results. However, you could imagine it to be a more general module, being able to take data from various sources (like points earned via the user points module in addition to quiz scores). What do you think? Certificates as a quiz addon, a userpoints addon, separate module or other?
    • I imagine a certificate would have to be a node / content type with certain features, much like a quiz and quiz cuestions are nodes..?
    • The progress bar / download link for end users seems to best be implemented as a block. I think you would need one block per certificate, and in addition one block containing all certificates a user has started on (for use on profile page for instance)?
    • We used pdftk on our server to generate pdfs but I'm thinking there might be modules for Drupal we can use for this instead? Fillpdf?.

    There is probably a lot more, fire away! :)

    #2

    sivaji - June 26, 2009 - 13:29

    I 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.

    The progress bar / download link for end users seems to best be implemented as a block. I think you would need one block per certificate, and in addition one block containing all certificates a user has started on (for use on profile page for instance)?

    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

    #3

    turadg - June 26, 2009 - 20:54

    Looking forward to this. (subscribe)

    #4

    sivaji - June 27, 2009 - 07:27

    is there any strategy to prevent fake certificates ?

    #5

    vegardjo - June 27, 2009 - 23:38

    Thanks 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! :)

    #6

    navpar - July 1, 2009 - 12:47

    We 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

    #7

    benthomas1975 - July 10, 2009 - 02:13

    WOW! 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

    #8

    falcon - July 10, 2009 - 08:22
    Assigned to:falcon» Anonymous

    I'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.

    #9

    sivaji - July 22, 2009 - 16:20

    We could also add one more feature to certify module which automatically change the user's roles after receiving certificate.

    #10

    Elijah Lynn - July 23, 2009 - 22:22

    subscribing

    #11

    vegardjo - August 10, 2009 - 07:34

    Back 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!

    #12

    Elijah Lynn - August 12, 2009 - 17:26

    Awesome Vegardjo!

    #13

    sunsetco - September 8, 2009 - 09:34

    THis 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!

    #14

    vegardjo - September 8, 2009 - 10:24

    That 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)..

    #15

    NathanRAFT - September 21, 2009 - 02:06

    +1

    #16

    iaminawe - September 24, 2009 - 16:56

    subscribe

    #17

    docwilmot - October 4, 2009 - 17:00

    subscribe

    #18

    titi88888888 - October 10, 2009 - 23:39

    subscribe

    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 !

    #19

    bbenone - October 23, 2009 - 16:27

    I'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

    #20

    turadg - October 23, 2009 - 16:35

    What 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.

    #21

    vegardjo - October 23, 2009 - 16:47

    Well, 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!

    #22

    sunsetco - October 24, 2009 - 11:17

    I 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.

    AttachmentSize
    quiz.zip 63.44 KB

    #23

    sunsetco - October 24, 2009 - 11:47

    I 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.

    #24

    sunsetco - October 24, 2009 - 12:07

    bbenone,
    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).

    #25

    vegardjo - October 26, 2009 - 14:40

    Great 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

    #26

    sunsetco - October 27, 2009 - 01:25

    vegardjo:
    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...

    #27

    bbenone - October 27, 2009 - 16:35

    vegardjo:

    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...

    #28

    vegardjo - November 3, 2009 - 10:17

    @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..?

    #29

    falcon - November 6, 2009 - 13:01

    Update:
    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.

    #30

    falcon - November 6, 2009 - 13:45
    Status:active» won't fix

    I mark this as won't fix because it won't be a part of the quiz module.

    #31

    docwilmot - November 16, 2009 - 11:30

    we 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.

    #32

    falcon - November 16, 2009 - 11:34

    We 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

     
     

    Drupal is a registered trademark of Dries Buytaert.