Report My Certificates

Report My Certificates

by Dawn Snipes -
Number of replies: 27

We had been using the "report_my_certificates" code that was posted here. http://moodle.org/mod/forum/discuss.php?d=131329&parent=805839

Since we upgraded to Moodle 2.3 and the latest certificate code, this is producing numerous errors.  Does anyone know if this has been re-written for the current code base?  I would even be happy to know of anyone familar with the certificate module that could do or has done a paid update to the code to get it working. Thanks!

 

Average of ratings: -
In reply to Dawn Snipes

Re: Report My Certificates

by Dawn Snipes -

I just wanted to update the post.  We hired a developer and have the report working.  You can consider the post closed.  Thank You.

In reply to Dawn Snipes

Re: Report My Certificates

by Robin Petterd -

Hi Dawn,   

 Are you able to share that code? 

Cheers

Robin

In reply to Robin Petterd

Re: Report My Certificates

by Dawn Snipes -

I will have to research what I need to do to post it up as a plugin.  I didn't know if there would be any other interest in it. 

In reply to Dawn Snipes

Re: Report My Certificates

by Robin Petterd -
Hi Dawn, If you could just post the report_my_certificates.php file as attachment to this forum that would be great or a .zip of your certificate folder could work as well. Thank you Robin
In reply to Dawn Snipes

Re: Report My Certificates

by Mark Whitington -

We would love to be able to use the My Certificate feature again.

We are using Moodle 2.3.3

Many of my users ask about it almost daily... it has been sadly missed.

Dawn we would very much like to access what you have created and/or possibly contribute towards its development.

Hope you are able to assist us.

Cheers

Mark

In reply to Mark Whitington

Re: Report My Certificates

by Jeremy Schweitzer -
Picture of Plugin developers Picture of Testers

We already use configurable reports, so we just added a new report that shows a user the certificates they've earned. I posted all the code on my work blog here.

We also added a report so that supervisors can see all the certificates that their staff have earned (we use for social worker CEUs).

In reply to Jeremy Schweitzer

Re: Report My Certificates

by Jean-Michel Védrine -

Hello,

As there is no news from Dawn and people seems to be missing this plugin, here is a quick port to Moodle 2.3 that I did on this raining Sunday morning.

The old code was not very good so I nearly rewrote it entirely.

As often with my work tongueout testing has been minimal, so you should do some tests yourself if you plan to use it.

As I don't use this plugin, don't hesitate to report problems or enhancements ideas.

In reply to Jean-Michel Védrine

Re: Report My Certificates

by Jean-Michel Védrine -

Sorry, I forgot to set the page layout in the version I posted this morning !

Here is a corrected version.

 

In reply to Jean-Michel Védrine

Re: Report My Certificates

by Mark Whitington -

Hi Jean-Michel,

Thank you for your efforts!

I am new to loading/installing your Report My Certificates module.

Could you describe how to install and use please as I would like to try to use it, but do not know how.

Cheers

Mark

In reply to Mark Whitington

Re: Report My Certificates

by Mark Whitington -

Think I have worked it out...

Copy the attached file to your installation directory. (moodle/mod/certificate)

The new link can then be tested at the following location: http:///mod/certificate/report_my_certificates.php Now you can just add a link to this new location from anywhere within your site.

In reply to Jean-Michel Védrine

Re: Report My Certificates

by Mark Whitington -

Hi Jean-Michel

I wonder if you could check a bit of your code for me... (I have no PHP knowledge)

We have been using the link for three weeks now and have just noticed that the date being displayed is incorrect (including some dates that are in the future).

Hope this may be an easy fix as I realy like the report.

Cheers

Mark

In reply to Mark Whitington

Re: Report My Certificates

by Jean-Michel Védrine -

Hello mark,

I was using Moodle's userdate function to get the certificate's date. So what you see is the date according to the user timezone wich would explain some strange results.

I will change the code to use the certificate_get_date function of the certificate library. So the date should be exactly the same that the date printed on the certificate. I will post the code as soon as I get a moment to test it.

But be warned that there is currently a tracker issue CONTRIB-4111 so until this issue is not closed report_my_certificate will suffer from the same default as the date printed on the certificate, but at least both will be the same wink.

In reply to Jean-Michel Védrine

Re: Report My Certificates

by Jean-Michel Védrine -

Here is my modified version.

Please, test and report.

In reply to Jean-Michel Védrine

Re: Report My Certificates

by Mary Beth -

This is a really awesome little helper module. I can only hope for one more thing.. I need to have the ability to print the certificates again, after a user has been unenrolled from the course..

What could I add where to add this feature to this page?  I see on this other post https://moodle.org/mod/forum/discuss.php?d=131329 that Mark Nelson offered some code to do this.

 

if ( !$cm = get_coursemodule_from_id('certificate', $id) ) {
    error('Course Module ID was incorrect');
}
if ( !$course = get_record('course', 'id', $cm->course) ) {
    error('course is misconfigured');
}
if ( !$certificate = get_record('certificate', 'id', $cm->instance) ) {
    error('course module is incorrect');
}

 

Mark?  Jean-Michel?  Can you help me with a little more info?

In reply to Mary Beth

Re: Report My Certificates

by V Martin -

Mary Beth,

Were you ever able to figure out how to have certificates available and printable to students that have been unenrolled. I too could really use a feature like this. I want to be able to store a students past information / certificate while keeping my courses clean by unenrolling inactive or completed students.

Thanks MaryB,

In reply to V Martin

Re: Report My Certificates

by Dave Emsley -

Hi Mary Beth,


This is exactly what I needed, many thanks. 


FYI - I am using Moodle 2.7 and it throws some errors but they don't seem to affect it adversely:

get_context_instance() is deprecated, please use context_xxxx::instance() instead.

  • line 3670 of /lib/deprecatedlib.php: call to debugging()
  • line 52 of /mod/certificate/report_my_certificates.php: call to get_context_instance()

I hope this makes sense,


Cheers

Dave


In reply to Dave Emsley

Re: Report My Certificates

by Jean-Michel Védrine -

Thanks dave for reporting this.

it should be easy to fix once I find where is my latest version smile


Average of ratings: Useful (1)
In reply to Jean-Michel Védrine

Re: Report My Certificates

by Dave Emsley -

Oops Sorry Jean-Michel I seem to have thanked the wrong person.


Thanks wink

Cheers


Dave

In reply to Dave Emsley

Re: Report My Certificates

by Dave Emsley -

For information


I'm trying to add a print button under the name of the course as per the original certificate printing option but struggling with context number.


Dave

In reply to Dave Emsley

Re: Report My Certificates

by Jean-Michel Védrine -

Here is a new version that should not display any notice or warning when used with Moodle 2.7

I also added a small readme to help people to get this addon working.

Average of ratings: Useful (2)
In reply to Jean-Michel Védrine

Re: Report My Certificates

by Helen Moraes -

Hi Jean-Michel,

I'm using your plugin and works very good, thanks.

I would like to add to certificate report  a new field from certificate DB... for example, the "customtext" field of certificates.

Is it possible?

In reply to Helen Moraes

Re: Report My Certificates

by Jean-Michel Védrine -

Hello Helen

Imagine you want to show customtext in column #3 just after the course name and with a left alignment and "My header" as the text for the column's heading.

Then you need to modify lines 49-50

$table->head  = array ($strto, $strclassname, $strgrade, $strdate, $strcode);
$table->align = array ("left", "left", "left", "center", "center");

To something like

$table->head  = array ($strto, $strclassname, "My header", $strgrade, $strdate, $strcode);
$table->align = array ("left", "left", "left", "left", "center", "center");

And modify lines 89-95

        if ($last_userid == $certdata->userid) {
            $table->data[] = array (' ', $class, $grade, $date, $code);
        } else {
            $table->data[] = array ('<br>', ' ', ' ', ' ', ' ');
            $table->data[] = array ($name, $class, $grade, $date, $code);
            $last_userid = $certdata->userid;
        }

To something like

        if ($last_userid == $certdata->userid) {
            $table->data[] = array (' ', $class, $certdata->customtext, $grade, $date, $code);
        } else {
            $table->data[] = array ('<br>', ' ', ' ', ' ', ' ');
            $table->data[] = array ($name, $class, $certdata->customtext, $grade, $date, $code);
            $last_userid = $certdata->userid;
        }

In reply to Jean-Michel Védrine

Re: Report My Certificates

by Gary Lyon -

Jean-Michel....thank you, thank you and thank you again. An awesome add-on. I'd buy you good bottle of French wine....but you already have better wine than I can buy here. wink

In reply to Jean-Michel Védrine

Re: Report My Certificates

by Yogesh Nahar -
Hi Jean-Michel,

Thank you for your work on this. It's a great add-on for the certificate module. Having issues with viewing the certificates page on v2.8. When trying to visit the link it simply goes to the home page of the site. 

Do you intend to release any update for this for the Moodle v2.8?

Please let me know. Thank you.

Yogesh

In reply to Yogesh Nahar

Re: Report My Certificates

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I was testing the certificate module with Moodle 2.8, and it worked for me. Make sure you are using the latest version. (I got the latest code from git.)