Add download certificate link in dashboard

Add download certificate link in dashboard

by Nidhi Tiwari -
Number of replies: 3

Hi All,

I want to display download certificate link on dashboard page. If a course is completed by user then user can directly download certificate from his dashboard.

I am unable to get certificate id under block/course_overview/render.php page.

Please help me asap. Thanks in advance.


Regards,

Nidhi


Average of ratings: -
In reply to Nidhi Tiwari

Re: Add download certificate link in dashboard

by Chris Collman -
Picture of Documentation writers

Hi Nidhi,

My site's Moodle version is 2.2.   We use the certificate report block.  I just installed it on my local 2.9.2 Moodle.   I think the block is what you want.  However, the 2.8 version block installed in 2.9 BUT does not look good in 2.9.  

The good news is that when the student clicks on a pdf icon for a specific certificate, it opens in another window and can be downloaded. 

The block shows a list of issued certificates (with PDF links) and has a link at the bottom to a report called "All My Certificates" (which also has PDF links).  The visual issue is that the list of issued certificates goes beyond the block boarder on the right.   The "All My Certificates" link went to a report that was just what I wanted.  

My solution was to copy the url for the report and paste it into an HTML block.  The student clicks on the words inside the HTML block and goes to the report.  I just tested it for one student that had a certificate in two courses.  As with any plugin, that might be enough testing for a production site.

I attached a picture of the dashboard for a student showing the HTML block and another of the report titled "All Previously Issued Certificates".  

Not sure this is a solution for you.  Just an idea.

Chris


Attachment 10-29-2015 8-28-50 AM.jpg
Attachment 10-29-2015 8-29-16 AM.jpg
In reply to Nidhi Tiwari

Re: Add download certificate link in dashboard

by Chris Collman -
Picture of Documentation writers

I started playing with the block_report_certificates.php file.   I played with the code, you probably have more experience than me smile  See image below.

I basically commented out the array for the table head and the table alignment (about lines 80-85).  I know not very user friendly but it makes it tighter.

I commented out the dateformat get string line (about line 128), and the two lines under Retrieving grade and date for each certificate (about line 140-141).

There was a table data array (about line 157).  I left the link and outputlink in the array.  

The My Certificate report was not changed. 

CAUTION, I am not very good with php code and  how the Moodle modules work with each other.  Somebody who knows what they are doing might have a better solution.  I do not like customizing any part of the core code because of updates and my lack of knowledge.  A plugin fits into another category for me.

Chris



Attachment 10-29-2015 10-19-02 AM.jpg