echo $completiontypeselectoutput; } } if (empty($charttype)) { if (!empty($courseid)) { // Get the course completion information. if (empty($dodownload)) { if (empty($idlist['0'])) { // Only want the data for the page we are on. $coursedataobj = iomad::get_user_course_completion_data($searchinfo, $courseid, $page, $perpage, $completiontype); $coursedata = $coursedataobj->users; $totalcount = $coursedataobj->totalcount; } } else { if (empty($idlist['0'])) { $coursedataobj = iomad::get_user_course_completion_data($searchinfo, $courseid); $coursedata = $coursedataobj->users; $totalcount = $coursedataobj->totalcount; } } // Is there a global vantage number. if ($DB->get_record('user_info_field', array('shortname' => 'VANTAGE'))) { $vantage = true; } else { $vantage = false; } // Check if there is a certificate module. $hascertificate = false; if (empty($dodownload) && ($certmodule = $DB->get_record('modules', array('name' => 'iomadcertificate')))) { require_once $CFG->dirroot . '/mod/iomadcertificate/lib.php'; if ($certificateinfo = $DB->get_record('iomadcertificate', array('course' => $courseid))) {