Certificate for 1.6 with security

Certificate for 1.6 with security

by Chardelle Busch -
Number of replies: 30
Picture of Core developers
Since I seem to have become the new maintainer of this mod, I decided to go ahead and officially take over. 

I've added a new feature that creates a certificate with security.  If a student has Adobe, now, they cannot edit a certificate.  This was a problem before, since a name or grade could easily have been changed. All they can do now is print.

David had tried to get around this by adding his certificate block which allows teachers, etc. to enter a certificate code and verify who opened that certificate.  I've also gone ahead and updated this block.

Since Julian Ridden added this mod to the plugins database, I can't edit it.  So, I've made the new zip available online.  You can download it here
Simply place all files/folders in their appropriate folders in your Moodle installation and then click on the admin link from your site homepage to install.

Please test.
Average of ratings: -
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Art Lader -
Since I seem to have become the new maintainer of this mod, I decided to go ahead and officially take over.

Then it is in good hands! smile

-- Art
In reply to Art Lader

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
I'm not so sure about that.....but thanks Art, you're such a sweetie kiss.
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Julian Ridden -
I have updated the Zip with your current one.

Would you like me to delete this entry completely so you can add a new instance and become its maintainer?
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Alistair McQuade -
Good news, thanks for your hard work Chardelle. One other basic control issue remains: I believe that the user can create a certificate without taking the exam. Admittedly the certificate does not give a grade, but all of the other requisite information is presented and so the certificate system can easily be abused. Am I correct in this? If so, are there any plans to put a control in place to prevent this? E.g. the certificate can not be seen or there is a 'sample' watermark across exam certificate until the exam is actually passed.
In reply to Alistair McQuade

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
See the Conditional Activities forum.
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Alistair McQuade -

Hi Chardelle,

The certificate module is working well, Thanks! But I'm getting this error in the main admin section which relates to the certificate. I've seen that one or two others have it but can't find a fix:

Version mismatch: certificate can't downgrade 2006050900 -> 2005082400 !

I was on Moodle 1.5.2 and am now on 1.6. Do you have any ideas/pointers?

Thanks

Al

In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Colin McQueen -
This is great news Chardelle  big grin.

Installing this version by simply copying over meant that the lang files didn't go into the en_utf8 folder. I had to manually move them. Also there is a small spelling error in the first string in the certificate.php en_utf8 lang file.

$string['autopreview'] = 'Allows you to turn on/off preview of certiface certificate while making changes.';

Otherwise, brilliant stuff. I will try to include this in my courses next week. Nb. First time I will be using Moodle for a complete days training course.
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Chris Collman -
Picture of Documentation writers
Hi,
We  award training hours (grades/scores qualify a student to receive the credit for training hours via activity locking but these are not included on the certificate) for a course.  My site administrator has created a series of certificates templates, each with a different number of training hours.  One of these is associated with a course. Students print a copy of their certificate and give it to their organization's training coordinator. 

Is there another way?   Just checking.  Assume others who deliver professional development might have similar issues. 

Chris
In reply to Chris Collman

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
Thank Colin, I just updated David's work so I won't take credit for that typo wink--fixed now.

Sorry about the version mismatch Al.  I forgot to update version.php.  Try this one.

And Chris, since the mod pulls stuff from the db, then you could create a db table for each course that holds the number of hours, or, it might be possible to get the course ID number to print on a certificate and you could use that to hold the number of hours.

I have posted some activity locking code that should work in 1.6 with the certificate, you can try it here:  http://proemployees.com/ActivityLockingWithHide-1.6.zip

You will need to manually create/update the db tables (the easiest way is to use phpMyAdmin to import the included mysql file).
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Chris Collman -
Picture of Documentation writers
Thanks Chardelle,
I will pass on your idea of creating a db table.  I think we use the course ID but maybe we can get creative with our naming convention  IS1001-6hrs or something.

I will also look at ActivityLockingWithHide for 1.6 when I get to work on Monday.   Is this a link I can add to MoodleDocs?  

Bless you for all your work, it is appreciated by all.   Chris
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Jason Grey -
Thanks Chardell

I will try to download the new upgrade for the certificate. Also i have upgraded my moodle from the 1.5. To 6 it was very easy to do. Just in a matter of hrs it was upgraded i just followed the intstructions to install it and it was completed smile.

Do i have to remove the old files from my server to make this new one work?

Jason
In reply to Jason Grey

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
Update:

The new file for security protection for the certificate mod has now been added to the lib/fpdf folder in Moodle core (stable 1.6).  I've updated the download of the certificate with security to reflect this.  There is one changed file:  mod/certificate/view.php. which I've attached here. If you downloaded the certificate with security within the last few days, you can now delete the lib/fpdf/fpdf_protection.php file--it has been replaced with lib/fpdf/fpdfprotection.php smile.
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Colin McQueen -
I have installed the latest download of this module and I get the message below where the preview or certifiate should be. Any ideas?


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@hias-ict.org.uk and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Apache/1.3.36 Server at www.hias-ict.org.uk Port 80
In reply to Colin McQueen

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
Hi Colin,

I'm not sure what you mean by preview or certificate.  Do you mean when you click on a certificate link?  Also, did you have the certificate installed before?  If so, you might need to delete it and start with a fresh install.  And, did you click on the admin link after uploading?
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Colin McQueen -
Thanks for the help Chardelle

  1. Yes I have installed so the tables are there.
  2. This is on a fresh Moodle of 1.6 and is the first install of any non-standard module (or block)
  3. I went to settings for the module and switched on the preview so you see the certificate alongside the settings for an certificate activity.
  4. The error occurs in both places i.e. in the space where the preview should be and when you click on the activity link to see the certificate
Would the security block have something to do with this? I'm not sure how the two are meant to interact?

I'm also not absolutely sure I have put all the files in the right place. With my hosted system it's really awkward to copy over folders. I ought to get myself a better FTP client or maybe use Dreamweaver I suppose. My host doesn't support CVS.


BTW. Sorry about my mispelling certificate in my original post wink I have found another very minor typo in the module. The filename for the Quality seal is Qaulity. Wish my eyes and brain could as easily spot the solution to my problem sad
In reply to Colin McQueen

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
Hi Colin,

I took another look and cleaned up some "funkiness" in certificate/mod.html that had to do with the preview function.  Please replace that file and let me know if it fixes the problem.

As for the files, with the latest downloads of the mod and 1.6, you should only have the certificate folder that goes in the moodle/mod folder, and the language files.

The validation block acts just like any other block and is optional, it should not have any effect on the mod.

And thanks for the typo alert, we'll get all of them eventually.

Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Colin McQueen -
Thanks again Chardelle this file helped with a different issue regarding the preview but did not fix my big preoblem. I have uninstalled and reinstalled and this has fixed it. I think I may have not copied fully the fpdf folder in lib the first time round. All working nicely now  big grin

Sometimes just having someone taking an interest inspires and keeps you going on trying to find a solution. Cheers approve
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Keith Wilkinson -
Am I missing something. I don't seem to have the fpdfprotection.php file in the library, just one file fpdf.php

The certificate fails with the error that view.php cannot find the fpdfprotection file and then it cannot instantiate the object (understandably).

I have obviously missed something or failed to install something correctly. Any help please
In reply to Keith Wilkinson

Re: Certificate for 1.6 with security

by Chris Collman -
Picture of Documentation writers
Hi Keith,
I think Chardelle answers your question on Monday, 26 June 2006, 11:06 AM  in this thread.  She included a view.php file and said:

"The new file for security protection for the certificate mod has now been added to the lib/fpdf folder in Moodle core (stable 1.6).  I've updated the download of the certificate with security to reflect this.  There is one changed file:  mod/certificate/view.php. which I've attached here. If you downloaded the certificate with security within the last few days, you can now delete the lib/fpdf/fpdf_protection.php file--it has been replaced with lib/fpdf/fpdfprotection.php smile."

Hope this helps. 

In reply to Chris Collman

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
Thanks Chris, that is correct.

Unfortunately, the fpdfprotection.php file did not get into Moodle core until a few days after the 1.6 stable release.  If you are missing this file, here it is.  It should go in the lib/fpdf folder.
Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Tony Ruggiero -
Chardelle:

I am getting this error in both the preview window and when I click on the certificate as Admin:

FPDF error: Some data has already been output, can't send PDF file

??

Thanks,
Tony

Moodle 1.6.1
Linux
In reply to Tony Ruggiero

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
Hi Tony,

Try going to the mod settings and disabling the preview option. 
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Ralph Blakeslee -

Hi Chardelle,

I am getting the same error:

Warning: Invalid argument supplied for foreach() in /home/rgbralph/public_html/campus/mod/certificate/lib.php on line 493

Warning: Cannot modify header information - headers already sent by (output started at /home/rgbralph/public_html/campus/mod/certificate/lib.php:493) in /home/rgbralph/public_html/campus/lib/fpdf/fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file

This is happening when I click on the certificate link, as well as in the administrative preview window.

Ralph

BTW - just got back from the Grand Canyon - you guys out west have it great!

R.

In reply to Ralph Blakeslee

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
Hi Ralph,

You probably have the certificate set to print the teacher name, but the course has no teachers.

I'm doing a huge re-work of this mod, and in the next release these errors won't occur smile.
In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by Ralph Blakeslee -

Thank you Chardelle...

If I had looked a little closer I would have figured it out blush.

Let me know if I can help.

Ralph

In reply to Chardelle Busch

Re: Certificate for 1.6 with security

by John Dell -
Hi Chardelle,

Any idea when your rework will be available?

Would you be interested in sharing your work before, or exposing via version control?  (I also have my own subversion server if that would help).

I have tinkered with this in the past, and will be setting up a fresh moodle 1.6 with AL/Cert for a new client shortly.  I am willing to help with code and test.

Thanks,
John 
In reply to John Dell

Re: Certificate for 1.6 with security

by Chardelle Busch -
Picture of Core developers
Hi Jon,

The new version is available from a link at the top of this thread:
http://moodle.org/mod/forum/discuss.php?d=51494

Testing is welcome.  I have fixed a couple of bugs that I have not uploaded yet.  I'm still getting a couple of debug errors for variables that are not available that need to be fixed for mod grades and teachers.