Certificate 3.1 Beta ready for testing

Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Number of replies: 105
Picture of Core developers
Okay,

Here's the new and improved certificate mod.  It's officially version 3.1 (3.0 being the last one I posted and the first one for use in 1.6).  Download

Unfortunately, because I have basically rewritten everything and made so many changes, this version will have to be a NEW install.  That means you will have to unstill your old mod first.  Sorry, but it couldn't be helped.  But, from now on, any changes made will be with an upgrade.

You can read the README and help files for more info, but some of the major changes are:

Certificate data now has its own identifying id (now can have more than one in a course and can backup userdata to another course..).
Full backup/restore. 
Teacher reporting.
Student certificate review.
New print functions for letter format (and all aligned now, I hope).
I've made the border images jpegs so they are about 1/2 the size.

New certificate options:

Email teacher alerts.
Save: Can choose to save students' certificates in moddata (and a link to the file is available from the teacher report).
Delivery:  Open in browser, Force download, email.
Print Date: Added course end date, more can be added in the future (I've run out of time for now).
Date Format:  Updated for unicode.
Print Code: Updated.
Grade Format: Added three formats-- points, percentage, letter

I've also made it easier for certificates to be customized.  Four default types are now in the type folder.  New types can simply be added to the folder and uploaded without having to change any of the core code (and their own language strings added to the lang file).  So, every teacher could have their own certificate and change the text.  I've also put the letter grade parameters and the date formats into the type files so they could also be customized.

Testers with testing sites are needed!  You can just drop the whole certificate folder into your mod folder and upload--no need to do anything else (except first delete any old files).  There are now so many options and permutations, it's hard to test everything.  I especially need testing in other languages to make sure the date formatting is working.

Also, I did not update the postgres file, William Caban--if you could do that again it would be great.
And, Anders Berggren, if you would like to translate the new lang file again I'll add it.

It also needs to have a cron function someday, for now, emails are "just sent".

Enjoy!
Average of ratings: -
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Mark Brown -

Thanks for the update - I'm eager to test this out for you.  First error appears below. Am I missing something or done something wrong?

Warning: main(/var/www/vhosts/ehc.switchedonlearning.co.uk/httpdocs/mod/certificate/type//certificate.php): failed to open stream: No such file or directory in /var/www/vhosts/ehc.switchedonlearning.co.uk/httpdocs/mod/certificate/view.php on line 52

In reply to Mark Brown

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Mark,

Thanks for testing.  No, it's not you, I made a last minute db change and must not have gotten all the new files into the zip.  (This has officially driven me crazy, I can't even spell certifitacte anymore wink)

Would you please delete everything, and start over?
(BTW, since moodle.org is googled, you might not want to have your email address as your username, location...)

Thanks
Chardelle
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Michael Winter -

Just downloaded and installed as we are keen to have a look. Have not installed this module before but all seemed to install fine. Made a certificate and that worked ok ...so I went in to change some things ...saved it and then an error came up ...sorry didn't write it down ...tried a different user on different PC and this comes up.

Warning: Invalid argument supplied for foreach() in C:\ourmoodle\mod\certificate\type\landscape\certificate.php on line 145

Warning: Cannot modify header information - headers already sent by (output started at C:\ourmoodle\mod\certificate\type\landscape\certificate.php:145) in C:\ourmoodle\lib\fpdf\fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file

I am quite sure thats what came up the time before too but can't be completely sure.

Also I am not sure if I installed it wrong but the icon is missing next to the certificate. The address the icon points to is http://(server)/theme/(ourtheme)/pix/mod/certificate/icon.gif and there is no certificate folder in the mod folder. Was I ment to copy that there ?

Michael

In reply to Michael Winter

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Michael,

Thanks for testing.  Well shoot, I thought I had fixed that error, I'll try again.  What it is is that you have chosen Yes for print teacher, when there is no teacher for the course. 

As for mod icons, if you have your theme/config file set to custompix = true, then you will have to have a folder with the module icon in it in the theme pix/mod folder.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Michael Winter -

Nope I think you are right ...there was no teacher and I set it to print teacher.

smile

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Colin McQueen -
Hi Chardelle

Thanks for this module re-write.

I have uninstalled the old one including the mod/certificate folder then installed this one from the link above. I have a course with a teacher but I get:-


Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\moodle1-6\lang\en_utf8\lams.php:56) in c:\program files\easyphp1-8\www\moodle1-6\lib\fpdf\fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file

when either admin, a teacher or a studnt tries to get the certificate. This happens even if I choose not to print teacher. Any ideas?
In reply to Colin McQueen

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Colin,

This is an unfortunate side effect of fpdf.  What happens is that if there are empty lines after the last ?> in a php file, then you get this error message.  If you open up the mentioned file (lang\en_utf8\lams.php) and delete the empty lines at the very bottom of the file, then it will be okay.  I posted a bug request awhile back for Moodle coders to try to not have any empty lines at the end of files, so hopefully they will be more careful smile.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Colin McQueen -
Thanks Chardelle. I found an empty line on the lams.php file and removed it. now I get :-

Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\moodle1-6\mod\wiki\blocks\lib.php:13) in c:\program files\easyphp1-8\www\moodle1-6\lib\fpdf\fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file

But there is no empty line at the end of the mod\wiki\blocks\lib.php file?

What is the significance of the number at the end of the path? It was 56 before with the lams.php file but now it's 13 with the lib.php file. It can't be line numbers as the lams.php file only had 29 lines.
In reply to Colin McQueen

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Colin,

You're having fun with this.  Yes, the number does refer to the line.  In my editor, the lams file does (did) have a line 56 (there are some blank lines that may not show up in your editor?).

Anyway, now to your next problem.  I do not have the file you refer to--so it must not be Moodle core?, and I can't look at it.  However, fpdf will also generate this message if there is an empty line with spaces.  So, you will have to go through the file and look for them.  I will assume that the code probably has some blank lines that include some spaces in them, so something like this:

this is a line of php code
  (there are two empty spaces at the begining of this line that you can't see)
this is another line
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi again Lester,

Hmmmm... I'm thinking that maybe I should start a course (on my site) that Moodle admins/teachers can take to get the certificate to work/look the way they need it to for their particular uses.  Would anyone be interested?
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Julian Ridden -
I have installed this code in The Playpen and also have to report the issue of 'Some data has already been output'.

There is a techer assigned to the course. Ill message you with teacher access so you can test it yourself if you like to see if I have missed anything blindingly obvious.

Playpen is running 1.6.1 code.
In reply to Julian Ridden

Re: Certificate 3.1 Beta ready for testing

by Will Muenchow -
Is there a way in the new Certificate Module so a user can type the name they want to appear on the certificate?
In reply to Julian Ridden

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Colin,

If what you posted is the way it is in the file, then there should not be any line break at the end of line 12--it is breaking up the line of php code.  You will also get those errors if anything non-php (like html, etc) is output.  Try making that one continuous line of code.

Thanks Julian,

I'll take a look--Do you have debug turned on by any chance?  If you do, that could be it--I'm still debugging, so with debug turned on you will get errors.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Will,

I'll look into creating a new type for this.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Michael Winter -

Don't know if this is your module problem or my test server problem but this error comes up when I create a certificate.

Notice: Undefined property: stdClass::$redirecturl in E:\moodle\course\mod.php on line 178

 

I downloaded the latest version today from the Modules and plugins database.

Michael

 
In reply to Michael Winter

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
That's really odd.  I don't think that version of the mod has a redirecturl.  Anyway, if you have debug on, you will probably need to turn it off.  That version was never debugged.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Michael Winter -

ok thanks ...it does have debugging on as its a test server.

Michael

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Grady Batchelor -

Chardelle,

I would be interested.  What file is it that gets edited to change the wording on the certificate?

Grady

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Colin McQueen -
Thanks again for your help. There are no blank lines with spaces. I'm used to looking for such things so I'm positive. However there is a tab on th offending line 13. See below. Unfortunealey this doesn't solve the problem. If I delete the line altogether I get the certificate?

Any ideas?

11 //import tree javascript
12 echo '<SCRIPT src="'.$CFG->wwwroot.'/mod/wiki/blocks/tree.js" type=text/javascript></SCRIPT>
13 tab<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/mod/wiki/blocks/tree.css">';
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Caio Moreno de Souza -
Hello Chardelle,

That's so cool!!!! Great job!!!! I did not installed yet, but I can see that everyone is enjoying.... I want to test it and translate to Portuguese and then send it to you and put it here.

But first I want to know what Moodle version should I use? and waht is the latest certificate 3.1 final version???

I am excited to test it here.

Cheers,
Caio Moreno de Souza
In reply to Caio Moreno de Souza

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Caio,

Yes, if you can update your translation, that would be great!

This version requires Moodle 1.6 (you won't be able to install it on any earlier versions). 

>>>waht is the latest certificate 3.1 final version??? <<<
I'm not sure what you are asking, but the link posted at the top of this thread is to the latest update of certificate version 3.1.  I'm calling it beta until it gets tested.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Here's the latest on printing teacher names:

I've struggled with this one for some reason.  I just uploaded a new zip with some fixes.

1.  Fixed it so no errors if no teachers (I think.  I did this before but.....).

2.  I've updated the certificate.php files so that the certificate will print the first three teachers in a course in order (they must each have a different order set or they will print on top of each other).



In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Lester,

>>>I would still like to produce repeated certificates for quiz re-attempts as we have requirements for rolling refresher training i.e. certificate expires in 12 months and the assessment needs to be re-taken.  <<<

I'm not sure what your question is here.  But, see if this helps.
1.  Create a new certificate for each quiz attempt?
2.  If a student's grade changes, then it will change on the certificate.  The only things on a certificate that WILL NOT ever change once a student has created a certificate, is the code number and the date.  If you do want these two things to change each time a student clicks on a certificate, then you can create a custom certificate type for this.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Lester Cunningham -

Chardelle

I really appreciate your work on this development.  I provide on-line training for the NHS (National Health Service) in the UK where staff have to undertake mandatory training at regular intervals.  For example all staff must do 'Fire Safety' and 'Infection Control' training every 12 months, and be able to prove their competence. On-line training provides this facility but after they get their dated certificate they must do the on-line assessment again in 12 months and get another certificate to prove that they are still competent.  I know this is not the usual 'academic' approach but is very common in this working environment.  I think your certificate facility is wonderful but I am struggling to make it fit.  If I have a final assessment quiz that is based upon 'latest grade' then I want to be able to generate an up-to-date certificate to prove that I have achieved a valid qualification to surpass anything previously achieved without having to set up a new course.  I'm sure this is possible but just need to work out how to do it.  I hope I have explained myself clearly - any help from anyone is much appreciated.

Lester  

In reply to Lester Cunningham

Re: Certificate 3.1 Beta ready for testing

by Vikram Solia -
Hi Lester!

Have been doing some customisation for the certificate module myself for a client.  The first view by a user of the certificate inserts a record in the database.  Subsequent views of the certificate check for the existence of this record but do not change it, neither insert a new record.

In your case, a new record could be inserted if the old record is at least twelve months old with the new scores.  Keeping the old records will also be a bonus in case old certificates have to be recreated.

In reply to Vikram Solia

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Just to let you know.  I am working on reconfiguring the certificate mod to use a new pdf lib since the current one does not support unicode, so, lang strings, dates, and names with umlauts and characters do not get printed correctly.  Here's a look.
Attachment unicodecert.gif
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Rhonda Goetz -

Hi I installed it and when I went to the admin I got this:

1146: Table 'testcza.mdl_certificate_issues' doesn't exist

         
      
   


Error

Then said installed correctly.

When I tried to set up a certificate, it gave me all the options, but when I finished it told me it could not make an instance of the certificate.

Any ideas?

Rhonda

In reply to Rhonda Goetz

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Just checking Rhonda,

Did you delete the old mod first?  I made so many changes to the db, this needs a fresh install. 
In reply to Vikram Solia

Re: Certificate 3.1 Beta ready for testing

by Lester Cunningham -

Hi,

Thanks for your advice.

A simple option for me might be to produce a certificate for every quiz attempt and to show only the latest one. I have already set the Grade letters to "Pass" and "Fail" so I'm sure I could create a function to check for this before deciding to create a new record.  Can you direct me to the file and area of code that makes the decision to create a new certificate record, and also how it decides what to display?

Many thanks.

Lester

In reply to Lester Cunningham

Re: Certificate 3.1 Beta ready for testing

by Vikram Solia -
Hi Lester!

the function you are looking for is check_cert_exists in the file lib.php in the moodle/mod/certificate directory

you might like to search for the line:

function check_cert_exists($course, $user) {

Hope this helps!
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Caio Moreno de Souza -
Hi Chardelle,

Thank you so much!!! I will test it.

Best Regards and good work,

Caio
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Caio Moreno de Souza -
Hello,

Some bugs:

First

<?PHP

function certificate_upgrade($oldversion) {
    global $CFG;
   
    if ($oldversion < 2006070400) {

    return true;
}

// Chardelle Busch you forget this "}" I added it for you. Simple mistake. smile
}
?>

Second
ERROR: Could not instantiate mail function. FPDF error: Some data has already been output, can't send PDF file

I attached the certificate version 3.1 that i used it.

Best Regards,

Caio
In reply to Caio Moreno de Souza

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Thanks Caio,

1.  That file isn't being used right now, so I didn't pay much attention to it, thanks.

2.  As noted above, the mod has no cron function, so when a student creates a certificate, it sends out the emails.  If for some reason the email can't go out (for example if you are on a localhost not hooked up to the internet), then you will get the could not instantiate error.  Do you know why the email might not have been sent?
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Alvin Shaffer -
So Far So Good - No Errors to report

GREAT WORK!
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Lester Cunningham -

Thank you for the update.  And I'm not Mark so I dont know how that happened!!

Re: Certificates - If two or more teachers are assigned to a course and the teachers name is added to the certificate, it is the last one listed that appears.  Logically I would think it should be the first one listed.  Minor point but hope it helps.

I would still like to produce repeated certificates for quiz re-attempts as we have requirements for rolling refresher training i.e. certificate expires in 12 months and the assessment needs to be re-taken.  If anyone has any suggestions how this can be done I would be most grateful. 

Lester

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Ralph Blakeslee -

Chardelle,

Once again you hit the mark! 

The module installed easily and works well.  No errors.  Now I just need to integrate the locking activites hack.

Thanks for all you hard work

Ralph

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Grady Batchelor -

I am getting the following error when I change pages from where the PDF is displayed.

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

In reply to Grady Batchelor

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Grady,

You can change the wording by editing it in the lang/certificate.php file at the bottom.

Could you tell me a little more about what you are doing when you get the error message?  I'm not sure what you mean by "change pages".
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Grady Batchelor -

Chardelle,

I get the error when I use my back button on the browser after having filled in the blanks and saved the certificate form in the admin side of the activity. 

Grady

In reply to Grady Batchelor

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Grady,

I was unable to reproduce an error (although I don't know why you would ever use the back button after adding an activity).  However, you might try upgrading to the latest upload (from the link at the top of the page).  This version should now be debugged.
In reply to Chardelle Busch

Re: Unicode Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Anyone using symbols, characters, or umlauts in their language, strings, etc. who would like to test the certificate mod for unicode you can try it here.

Download

You can simply paste this folder into your mod folder and upload (it can replace the current beta test if you have it installed already--no need to uninstall it).  You will see one new type in the type folder called Unicode Landscape.  Use this type to test the unicode.
In reply to Chardelle Busch

Re: Unicode Certificate 3.1 Beta ready for testing

by Rhonda Goetz -

Ok, I deleted out the old one and added the last one posted.  Everything is fine until I try to download or open in a new window.  Then I get this:

FPDF error: Could not include font metric file

BTW, great improvements to this mod.  Great work!

Rhonda

In reply to Rhonda Goetz

Re: Unicode Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Rhonda,

Thanks.  As for the error--oops, I forgot something in the tcpdf/font folder--it's been fixed now.  Please try it again.
In reply to Chardelle Busch

Ang: Re: Unicode Certificate 3.1 Beta ready for testing

by Jens Gammelgaard -
Picture of Translators

Hi Chardelle,

I downloaded the great hack, from the link in your post of the 28 August, today...

But I am getting the same error as Rhonda.

Could you advice where to find the update in the tcpdf/font folder?

Thanks wink

In reply to Jens Gammelgaard

Re: Ang: Re: Unicode Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Jens,

All files should be in there.  Make sure you choose the unicode_landscape type for the certificate, it is the only one that works with tcpdf.  (The files that were missing were the .ctg files for each font--make sure they are there)  Make sure everything from the file has been uploaded--you keep the tcpdf folder under the certificate folder--it does not go into the lib folder.

I can't think of what else could be the problem.   
In reply to Chardelle Busch

Ang: Re: Ang: Re: Unicode Certificate 3.1 Beta ready for testing

by Jens Gammelgaard -
Picture of Translators
Hi Chardelle,

Thanks - now I have chosen unicode_landscape and now I get this error:

TCPDF error: Could not include font definition file

- What is the name of that file, Chardelle?

Thanks again.

BR
Jens
In reply to Jens Gammelgaard

Re: Ang: Re: Ang: Re: Unicode Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Okay, thanks for testing this Jens, now I figured it out--I forgot to make the change in a file after I was done testing!!!!! Sorry, I did not want to put the tcpdf file into the lib folder yet, since there are still a couple of issues to work out.

Replace the certificate/tcpdf/config/tcpdf_config.php file with this one.
In reply to Chardelle Busch

Ang: Re: Ang: Re: Ang: Re: Unicode Certificate 3.1 Beta ready for testing

by Jens Gammelgaard -
Picture of Translators
Chardelle, smile Thank you - that did the job.
In reply to Chardelle Busch

Re: Ang: Re: Ang: Re: Unicode Certificate 3.1 Beta ready for testing

by Stelios Tserkezis -
Well this did the job, sorry that i have asked the same question. But my only problem is that it did only the half job. As you can see at the pic it only translates right the title the strings from the database (course and name) but i cannot translate the phrase "This is to certify that..." Why?? What am i doing wrong??
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators
Hi Chardelle,

thanks for your phantastic work. I tried the new beta version and get thesame old problems with german special characters (Umlaut äöüß) They are not shown correct and chganged with other signs. Any idea?

I tried it with local system on windows with 1.6 and on linux with 1.6.

Ralf
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Monico Briseño -
Picture of Testers
Chardelle, first thank you for your great job with the certificate module. I just installed on our testing server and it works good.  Second, I'm going to translate into Spanish version to see how it works.

Cheers

Mónico
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Ralph Blakeslee -

Chardelle,

If I want to add a logo larger then the 150x150 pixels, without it appearing to be "squeezed" which file should I be looking at?

Thanks again.

Ralph 

In reply to Ralph Blakeslee

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Another great featuresmile I've added to this version is the ability to customize the placement and size of images for each type.  So, look in your type certificate.php file at the bottom under Add Images.  You'll see print_seal.  The numbers at the end of that line are the x and y placement, and width and height.  You can change those to fit.
Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Ralph Blakeslee -

Brilliant!

I am having fun playing around with the pixels numbers, etc....

I just want to let you know that occasionally I get the following message:

Warning: Cannot modify header information - headers already sent by (output started at /home/gover4/public_html/campus/lib/fpdf/fpdf.php:1028) in /home/gover4/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 happens when I have am viewing a certificate, and I hit the "Review your certificate" button, or sometimes hitting the back button on the browsers. 

Just one more thing...thanks. This is great stuff.  My wife and I are having a great time with our courses and  you and the rest of the Moodle crew have helped us enormosly.  Incidentally, she is working on her PhD via Capella.  She just finished a class in designing online communities where Moodle was mentioned several times and will be starting a delivering distance education class this fall.

Ralph

 

In reply to Ralph Blakeslee

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
I haven't been able to reproduce the cannot modify header error when using the browser back button.  If anyone has more info on this, please let me know.  E.g. what exactly is going on when it happens, and what browser you are using.  This is caused by browser caching.  
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Ralph Blakeslee -

I am using IE 6, and it happens when I am viewing a certificate using the "Review your certificate" button.  After the the certificate loads in the viewing box, if I hit the back button the browser I get the message.   If the certificate is not showing in the box and I hit the back button the message does not appear.

Ralph

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by zsolt im -

Hi,

I have the same problem, at "Review your certificate" this is the message:

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

no other messages, no other warning (full debug turned on in moodle, and at php level also, no warning on secreen, no warning in phperror file.)

I use moodle161+, on xampp (on Winxpsp2), language: hungarian (this is the reason why I need this beta release)

In reply to zsolt im

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Ralph and zsolt,

I still cannot get this error, however, since it seems to occur only with review, would you please try something.  In your type/certificate.php file, on about line
14 would you find these lines:

//Review certificate
if($certrecord && !isset($_REQUEST['certificate'])) {   

and try changing the word REQUEST to GET and see if that makes any difference.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Ralph Blakeslee -

Chardelle,

I made the change.  Not that this makes any sense, but it seemed to lessen the number of occurrences, but not delete them completely. 

Thanks

Ralph

In reply to Ralph Blakeslee

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
I'm thinking it's a browser caching issue.  The request command may have been sending data to the browser cache.  So...... maybe if you cleared your browser and tried again.  Let me know.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by zsolt im -

Hi Chardelle,

thoughtful, cahce cleared, "REQUEST" changed to "GET", but : same error.

Is it impossible to issue an "UTF-8 compatible" version of "official" certificate module (which is version 2 and is downloadable from moodle site) ?

My problem with the old one is just the usage of national characters. (For example I think the certification query block is a great feature of the old version)

BR

Zsolt

In reply to zsolt im

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
UPDATE

I've made some updates to the certificate. 
1.  I found some strange behavior with printing the code--in certain browser situations, a code different than the one in the db could be printed on the certificate.  It is recommended that you download the latest zip from the link at the top of this post (and the unicode download zip in the middle of this post if you are using the unicode type) to make sure you don't have problems.  The changed files are the certificate view.php file and each of the type/certificate.php files.

2.  I made some further changes to the type/certificate.php files that MIGHT solve the error message problems with the review link.  Those of you getting these messages, please test.  If this doesn't solve it, an option is to delete the section of code in the type/certificate.php files labeled: //Review certificate and see if this helps.

3.  I updated the old certificate validation block to work with this new version.  It is included in the zip download at the top of this post.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by zsolt im -

Hi Chardelle,

new version installed as you described.

The new error message:

"Warning: Cannot modify header information - headers already sent by (output started at C:\xamp\xampp\moodledata\lang\hu_utf8\choice.php:1) in C:\xamp\xampp\htdocs\secportal\mod\certificate\tcpdf\tcpdf.php on line 2466
TCPDF error: Some data has already been output to browser, can't send PDF file"

 

 

In reply to zsolt im

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
See this post above http://moodle.org/mod/forum/discuss.php?d=51494#235730 and look for blank lines at the end of the lang file noted in the error message.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by John Brady -

Just a simple thank you for all your hard work on Certificates.

Thank you

In reply to John Brady

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
That's nice of you John.  I do appreciate everyone's comments.  And yes, it was quite time consuming.  It's not perfect yet, but this is a huge step closer to getting this mod added to the core smile.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by John Brady -

Thanks again for all the work.

If I don’t have a Quiz in the Course, I get the following error message (see below) . When I add a Quiz with no questions the Certificate displays fine.

The Certificate setup is default.

It happens when you select the Review the Certificate button.

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

In reply to John Brady

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Thanks for the report.  That one somehow slipped through the cracks.  I've added a fix to certificate lib for this.  Here is the new file.  Please test.
In reply to Chardelle Busch

FYI Certificate 3.1 seems to work in 1.7

by Chris Collman -
Picture of Documentation writers
Hi Chardelle,
Got a clean copy of 1.7 up on one of my local hosts today.   Looks like certificate 3.1 works just fine.   

AL does not sad 
In reply to Chris Collman

Re: FYI Certificate 3.1 seems to work in 1.7

by Chardelle Busch -
Picture of Core developers
Thanks for the report on 1.7 Chris, good to know. However, bad news about AL.  Could you maybe let us know which exact version of AL you tried? Or, where you got it?
In reply to Chardelle Busch

Re: FYI Certificate 3.1 seems to work in 1.7

by Ahmed Metwally -

Hi Chardelle,

I got the same error above:

Warning: Division by zero in F:\moodle\moodle\mod\certificate\lib.php on line 569
FPDF error: Some data has already been output, can't send PDF file

I have already replaced the lib.php as you referred, but i still get same thing. So, please what do you think?

Thanks a lot.

In reply to Ahmed Metwally

Re: FYI Certificate 3.1 seems to work in 1.7

by Chardelle Busch -
Picture of Core developers
I don't know Ahmed. I am no longer able to get this error message.  Could you give me more information?  What is the version and last updated date of the certificate mod you are using?  What options have you chosen in the certificate when you get this error?  Do you have any graded mods in the course? What certificate type are you using?
In reply to Chardelle Busch

Re: FYI Certificate 3.1 seems to work in 1.7

by Ahmed Metwally -

I’m using the one that exists in the top of this page. Yes I have graded quizzes. I chose the normal options and most of them “No” as in the attached picture.

Attachment cert.gif
In reply to Ahmed Metwally

Re: FYI Certificate 3.1 seems to work in 1.7

by David Edwards -

Can you send me the link to download this Certificate 3.1 module.

I have been working with the old one but would like to try this version and can not find it anywhere.

Thanks

In reply to Chardelle Busch

Re: FYI Certificate 3.1 seems to work in 1.7

by Chris Collman -
Picture of Documentation writers
Sorry for the double post.   It did work for me in 1.7 Dev but I did a clean copy of the complete install package of  1.7 Beta and it does not work.

Not very helpful pink bar "This SQL relies on obsolete tables! Your code must be fixed by a developer."   I definately would have noticed that before.   I will see if I can figure out how to turn on the advanced debug feature in 1.7 and see if it gives me more details.

Yeah, when I clicked on the certificate activity  a full screen of strings and stuff. I can post if you want.  

Went back to Admin block in 1.7 and Modules and clicked on Certificate settings. it is not finding something because it said:
certificate_autopreview:
Notice: Undefined property: stdClass::$certificate_autopreview in F:\Webserver\moodle\mod\certificate\config.html on line 12
No Yes
autopreview

  Changed the No to Yes and the error went away but the {{autopreview}} remained, as the the page of developer debug info when I clicked on the certificate in my course.

Funny that it would work in Dev version but not in Beta.   I was pretty careful before making my previous post.   I think I did things exactly the same way. 

sad
In reply to Chris Collman

Re: FYI Certificate 3.1 seems to work in 1.7

by Chardelle Busch -
Picture of Core developers
Chris -- I just had a look at 1.7 today.  Yes, there are going to be a few things that developers will have to update in their add-on mods in order to get them to work in 1.7.  (The autopreview thing is actually obsolete and shouldn't even be in the config file--I just never deleted from there--hence that error message). 

zsolt--glad that worked.

Ahmed--I have an idea why you might still be getting this error, but I can't test it since I can't get the error message--I will send you an email with more info.
In reply to Chardelle Busch

Re: FYI Certificate 3.1 seems to work in 1.7

by Chris Collman -
Picture of Documentation writers
Thanks Chardelle for your efforts.   I gather it is more than "just" the autopreview, which would put it out of my abilities as a tweaker.   

I was starting the campaign to use Lesson contingency instead of AL, so we can upgrade to 1.7.  We like AL because it does more than the Lesson contingency but Certificate is an element we can not do without.   It is going to be one of those races between my site administrator's time and the comfort level with what ever version of Moodle. 

Let me know if you want me to test anything.   Best -  Chris

In reply to Chris Collman

Re: FYI Certificate 3.1 seems to work in 1.7

by Chardelle Busch -
Picture of Core developers
David -- please read the first post in this thread.  The download link to the latest code is there.

Chris-- I'll let you know when I find out what needs to be done for mods to work in 1.7.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by zsolt im -

Hi Chardelle,

errors in langugae files corrected.

Cert. module works fine.

I'd like JUST TO SAY THANK YOU FOR THE JOB !!!

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by David Edwards -

I just downloaded this and installed into on 7.1 version. Everything works so far as I can see.

Only thing I noticed was when you want portrait certificate the signature line is above the grade mark. The only way I could fix this is by going in and editing line 840 and replace the $x and $y with 100, 620 which then moved the signature line down where I wanted it.

Also in your portrait area the graphics did not display. You forgot to change the .png to .jpg  you may want to change that in your newer version.

One thing I would like to see if at all possible is the certificate code to be placed under the seal or have an option to place it some where.

I really like this mod great work. I like the fact you can do landscape and portrait.

 

In reply to David Edwards

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi David,

Please note the certificate posted here does NOT work in the latest stable verison of 1.7.  At Chris's insistance wink I am updating it now and will post the 1.7 version later today.

Thanks for noticing the jpg goof--I'll fix that.

As for "moving" things, please see the type/certificate.php file at the bottom and you can change the placement there.  For example, the code is 170 over from the left (and centered) and 500 down.  Simply change those two numbers to get it where you want.

Thanks for testing, and glad you like it.
Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Chris Collman -
Picture of Documentation writers
Chardelle,
You are so wonderful, I know you have modestly disguised that halo behind you as a Moodle clock.  "Tonight" is pretty fast turn around time for a volunteer.

Sigh, I will have to devote a few more hours in MoodleDocs and dedicate them to you !    

BTW I don't think my site administrator will make the decision for another 2 weeks.  

Seriously, thank you very much for all your efforts - Chris

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by David Edwards -

Thanks I realized that after posting the message. I did find one thing I can not figure out and that is when selecting yes for print teacher the teachers name does not appear on the certificate.

I looked at the position in the type/certifacate.php file and change the position to see what would happen but still no teacher name.

I will keep looking to see if I can notice anything.

 

In reply to David Edwards

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
I've started a new thread for the verison for 1.7.

David, you'll need to download the version for 1.7 for the teacher name.

The latest download in this thread contains a couple of fixes--finally fixed the division by 0 thing when there are no graded mods in the course.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Murray Simon -
Hi Chardelle, I realised when I found this mod that there was a god.. so thank you for all your hard work..

I am running 1.6.2 and installed the mod - everything installed ok and so I went on to set up the parameters of a certificate for one of my courses and all went well - I then tried the course and it emailed me as expected and I can review the certificate.. So all is good, except one minor thing - the certificate is completely blank?

And one other issue - when I get the email which I have just realised is the email that was sent to the teacher and not the student -

(this is the content of that email:
Course has received their certificate: 'Eyecheck Operation Certificate' for Eyecheck Impairment Testing . You can review it here: Certificate Report.)

- the student email hasn't arrived,

and when I click on the Certificate Report link in the email I go to the site and there are the certificates  as seen here

Tuesday, 17 October 2006, 08:02 PM certificate.pdf:pdf.gif

and when I click on the pdf link I get this error message

Not Found

The requested URL /file.php/4/moddata/certificate/1/2/certificate.pdf was not found on this server.


Apache/2.0.46 (Red Hat) Server at www.training.cmm.com.au Port 80

I have read through the forum and didn't notice any references to this issue - could you help me please?

Thank you in advance..
In reply to Murray Simon

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Murray,

This does look odd. It appears that the certificate was issued to the admin user.  Were you perhaps loggedinas a student?  Could you please try again, but be sure to actually log in as a real student.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Murray,

You might check and make sure that the path to your moodledata folder in your config file is the correct path.

$CFG->dataroot = 'path on your server to moodledata'

Sometimes servers do not like the default file arguments settings. You could also try changing those by going to Admin/Configuration/Variables/ slasharguments: and try changing the setting there.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by David Cogg -

I have setup the new Certificate module 3.1 and have turned on the email notification to teachers (instructors). For some reason I cannot get the email to work, is other people having this issue or did I miss a setting somewhere?

From what I understand - if the "email teachers" box has "yes" then an email should be generated and sent to the teacher/instructor of that course.

Email is currently working for the forums that I have setup, so I know the email settings on the Variables page should be ok.

Any help would be appreciated,

Thanks

Dave

In reply to David Cogg

Re: Certificate 3.1 Beta ready for testing

by David Edwards -

I just tested my certificate 3.1 and it sent me an email like this.

David Edwards has received their certificate: 'Windows 2000 Pro' for Windows 2000 Professional. You can review it here: Certificate Report.

Make sure that a teacher is assigned to the course. I found that moodle 1.7 was having problems with assigning roles so I went back to 1.6.3 and this works.

In reply to David Edwards

Re: Certificate 3.1 Beta ready for testing

by David Cogg -
I have checked the course and I do have a teacher assigned, I am still unable to receive certificates. It doesn't make sense to me, as everything else seems to be ok..
In reply to David Cogg

Re: Certificate 3.1 Beta ready for testing

by David Edwards -

Have you varified your variables in the cofiguration. Under Mail and that your smtphosts , smtpuser and smtppass are set correct.

In reply to David Edwards

Re: Certificate 3.1 Beta ready for testing

by David Cogg -
Yes, at least I believe so, the mail is working for the forums. So it should work for the Certificate? Maybe I should remove the certificate and reinstall?
In reply to David Cogg

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
>>>the mail is working for the forums. So it should work for the Certificate? <<<


Possibly not, the certificate emails are not run through a cron function (that's on the to do list) whereas the forums are--so perhaps your server setup doesn't like this. It's worth checking your server mail logs to look for errors. You might also try setting the certificate settings to email the certificate to students and see if that email goes out.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by David Cogg -

thanks Chardelle, I will give that a try.

Dave

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Justo Ugarte -

Dear Chardelle:

First at all: THANKS.  Great module.

SECOND: I don´t have troubles with the module, except that, when I enter the code in the "verify certificate" block, it always says that the number can not be validated. I copy and paste the code from the report issued certificates. 

I follow these steps: 

1) Create an assignment

2) Create the certificate

3) Login as student and send the assignment

4) Login as admin and calificate the assignment

5) Login as student to get the certificate

Then, it appers in the report like issue certificate and i can't verify the code...

Thanks Chardelle, and apologyze for my bad english 

In reply to Justo Ugarte

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hello Justo,

Would you please look at the README text file in your downloaded files and check the date of the version you have. The latest uploaded version should say:

Latest Beta version uploaded 10/20/06

If yours is dated before this, please download the zip again and upload the new files, then try it again by creating and testing a new certificate.

If this does not fix it, please let me know.

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Justo Ugarte -

Chardelle:

Thansk again for your response. Here i Paste the readme file:

****************************************************************

Certificate 3.0 for Moodle 1.6

Latest Beta version uploaded 10/20/06

Version 3.1 2006081700
Increased length of course name record
General debugging and code fixes
Fixed symbol printing in course name, mod name and student name

******************************************************************

In this version, i didn't found the block, so i used the distributed i the prior version. (i had red it in one of the post i this forum).

Anyway, everithing looks fine, except that i can not verify any certificate, becausse all the codes  of certificates listed in the report "issued certificates" , once i verify them in the verify block, are reported like invalid certificates. I received mail verifications correctly.

Thanks for your help,

Justo Ugarte


In reply to Justo Ugarte

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Okay Justo,

I guess a better question would have been to ask if you had the latest block. Please try the one attached here.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Justo Ugarte -

Wonderfull!

It worked perfect, thanks Chardelle.

Justo Ugarte

In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Randy Vermaas -
Thank you for your module; it works great for me. I have installed the latest version of the certificate module.
The only problem i've got is the following: I configured my certificate to mail it to the user. When the user clicks on the "receive certificate" button the certificate pops up in a new window but doesn't get mailed. Any idea of what goes wrong? All other automatically sent mails are arriving normally. In the cron output there is no certificate activity; could that be the problem?

Server Time: Tue, 14 Nov 2006 12:33:42 +0100


Starting activity modules
Processing module function assignment_cron ...done.
Processing module function forum_cron ...done.
Processing module function journal_cron ...done.
Processing module function workshop_cron ...done.
Finished activity modules
Starting blocks
Finished blocks
Updating languages cache
Running backups if required...
 Checking backup status...INACTIVE
Backup tasks finished.
Cron script completed correctly
Execution took 0.182283 seconds

Kind regards,

Randy Vermaas
In reply to Randy Vermaas

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
Hi Randy,

Yes, that could be the problem. Currently there is no cron function written, email is just set to go out and it may not depending on your server setup.

If anyone would care to write the cron function that would be great, otherwise it might be awhile before I can get it finished.
In reply to Chardelle Busch

Re: Certificate 3.1 Beta ready for testing

by Randy Vermaas -
Hi Chardelle,

Thanks for your reply. Do you have any idea what could be the problem? It's not the server setup. In my new moodle version 1.7 the mail is sent; the pdf included.


In reply to Randy Vermaas

Re: Certificate 3.1 Beta ready for testing

by Chardelle Busch -
Picture of Core developers
That's a mystery since the mail functions have not changed. I'm glad to hear it is working in 1.7, though. I will plan on doing some testing tomorrow and I will let you know if I figure anything out.