Retrieving information for displaying in a custom certificate

Retrieving information for displaying in a custom certificate

by Rudá Almeida -
Number of replies: 1

Hello everyone

I'm using the certificate module moodle and trying to customize it. I have read the doc pages (sorry I can't link it here or the system flags me as a spammer). I need to print specific information on the certificate, such as:

  • Full user name
  • Full course name
  • Course starting date
  • Course ending date
  • Certificate generation date
  • Final score for the course
  • Final total hours count
  • Per-module name
  • Per-module starting date
  • Per-module ending date
  • Per-module score
  • Per-module hours count
  • Per-module teacher name

From peeking at the certificate code, I know I can user fullname($USER) for the user name and $course->fullname for the course, and $certificate->printhours will provide the total hours count for the entire course. I can use date() for the certificate generation date. Where can I retrieve the other info?

Thanks in advance!

Average of ratings: -
In reply to Rudá Almeida

Re: Retrieving information for displaying in a custom certificate

by Rudá Almeida -
  • I was able to find out some more info. Does anyone know how to retrieve the rest?
  • Full user name => fullname($USER)
  • Full course name => $course->fullname
  • Course starting date => date("d/m/Y", $course->startdate)
  • Course ending date
  • Certificate generation date => date("d/m/Y", $certificate->timecreated)
  • Final score for the course
  • Final total hours count => $certificate->printhours
  • Per-module name
  • Per-module starting date
  • Per-module ending date
  • Per-module score
  • Per-module hours count
  • Full name of the teacher assigned to the group that the user belongs to (per-module)