Latest version of certificate module

Latest version of certificate module

by Nikki Macfarlane -
Number of replies: 107
Can someone point me in the right direction to find the latest version of the certificate module and also let me know whether or not it is compatible with Moodle 1.6

Thanks,

Nikki Macfarlane
Average of ratings: -
In reply to Nikki Macfarlane

Re: Latest version of certificate module

by Julian Ridden -
I would like to second this request.

There have been numerous posts over the last week looking for this. I am not sure who manages this project. But if you are the "one" and are reading this, please add your Certificate code to the new Modules and Plugins database so those that need it can fin it.

Many thanks
In reply to Julian Ridden

Re: Latest version of certificate module

by Eduardo Hernandez -

I have an idea that might help, I have used in the past.

I created a SCORM Flash movie with a customized look and feel, and since SCORM can retrieve the student name, you can print it on your certificate with a nice look.

I know I keep this movie Flash somewhere in my HD, but i will try to find it.

Eduardo 

In reply to Eduardo Hernandez

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
I'm going to be looking at the cetificate mod in 1.6 this week--since fpdf is now in lib, I will be making those changes.  I'll let you know when I have it ready to go.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Hi all,

Okay, I've updated the certificate mod for moodle 1.6. Since it's too big to post here, just send me an email with certificate mod in the subject and I'll send it to you. (Julian, if you want to add it to the mods db go ahead--I don't think anyone is actively maintaining it)

A couple of things to know:
1. This only will work with moodle 1.6+
2. I did not look at the validation block, however, the old one should work.
3. You will have to delete some extra lines at the ends of some files if you get any "Warning header already sent...." messages when you try to open a certificate. For example, in lib/fpdf, all of the files have two extra lines at the end (after the ?>) that have to be deleted (I've filed a bug about this).
4. This version includes some extras that were not included in David's.
a. If you choose to show the grade of an activity, the name of that activity is also shown.
b. You can choose to show a "course grade" which will put the total % grade from all activities on the certificate.
c. I have added a new certificate type called "Text Entry". You can use this type if you have information that you want a user to enter that will get printed on the certificate (and that does not reside in the db). See the screenshot for an example. The top image shows what the user sees when they click on the certificate, the bottom image shows the certificate they get when they click on "Get certificate" with what the user entered in the text boxes appearing on the certificate. Note that for this example I "hard coded" the words Supervisor and Department into case 4 in view.php. You will have to modify case 4 to suit your needs.  It is currently set up to have 1 to 4 text areas added.
5. I have NOT tested this yet in 1.6 with activity locking.
Attachment textentry.gif
In reply to Chardelle Busch

Re: Latest version of certificate module--open in new window

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

I know some people would like the certificate to open in a new window (the way it is now could possibly create some confusion with users).  I've created a version of the certificate mod that has more of the "look and feel" of a typical activity.  The link to a certificate will go to a second page that has a "Get certificate" button--and when clicked, the pdf file will open in a new window.  This way, when the window is closed, the user will still be able to navigate back to the course homepage like with other activities.

There is some text Ive added Click to open your certificate in a new window. And you can change that in the view.php file to whatever you would like (or simply delete it).


Here's the new view file for Moodle 1.5 if you want to give it a try.  The zip for version 1.6 (send me an email and I will send it to you) has both versions included.
In reply to Chardelle Busch

Re: Latest version of certificate module--open in new window

by Marion de Groot -

Hi Chardelle,

I wanted to open the certificate in a frame or iframe, so your modification was very welcome! It does break the preview feature though: when composing a new certificate, the preview shows the page with the get-certificate-button instead of the certificate. (but that's no big deal to me, I don't mind not having the preview option)

I have a question too: how does the get-certificate-button work? I see no action specified in the form, no "onsubmit" on the button. I'd like to know, because I want to make a second button (save-certificate-button)

In reply to Marion de Groot

Re: Latest version of certificate module--open in new window

by Chardelle Busch -
Picture of Core developers
Hi Marion,

Glad this helps.  But too bad about the preview feature--I don't use that so didn't even notice it didn't work with it. 

The button does work just like any other button in a form, this is the code for the button that is in the form:

<input type="submit" name="Submit" value="Get certificate">
              <input type="hidden" name="id" value="$id">

This uses the "get" command instead of "post". 

You had some save code didn't you?  Can you just add it to the "first" page?
In reply to Chardelle Busch

Re: Latest version of certificate module--open in new window

by Marion de Groot -

Hi Chardelle,

I guess you are referring to the save code I was talking about in another thread about custom made certificates - but this was to save the certificates on my webserver. The save button I want to make now is to save the certificate on the client machine - no code fot that yet.

I should be able to fix the preview too, when I have time I will have a look at it. When I've come up with something I will post it here smile

In reply to Marion de Groot

Re: Latest version of certificate module--open in new window

by Chardelle Busch -
Picture of Core developers
That would be great if you could fix the preview problem.  As for saving the file, why don't you just tell your users to click on the save icon once the file is open?  
In reply to Chardelle Busch

Re: Latest version of certificate module--open in new window

by Marion de Groot -

Clicking the save icon results is the document being saved as view.pdf and I want it to be saved as cert_[course->shortname].pdf

What I've done is make the certificate module save certificates as  moodledata/[course->id]/moddata/certificate/[user->]/cert_[course->shortname].pdf  on my server, and now I'm working on how to send the certificate to the user by e-mail. If anyone knows how to send the certificate pdf as an attachment without saving it first, I'd would really like to know! This would save space on my server (eventhough in my case that is not a big issue since it is my server - I mean a dedicated server)

In reply to Marion de Groot

Re: Latest version of certificate module--open in new window

by Will Muenchow -
Bit of a problem.   I just upgrade Moodle from 1.5.4 to 1.6 Beta 5. This was a blank moodle (no students) and no certificates installed.  I downloaded the Certificate module and followed the instructions. I uploaded the module bit in the /mod file and uploaded the certificate.php to the /lang/en_utf8

I went to a blank classroom and chose a setup for the Certificate.  After I setup the certificate, I clicked on the new certificate and received the following error.


Warning: Invalid argument supplied for foreach() in D:\InetPub\moodle\mod\certificate\lib.php on line 493

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

I read in the install about spaces at the bottom of these php files that could be causing these errors. I downloaded the fpdf.php file and found no extra spaces. I also checked in lib.php -- no spaces.

I'm a bit perplexed on where to move next.

Any help?
In reply to Will Muenchow

Re: Latest version of certificate module--open in new window

by Will Muenchow -
Alright. Figured it out. I had the option "Print Teacher" to YES without having a teacher for the course.

Kudos to the developer of this certificate module!!!!!!!
In reply to Marion de Groot

Re: Latest version of certificate module--open in new window

by Alistair McQuade -

Hi Marion, I developed a system in another LMS where the certificate data was pulled together dynamically in flash so users could print or e-mail their certificates. Certificates were not actually saved or e-mailed as no real certificate exists. Just a unique code was e-mailed out and it linked back to the flash program that then created the certificate on the fly. You see the same thing with online greeting cards. Hope this helps.

Al

In reply to Chardelle Busch

Re: Latest version of certificate module--open in new window

by Marion de Groot -

Hi Chardelle,

I remember you've posted a message about logging - but I thought it had something to do with activity locking. But did you ever get the logging right for the certificate module? When I go to log.php and I look for course A / all users / all days / certificate course A  all I find in the listing is what I've done (adding and updating the certificate) , not my users viewing the certificate. But I know for a fact that people have been viewing the certificate (I can tell from the contents in the certificate_viewed table). Maybe it is tricky to program? (the same problem occures with de feedback module.)

regards Marion

 

In reply to Chardelle Busch

Re: Latest version of certificate module--open in new window

by Rudolf Strutz -
Hi,

I am using the latest version 1.6 and found view.php in the zipfile. Could someone be so kind to help me with the correct way to choose the option "new" or "same" window?

all the best from Austria....


In reply to Rudolf Strutz

Re: Latest version of certificate module--open in new window

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

I am currently working on some major upgrades for certificate.  For one, the link will take students to a second page (similar to other mods) with a button.  You can set up the certificate so the button either 1. forces a download, 2. opens in new window, 3. emails the certificate.  Then once the certificate has been delivered, the page will tell the studen when the certificate was delivered with a button to open the certificate for review.

If you can't wait for that, you can see some code I pasted here to open in new window. http://moodle.org/mod/forum/discuss.php?d=49214#225061
In reply to Chardelle Busch

Re: Latest version of certificate module

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

just testing the certificate and translating in german on a frsh new 1.6 system.. I got some problems using German Umlaute 'ß' 'äöü' and the translation of the date.

I tried to change the Umlaute with unicode or html. But without success.
Did the module catch the date from the server? Then the servcer settings may be the reason for the date problem.

Can you help?
Attachment certif.gif
In reply to Ralf Hilgenstock

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Hi Ralf,

A couple of questions, did the date on the certificate work in 1.5?  If so, then yes it must be a problem with this date code and the new utf. 

Is the date showing up correctly on other things like the forum?

There are a couple of options for dates in the view.php file that are currently commented out.  You might give those a try.  The date code starts at line 83. 

In reply to Chardelle Busch

Re: Latest version of certificate module

by Judy Gunderson -
Chardelle,

I finally bit the bullet and upgraded to 1.6 and am using the revised Certificate and Activity locking for it.  Working great!  CONGRATS and THANKS for all your work!

I have two problems..
1.  I would like to get rid of the line that prints on the certificate when you add a signature.  Is this possible?  If not... can I EXTEND the line so it is longer and matches better to the sig file I have?  (When I make the sig file smaller to match the line, the quality is really bad.)

2.  From what I can tell... the locked certificate is not hidden from view like it was when using the previous version

The first question is most important if you can help me with that I would be very very appreciative! : )

Judy
In reply to Judy Gunderson

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Hi Judy,

Glad you got it working.

As for the signature, if you open the certificate/lib.php file, under function_print_signature, on line 441 (which is for a Landscape certificate with a signature image), you will see this:

$pdf->Rect( 120, 440, 160, 1, 'F');

The number 160 is the length of the line so you can make that a bigger number, or to get rid of the line, simply comment it out by adding two slashes at the beginning of that line so it looks like this:
// $pdf->Rect( 120, 440, 160, 1, 'F');

As for locking, I have not yet tested activity locking in 1.6, sorry.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Judy Gunderson -
Chardelle,

Works like a CHARM!!

Without sounding too mushy... I am very grateful for your response and help!  You made my weekend! wink

One more question... when the certificate comes up - the R for registered shows up - but there is a character before it that is weird like an A with a tilde or something over it.... not sure if this will be a "biggy" to my client... but just in case... do you know how I might fix that?

I am going to try to attach a copy of it so you can see what I am talking about.

Judy
Attachment cert.png
In reply to Judy Gunderson

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Your welcome Judy. Hmm, it looks like there is a problem with having a symbol in a course name. I don't know much about the fonts for fpdf (you can find them in the lib/fpdf folder).

One suggestion would be to create a specific certificate case for this course and replace this line in certificate/view.php for the certificate case you are using :
cert_printtext(170, 330, 'C', 'Times', '', 20, $course->fullname);

with an image of the course name. Like this:
$pdf->Image( "$CFG->dirroot/mod/certificate/pix/myimage.png", 420, 300);
You would have to change the numbers 420 and 300 to line it up correctly.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Judy Gunderson -
Chardelle,

I will try that and see how it works.  Right now there are not that many certificates that have the symbol in it... so would not be much of a problem to do.

THANKS again for everything!

Judy
In reply to Judy Gunderson

Re: Latest version of certificate module

by Marion de Groot -

Judy,

Did you get rid of the funny A? I put a ® in a coursename and it displayed fine in my certificate. I used alt +169 to get the ® in the coursename, not &reg; maybe this works for you too?

Marion

In reply to Marion de Groot

Re: Latest version of certificate module

by Will Muenchow -
I've seem to run into one problem with the certificate module that I can't seem to fix? Im running 1.6 Beta 5. The module itself works like a charm and works great with activity locking.  My only problem seems to be is that I cannot get the certificate icon to show up in a course or /admin/modules.php -- In admin/modules it simply says "certificate" and no icon. In the classroom, where I have a certificate setup, it also simply says "certificate" and does not show the icon? I checked in /mod/certificate/ and found icon.gif where it should be.

Any ideas?


In reply to Will Muenchow

Re: Latest version of certificate module

by Steph Foerst -
I had this problem earlier today with the certificate module and flash module. It was a problem with my theme (I'm using officeshade15).

In my theme's pix folder there is a mod folder (where it is trying to call the icons from). So I created a folder for certificate and copied the icon.gif in there. Works perfectly now! 
In reply to Chardelle Busch

Re: Latest version of certificate module

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

I'm now trying again to check the problem with german characters (ÜÖÄß).

The lang files are not in UTF8 coded but in ANSI. Saving them in UTF8 doesn't solve the problem but create error messages.

The month names are in english and not translated. In my system it works correct.

Ralf
In reply to Ralf Hilgenstock

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Hi Ralf,

Are talking about the dates? If so, the way it currently displays dates does not work well in other languages.  In the next version, I am trying to fix this problem.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators
Chardelle, there are two problems:

  1. dates = monthnames only in english0 and not translated
  2. special characters from translation of the certificate.php are not shown correct and the same for coursenames et al. in the certificate.



In reply to Chardelle Busch

Re: Latest version of certificate module

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Ciao to all of you.
I found a problem. I added a certificate to a test course just to try it... and I got a division by zero.
I changed a line about 623 in the file mod/certificate/lib.php

from

    $percentage = round(($totalgrade*100/$totalmaxgrade),2);

to

if ($totalmaxgrade == 0) {
    $percentage = 1;
} else {
    $percentage = round(($totalgrade*100/$totalmaxgrade),2);
}

Please add it to the shared release.
Thank you in advance.
In reply to Chardelle Busch

Re: Latest version of certificate module - is there a module for 1.5?

by Lisa Dodson -

Is there a certificate module for 1.5.4?  Unfortunately, I cannot upgrade due to the version of MySQL that is used by my ISP.

Any ideas welcome.  I really need a certificate module.

Thanks

In reply to Lisa Dodson

Re: Latest version of certificate module - is there a module for 1.5?

by Chardelle Busch -
Picture of Core developers
Since some people are wanting a version for 1.5, I have uploaded a zip for it here:

Download

Please be aware, though, of a few things.
1. I haven't used this for awhile so I can't be sure of how well this works--this is the older version that was posted by David Cannon.
2. This version has very few features, and does not have backup/restore.
3. Once you do upgrade your Moodle, you will have to uninstall this version of the mod in order to use the new versions of the certificate mod.
4. If you have questions about it, please search this forum for discussion regarding this older version.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Lucia Moreira -
Dear Chardelle:

I don´t seem to able to intall Certificate module properly. I use Moodle 1.6.3.

I installed "verify_certicate" on moodle\blocks.

I installed "certificate" on moodle\mod.

The problem seems to be with with lang. Installation instructions say to install what´s inside lang to "yourLangfolder" but on Moodle 1.6.3. there is no pt_br_utf8 folder. I installed certificate.php on lang\en_utf8 together with all the other .php files. I was able to access it from admin\lang and translate to Portuguese.

Everything seems to be there. i have access to create a certificate but when I try to display I have the message "course module is incorrect".

I created a pt_br_utf8 folder and copied certificate.php but still got the same error message.

Can you help to find where my mistake is?

Thank you very much.

Lúcia


In reply to Lucia Moreira

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Hi Lucia,

I think perhaps you are trying to use an older version. Please uninstall the certificate mod and block and then install the latest versions for 1.6. The certificate can be downloaded from the link at the top of this thread:

http://moodle.org/mod/forum/discuss.php?d=51494

and you will find the zip of the block posted at the bottom of the thread.

If you need to use the unicode version for Portuguese, please also look for the unicode addon-type that is posted in that discussion--it also contains the Portuguese language folder.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Lucia Moreira -
Hi Chardelle:

Thanks for your help. I "almost" made it. The problem is that I still get the error message "FPDF error: Some data has already been output to browser, can't send PDF file".

I read your instructions on an older message to delete spaces on lams.php. It did not work with me.

Besides, I am all confused about moodle\mod\certificate\lang. I gou the unicode version for Portuguese and copied to moodle\mod\certificate\lang. So, now I have there 3 languages: English, Geman and Portuguese but English prevails when creating a certificate. Should I remove the other two and only leave Portuguese?

Sorry to make such basic questions but I don´t have much experience and have spent some hours on the subject.

Bye




In reply to Lucia Moreira

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
If you have your language settings forced to use pr, then it should be in Portuguese. You might also have two certificate language files somewhere--make sure they are only in your mod/certificate/lang folder and not in your moodle/lang folder. You could also try deleting the en and de lang folders too.

As for the error message, I need more info, is there any other message that is shown? What is the last upload date shown on the readme.txt file for the certificate? What are you doing when you get the message...
In reply to Chardelle Busch

Re: Latest version of certificate module

by Lucia Moreira -
I solved the language problem already.

The upload date is 11/03/2006.

When I click on the Certificate I created, it leads to the page where there is the button "get your certificate". I click there, the error message appears and then I use Moodle menu bar to go to other part of the course or logout.

It´s possible to access the "report" and also "update certificate". It seems to be a problem with PDF creation.

Attached view_Lucia.php if it helps.


In reply to Lucia Moreira

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Are you using the unicode type? Does it work with other types?
In reply to Chardelle Busch

Re: Latest version of certificate module

by Lucia Moreira -
Yes, I´m using unicode type. I´ve just tried "landscape" but got the same error message.
In reply to Lucia Moreira

Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by J. Chan -

Hi Chardelle,

I have Moodle version 1.63, 1.64 and 1.65 installed on my working server.

I installed the latest certificate for 1.6. I think everyone will see this error message,

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

if they do the following things, like what I've done:

  1. when I force Chinese Traditional language (perhaps some other language except English) as the course language medium, or
  2. when I have some Chinese Character inserted in any of the language file within the lang/en_utf8/ folder, or
  3. when I incorrectly reloaded and saved any of the language file (in the lang/en_utf8/) in a UTF-8 view code,

Then I will receive the error message without the frame to view the pdf file within moodle.

I also found out that there is nothing to do with the error message, even when I do the following things:

  1. when there is a space at the end of the ?> in any of the language files, or
  2. when I use whatever language characters on any pages in moodle.

I know there is an add-on of tcpdf for unicode certificate. But I found two problems when using it:

  1. it doesn't display Chinese Traditional character on the certificate, I think it might be the font
  2. it does not attach the pdf file in the email delivery

Thanks in advance.

Cheers

James

In reply to J. Chan

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by Chardelle Busch -
Picture of Core developers
If tcpdf does not support your font, you may need to create your own, the files include a utility for this. See, http://sourceforge.net/projects/tcpdf for more info.

As for the pdf not being attached, you have an old version, so it is hard for me to say what would cause that error, I can look into that (remind me again if you don't hear back from me).
In reply to Chardelle Busch

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by J. Chan -

Hi,

Regarding the error message,

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

More discoveries are found which are not related to UTF non-English code.

In a course, when I add activities (all content in English) belonging to

  1. Presentation module ( downloaded from here), or
  2. Flash module (downloaded from here),

the Certificate module is conflicting with the above two modules and displays the above error message. The certificate does not show.

For any persons who previously reported the above error messages in Moodle 1.6 or above, I would suggest them to check three things:

  1. see if they use UTF-8 languages other than English as course names, or course in force language of UTF-8 other than English, or
  2. see if they have added "Presentation" activity in the course, or
  3. see if they have added "Flash" activity in the course.

I don't think it's related to any space after ?>

BTW, I am still studying how the above two modules conflict with Certificate module. Any idea?

Cheers

James

In reply to J. Chan

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by Chardelle Busch -
Picture of Core developers
Hi James,

The conflict is probably a blank line or two--most likely after the bottom ?> somewhere in the code for those modules or in their lang files. FPDF will not print if there are extra blank lines in files.
In reply to Chardelle Busch

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by J. Chan -

Hi Chardelle,

You're right! FPDF won't print due to empty lines after ?>

Of some of the php files of those two modules, I could even find up to five blank rows after ?>

After removing those blank lines/spaces found in the two modules, Certificate module displays certificate as normal.

This problem is solved. Many thanks

James

In reply to Chardelle Busch

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by J. Chan -

Hi Chardelle,

Last time, I mentioned that with the Chinese Traditional (i.e. zh_tw_utf8) language pack installed, the Certificate module will give an error message instead of printing it. I don't understand why the Certificate module works fine when I use Chinese Simplified (i.e. zh_cn_utf8) language pack instead of Chinese Traditional (i.e. zh_tw_utf8).

All language packs are original installed from moodle/admin. What would be the reasons that affect the Certificate module? Would it still be the empty lines after "?>" ? If so, I have already removed all empty lines found in all files in zh_tw. So, what would be the situation? Should this be reported to tracker for someone who majors in language translation to fix?

BTW, I have tried to see if I know how to create my own font for Chinese Traditional language in the TCPDF, but unluckily, I have no idea on how to do it after reading the menu. I wonder if anyone knows about it, or perhaps have the font already for download?

Thanks in advance.

Cheers

James

In reply to J. Chan

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by ned moltoya -
This is how I coverted a font for Simplified Chinese (simhei).

Setting up a Truetype font for usage with UFPDF:

1) Generate the font's .ufm metrics file by processing it with the provided ttf2ufm program (modified ttf2pt1). For example (in a Dos-window):

$ ttf2ufm -a -F simhei.ttf

2) Run makefontuni.php with the .ttf and .ufm filenames as argument (on the server):

$ php -q makefontuni.php simhei.ttf simhei.ufm

3) Copy the resulting .php, .z and .ctg.z file to the TCPDF font directory.
In reply to ned moltoya

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by J. Chan -

Hi Ned

Thanks for your reply. I have tried working it out wih putty. Is that right?

But I always received error message, like no such file, etc.

Also, I don't seem to find where the name for simplied font (as simhel) or the name for traditional chinese (as ??) are mentioned in any readme file?

Last, I just wonder if there is any already made fonts for downloading. Just wonder!

Thanks in advance.

Cheers

James

In reply to J. Chan

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by ned moltoya -
Hi James,

you can find a Windows executable for ttf2ufm here.

I think you can convert one of the fonts which come with Windows (I believe that's what I did). If not, look for one on the web.

There's also a discussion here (Click on "Chinese" in the text)

Here is the converted simhei font for Simplified Chinese.

Best,
Ned

In reply to ned moltoya

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by J. Chan -

Hi Ned

Thanks for your help.

The converted simhei font is great with the simhei.php. I wonder if you've got two other files, which should be simhei.z and simhei.ctg.z

Could you include the files for me to download? Many thanks!

Cheers

James

In reply to J. Chan

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by ned moltoya -
Hey James,

they must have sneaked out. I put them in again.

Good luck,
Ned
In reply to ned moltoya

Re: Certificate in 1.6+: FPDF error: Some data has already been output to browser, can't send PDF file

by J. Chan -

Hi Ned

Thanks for your files. All of them are there. Thanks again.

Cheers

James

In reply to Chardelle Busch

Re: Latest version of certificate module

by Jason Grey -
Hi Chardell
I have installed the Certiticate module in my 1.6 Moodle and having a tiny bit of trouble, My moodle is displaying 500 Internal Server Error? Because i have no idea i manage to - Upgrade moodle 1.6 my self. And now i want the Certificate to work i was wondering if you can support me.

Cheers

Jason Bepper
jason@hornsbyonlinelearning.biz
http://hornsbyonlinelearning.biz/login
In reply to Jason Grey

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Hi Jason,

First, be sure to get the most recent updated version from here:
http://moodle.org/mod/data/view.php?d=13&rid=308

Second, once you upload all of the files to the appropriate folders, you need to click on the admin link from the homepage to install it--you should get messages saying it was installed and setup correctly.

The error you are getting might be due to incorrect permissions.  Mod folders should have permissions set to 755.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Jason Grey -
Hi Chardelle

I just like to say A BIG Thank You I after 4 Goes at RE installing Moodle 1.6 and Certificate Module I got it working. Thank you for your support and useful emails that got this module working.

Thank You So Much,

Jason Bepper
Sydney Australia NSW
In reply to Jason Grey

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Way to go Jason!

I'm glad you've got it working.  It might be useful for others if you could post what the problem/solution was.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Rudolf Strutz -
Hi Chardelle,

I am totally confused, because it seems to be much more difficult to install the certificate including the acitvity lock, as I thought.

You told me to look to have a setup of files as follows:

moodle folder
lang folder
en_utf8 folder
lock.php
help folder
lock folder

Here is were my problem starts (and ends!): in the packed file, which you find at the above link, there is not "lock.php" nor "help folder" nor "lock folder"....

Please tell me, what I am doing wrong...


all the best from hot Austria...

In reply to Nikki Macfarlane

Re: Latest version of certificate module

by Alistair McQuade -
Does any one know if there are any installation instructions for the new certificate module? Also does it still require activity locking and if so where can that be found? Any help is greatly appreciated!  smile
In reply to Alistair McQuade

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Hi Will,

The icon not showing up is probably a theme issue. Check you theme config and see what your setting is for:
$THEME->custompix = false;

If you have this set to true, then you will need to put the icon in a pix/mod/certificate file (click on an icon that does show up and see where it comes from, then just put the certificate icon there).

Al,

This installs just like any module. (I used to have an FAQ on installing mods, but it's gone now.) It never has required activity locking (which is discussed in the Conditional Activities forum), but the old code required hacking to get AL to work.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Will Muenchow -

That worked!! Got one last question, promise;)

When someone clicks on the Certificate link and they are brought to the page that tells them what they are missing. On this page, it says  activitycurrentlylocked - then list the activites.

I'm not sure if it ( activitycurrentlylocked ) is suppose to look like this or there is suppose to be some image or other text? If it is, where would I need to edit to change this to something else?

Thanks!

Also, THANK YOU SO MUCH FOR THIS CERTIFICATE MODULE! You have a donation page?!?!

In reply to Will Muenchow

Re: Latest version of certificate module

by Will Muenchow -

Seem to have found on more small problem. On the top left, under Actvities, the Certificate icon shows up now, but when I click on it I receive. The link URL from the certificate looks like this mod/certificate/index.php?id=2

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.


Please try the following:

  • Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
  • If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
  • Click the Back button to try another link.

HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)


Technical Information (for support personnel)

  • Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
  • Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.

Any idea?

In reply to Chardelle Busch

Re: Latest version of certificate module

by Alistair McQuade -

Thanks Chardelle, I unzipped the files and copied the certificate-1.6 directories and files thus:

  • moodle/moodle/mod/certificate/db
  • moodle/moodle/mod/certificate/docs
  • moodle/moodle/mod/certificate/pix

Certificate does not show up in the modules table. I must be doing something really dull or missing something very basic?? Any ideas?

smile

Al

In reply to Alistair McQuade

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Did you visit the admin page?  After uploading a new mod, you need to click on Admin (from the home page) in order to install--when you do, you should get "success" messages.
In reply to Chardelle Busch

Re: Latest version of certificate module

by Alistair McQuade -

Thanks Chardell you spotted the problem. I now have it running so thanks a million!!! I think I have certificate.php from the yourlang folder in the wrong place as 'certificate type' dropdown is empty. I put it into:

  • moodle/lang    and also tried
  • moodle/lang/en

I'm being dull again aren't !??

Thanks.

Al

In reply to Chardelle Busch

Re: Latest version of certificate module

by shatrish kerisnan -
Hi Chardelle,

I am new to moodle. Developing lms for company. are they any certificate module for moodle version 1.5.4 . I am currently using this version. Thank you.

In reply to shatrish kerisnan

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Hi Shatrish,

Look through this forum for posted zips of the certificate for 1.5, for example, try the zip in this posting:  http://moodle.org/mod/forum/discuss.php?d=38546
In reply to Chardelle Busch

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Okay everyone,

Thanks for the de-bugging.

Attached is a new index.php to correct the problem when clicking on the certificate from the Activities block.

Daniele--thanks for this--I've added this to my copy--and everyone should make this change posted above to lib.php also.

And Marion, I see that the views were showing up in the activity report (which is the code I had added before), but they weren't showing up in the logs.

Please replace the old add to log code in view.php with this:
// log update
add_to_log($course->id, "certificate", "view", "view.php?id=$cm->id", $cert->id, $cm->id);

I think that's it.  Let me know if you find anything else.
In reply to Alistair McQuade

Re: Latest version of certificate module

by Chris Collman -
Picture of Documentation writers
Hi Al,
Just got done installing it and wrote up a quick install steps.  Certificate_module
in MoodleDocs.  

Now how do I lock get activity locking to work in 1.6 for my certificates?  I can not answer the second part of your question.   Lesson activities have dependency as part of each lesson setting.  

Chris

In reply to Nikki Macfarlane

Re: Latest version of certificate module

by Chris Collman -
Picture of Documentation writers
Hi,
My site administrator told me some Irish students can not print their own certificates upon completion of the course. Anyone with an ' in the name gets kicked out. O'Brien, O'Joy smile What can we fix?
 Did a search on install instructions and found this http://moodle.org/mod/forum/discuss.php?d=46748&parent=215169  which is all about the above problem.

Now I am looking for instructions on how to install on 1.6 after downloading.

I personally have not used the certificate module but it is important to my organization which currently uses 1.5.3. I will be uploading Certificate into my localhost 1.6 latest to see how it works. We will be switching over from 1.5.3 to 1.6 by August.

 Chris
In reply to Chris Collman

make names with an ' show on the certificate

by Marion de Groot -

Hi Chris,

To make the certificate module work with names with an ' , you have to modify the function check_cert_exists($course, $user) in lib.php You should change the line in which $studentname is defined to

$studentname = addslashes($user->firstname . " " . $user->lastname);

regards,

Marion

 


 

In reply to Nikki Macfarlane

Re: Font Color Changes

by Adam Wojciehowski -

Can anyone point me in the right direction...I am attempting to change the font color in the certificate module but with no avail.  Specifically the course title.  I have looked through the lib.php and the view.php file with no success.

Thanks!!!

In reply to Adam Wojciehowski

Re: Font Color Changes

by Chardelle Busch -
Picture of Core developers
Hi Al,

Putting the lang file into the lang/en_utf8 folder (or whatever language you use) should work.

Adam,

This would require adding another variable $tc (text color) to

function cert_printtext  in the lib.php file.
In reply to Chardelle Busch

Re: Font Color Changes

by Adam Wojciehowski -

How?  I have no idea about fpdf programming.  Sorry....

Can you provide the exact code and where to place it in the lib.php file?  Also does the color description have to be in RGB or just plain text.  For example, 25, 25, 223 or "Blue"

In reply to Chardelle Busch

Re: Font Color Changes

by Will Muenchow -
Any idea why I'm getting my error (above this post) when I click on the Certificate image under "Activites" ?

Also, when a user clicks on the certificate image  (the one listed in the weeks, not under activites) they get the info that tells them what they are missing. On this page, it says  activitycurrentlylocked - then list the activites. I don't think the activitycurrentylocked is suppose to be shown in this way?


In reply to Will Muenchow

Re: Font Color Changes

by Will Muenchow -

Weird thing happen today. I went to look at the certificate that I have setup for a course, and when clicked on it to generate it I was presented with the following:

 

Warning: Invalid argument supplied for foreach() in D:\InetPub\moodle\mod\certificate\lib.php on line 493

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

 

What would cause this error?

In reply to Will Muenchow

Re: Font Color Changes

by Will Muenchow -

What would cause this error? Incompetence! Nevermind! I had taken the professor out of the course!

 

 

In reply to Will Muenchow

Re: Font Color Changes

by Chardelle Busch -
Picture of Core developers
Hi Will,

Yes, if you choose to show things in certificates that aren't available to students, like teachers, grades, etc., then you will get errors--I should try to figure out how to get it to say something like "no teachers are in this course".

As for the activity locking, I still have not tested AL ver 2. with the certificate in moodle 1.6, so I am not sure what to tell you there.
In reply to Nikki Macfarlane

Re: Latest version of certificate module

by Caio Moreno de Souza -
Hello,

I translated the Certificate Module to Brazilian Portuguese language.

My Moodle version is 1.6.1 and the name of the certificate package is certificate-1.6_withsecurity.zip available at http://moodle.org/mod/data/view.php?d=13&rid=308

See translation at files attached in this page or at http://moodle.org/mod/forum/discuss.php?d=50681

For me it is working but I fixed some bugs in the Certificate Module and now it is okay.

Best Regards,

Caio
In reply to Caio Moreno de Souza

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
That's great Ciao.

I'll add it to the new version, (but it will need some updating).
In reply to Chardelle Busch

Re: Latest version of certificate module

by Will Muenchow -
Hello Chardelle!
Not sure If I'm simply missing the post, but is there a way to have a Pop-Up box so a user can enter the name that will be printed on the certificate?

In reply to Chardelle Busch

Re: Latest version of certificate module

by Caio Moreno de Souza -
Hi,

Did you use what I send to you? Was it helpfull?

I saw your good news and that now we have the Certificate Module 3.1.

I want to test it and translate it to Portuguese asap.

Cheers,
Caio
In reply to Caio Moreno de Souza

Re: Latest version of certificate module

by Will Muenchow -
Been messing around for the past couple days trying to get popup box to be used to enter the student name on the certificate, cant seem to get it right. Would I be able to perform this action in the same way you added the popup box to display other relevant information on the cert?
In reply to Will Muenchow

Re: Latest version of certificate module

by Will Muenchow -
I've added an option in the view.php for the certificate module so a user can input the name that will be printed on the certificate.

I've attached the view.php (make a backup of your current view.php as I'm not sure what recent changes this file has undergone by its developer).

Will
In reply to Will Muenchow

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
Just to be clear, the above view file as well as the one I posted toward the top of this thread (which also has form field for entering info) are for the certificate mod that is NOT versioned in the 3.0 series.

Will, I'm curious, did you get the enter_name type for the new version that I sent you?  
In reply to Chardelle Busch

Re: Latest version of certificate module

by Will Muenchow -

No? When did you send it and to what e-mail? I remember e-mailing you awhile ago about it though?

Also, if anyone is interested, I have a autologin.php and a modified index.php that works perfectly for single-signon between a CMS and Moodle. The script is based on transferring the cookie (both sites need to be hosted on the same domain) from the CMS and either creating the account on Moodle or automatically logging the user in. We use it currently on  a production  site of 9,000 members. I'm hoping to put together an interface for editing the script, but have not had anytime.  Message me if you want a copy! The code requires minimal modifications  and no changes to your CMS; it also requires no querying of an external database.

Will 

In reply to Will Muenchow

Re: Latest version of certificate module

by Amy H -
could I have a copy of the autologin.pho and index.php please. I am trying to create a single login between joomla and moodle so I'm hoping this will either do it, or at least move me into the right direction.

Thanks.

I have also messeged you re this,
In reply to Chardelle Busch

Re: Latest version of certificate module

by Chris Collman -
Picture of Documentation writers
Hi Chardelle,
Forgot where I posted that Certificate 3.1 works with 1.7.  Well it worked with 1.7 Dev but not 1.7 beta.  Unless I made a boo-boo  with the do blindfolded install of certificate 3.1.  

Get this pink bar that says something to effect the developer needs to make correction for SQL table after I tried to add a certificate activity.     Have not taken it further. 

Chris
In reply to Caio Moreno de Souza

Re: Latest version of certificate module

by Kadu Pinheiro -

Caio,

você conseguiu resolver o problema de acentuação do certificado ?

ficaria grato se vc me desse a dica

In reply to Caio Moreno de Souza

Re: Latest version of certificate module

by Athail Pulino -
Caio:

Would you please send me the certificate folder (zipped) that works in portuguese?
I'm using Moodle 1.6.3 and the char code is ok but the certificate do not work with words in portuguese (name of students) that have latin code (acentos).

Thanks in advance.
Athail Pulino
arpulino@gmail.com

In reply to Nikki Macfarlane

Internal Server Errors

by John Murphy -

Hi Chardelle and everyone!

          I'm pretty new with the module, and I've installed everything to the documentation, but it seems that whenever any of the users go to click on the certificate in my couse, there is a internal server error 500. I saw that it made the tables, and I can add and configure it, but the preview and the actual generated cert keeps coming up with an 500. Any ideas? --John M 

In reply to John Murphy

Question

by Lewis Kohl -
Hi, I am new to moodle but just wondering if there is a way to get the certificate to come alive after they have completed the course?
In reply to Lewis Kohl

Re: Question

by Vikram Solia -
Hi Lewis!

What is your criteria for flagging the course end.

One of my clients wanted the certificates to display as soon as the student cleared a certain quiz with the requisite marks which we have done by hacking the file attempt.php in the quiz directory.



In reply to John Murphy

Re: Internal Server Errors

by Simon Burnell -

Hi John,

the problem was fixed on my site by setting the moodle/mod/certificate folder (and subfolder) permissions to 755 (they are set by default to 775).

Cheers,

Simon

In reply to Nikki Macfarlane

Re: Latest version of certificate module

by James Cracknell -
Any news on a 1.7 version?  Certificate doesn't want to work with 1.7!
In reply to James Cracknell

Re: Latest version of certificate module

by Chris Collman -
Picture of Documentation writers

Are you using Certificate 3.2 .   3.1 does not work with 1.7.   See the 1.7 thread this forum http://moodle.org/mod/forum/discuss.php?d=56265 

For my purposes 3.2 seems to be working on my 1.7 localhost.

Hope this helps   Chris

 

 

In reply to Chris Collman

Re: Latest version of certificate module

by gun slinger -
Hi,
Im trying to give a user a certificate on completion of a quiz, i used the lesson dependency trick where i linked the certificate activity to a dummy lesson mentioned here
http://docs.moodle.org/en/Certificate_module
But when i click on the lesson to view the certificate activity it displays a message saying
Navigation: first page not found
It should ideally display the certificate in a drop down. Can u help me out?
In reply to Nikki Macfarlane

Certificate Quirks

by Mark Lew -

If the Site Policies are set to "Surname + First name" then you may want your administrator to set it to "First name + Surname" before you issue certificates.

If you turn the "print Teacher Name" to yes and you add custom text, they print over one another.  Just use the Custom Text and put the Teachers Name and other text.

In reply to Nikki Macfarlane

Re: Latest version of certificate module

by Mark Lew -

Is there anyway to alter the Certificate so that it can be used to show completion of a particular assignment or Section of a Course.

For Example

Joe has completed the Excel portion of the course.

Also, there are times that I use the Course Name to signify a certain section of a course that is running, when the actual name of the course may be different. 

Is there a way that this can be adapted so that there is more flexibility in the text that appears on the certificate?

In reply to Mark Lew

Re: Latest version of certificate module

by Chardelle Busch -
Picture of Core developers
The certificate prints lang strings (found in the lang/certificate.php file) and code. Open a type/certificate.php file and look toward the bottom. The lines that start with cert_printtext print things on the cerificate. E.g. the one with $classname at the end prints the course name. If you don't want it printed, delete that line.

The lines that have get_string in them print lang strings. E.g. the one with
get_string('introlandscape', 'certificate') at the end, will print the lang string called 'introlandscape" from the lang file.

Its very easy to change or even add your own lang strings. See the certificate help files for more info.
In reply to Nikki Macfarlane

Multiple certificates

by Ben Miller -
Hello,

I want to say that the certificate module is great! I am wondering, is there any way to have a new certificate generated every time the course is passed? Right now once a user completes the course and gets their certificate, no matter how many times they take the course again they never receive a new certificate.

I would love to be able to have it NOT remember who has obtained a certificate and just issue a new certificate every time.

Thanks,

Ben
In reply to Ben Miller

Re: Multiple certificates

by Chardelle Busch -
Picture of Core developers
There's no need to cross post.

1. You could always add more certificates to your course, e.g. one for the 1st attempt, another for the 2nd, etc.

2. There are two functions that save the user data for certificates

function certificate_prepare_issue($course, $user) {
and
function certificate_issue($course, $user) {

you can get rid of any mention of those in the files. However, then features like saving, emailing, reporting will obviously not work. Or, delete only the references in these functions to the data you don't want saved, e.g. date, grades, etc.
In reply to Chardelle Busch

Re: Multiple certificates

by Ben Miller -
Chardelle,

Thanks for the info, I think that adding additional certificates sounds like the way to go. One other question though; how do I specify that the second certificate be issued for the second attempt and the third certificate be issued for the third attempt and so on.

Thanks again for your help with this.
In reply to Ben Miller

Re: Multiple certificates

by Chardelle Busch -
Picture of Core developers
My suggestion would be to use labels above each cert, e.g. Click below to get your certificate for your first quiz attempt. Then maybe name them Certificate1, Certificate2, and so on.