fow whatever reason, I am not able to call a piece of data from the database in quiz_attempts. How the hell do I do this? I have been able to program 2 columns in this table, and they are called "certificate" and "certid". If they pass the test, then "certificate" will equal "1" (otherwise, it is "0").
ONLY IF it "certificate" equals "1", then I need the certificate to recall the "certid" that is associated with that individual attempt.
I added this to the beginning of the certificate.php file:
*************************************************************************************
require_once($CFG->dirroot.'/user/profile/lib.php');
profile_load_data($USER);
***************************************************************************************
and I have tried these lines....
******************************************************************************************
certificate_print_text($pdf, $x, $y + 210, 'C', $fontserif, '', 30, 'Certificate # ' . $USER->profile['certid']);
certificate_print_text($pdf, $x, $y + 210, 'C', $fontserif, '', 30, 'Certificate # ' . $USER->'certid');
certificate_print_text($pdf, $x, $y + 210, 'C', $fontserif, '', 30, 'Certificate # ' . $attempts->['certid']);
certificate_print_text($pdf, $x, $y + 210, 'C', $fontserif, '', 30, 'Certificate # ' . $attempts->certid);
certificate_print_text($pdf, $x, $y + 210, 'C', $fontserif, '', 30, 'Certificate # ' . $USER->attempts['certid']);
...and several others. I'm at the end of my rope. Can anyone guide me? I am only following examples and going by trial and error. I don't know how to do this sort of thing.
Please help...