June 2017
Beginner to intermediate
368 pages
8h 31m
English
The finished API is available to download from GitHub at https://github.com/iandavidwild/moodle-local_certificateapi. There are two external functions implemented in /externallib.php:
As described earlier in the chapter, when interrogating the database, we need to take care that we don't, in any way, overload the database when extracting data. Let's study the get_certificates_by_email() function. This is the complete function:
public static function get_certificates_by_email($hostid = '', $learneremail = '', $starttime='01/01/1970', $endtime='01/01/1970') { global $USER, $DB; if(DEBUG_TRACE){error_log('get_certificates_by_email(): function called $hostid=' ...Read now
Unlock full access