24include_once
"./Services/Certificate/classes/class.ilCertificateAdapter.php";
47 parent::__construct();
57 return CLIENT_WEB_DIR .
"/course/certificates/" . $this->
object->getId() .
"/";
71 $insert_tags = array();
72 foreach ($vars as
$id => $caption) {
73 $insert_tags[
"[" .
$id .
"]"] = $caption;
90 include_once
'./Services/User/classes/class.ilObjUser.php';
93 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
99 $insert_tags = array();
100 foreach ($vars as
$id => $caption) {
101 $insert_tags[
"[" .
$id .
"]"] = $caption;
115 $vars[
"COURSE_TITLE"] = $this->lng->txt(
"crs_title");
117 $template =
new ilTemplate(
"tpl.il_as_tst_certificate_edit.html",
true,
true,
"Modules/Test");
119 foreach ($vars as
$id => $caption) {
125 $template->setVariable(
"PH_INTRODUCTION", $this->lng->txt(
"certificate_ph_introduction"));
149 return $this->
object->getId();
162 if (!is_array($a_usr_ids)) {
163 $a_usr_ids = array($a_usr_ids);
165 if (!is_array($a_obj_ids)) {
166 $a_obj_ids = array($a_obj_ids);
168 foreach ($a_usr_ids as $usr_id) {
169 foreach ($a_obj_ids as $obj_id) {
170 self::$has_certificate[$usr_id][$obj_id] =
false;
174 include_once
"Services/Certificate/classes/class.ilCertificate.php";
176 $obj_active = ilCertificate::areObjectsActive($a_obj_ids);
178 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
180 foreach (
$data as $rec) {
181 if ($obj_active[$rec[
"obj_id"]]) {
182 self::$has_certificate[$rec[
"usr_id"]][$rec[
"obj_id"]] =
true;
201 if (isset(self::$has_certificate[$a_usr_id][$a_obj_id])) {
202 return self::$has_certificate[$a_usr_id][$a_obj_id];
An exception for terminatinating execution or to throw for unit testing.
Adapter class to provide certificate data for the certificate generator.
getBaseVariablesForPresentation($a_user_data, $a_last_access=null, $a_completion_date=false)
Get variable values.
getBaseVariablesForPreview($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable dummys.
getBaseVariablesDescription($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable descriptions.
Test certificate adapter.
getCertificateVariablesDescription()
Returns a description of the available certificate parameters.
getCertificateVariablesForPresentation($params=array())
Returns an array containing all variables and values which can be exchanged in the certificate The va...
getAdapterType()
Returns the adapter type This value will be used to generate file names for the certificates.
getCertificateVariablesForPreview()
Returns an array containing all variables and values which can be exchanged in the certificate.
static _preloadListData($a_usr_ids, $a_obj_ids)
Get certificate/passed status for all given objects and users.
getCertificatePath()
Returns the certificate path (with a trailing path separator)
static _hasUserCertificate($a_usr_id, $a_obj_id)
Check if user has certificate for course.
__construct($object)
ilTestCertificateAdapter contructor
getCertificateID()
Returns a certificate ID This value will be used to generate unique file names for the certificates.
static getDateTimeOfPassed($a_obj_id, $a_usr_id)
static getPassedUsersForObjects(array $a_obj_ids, array $a_usr_ids)
static _lookupFields($a_user_id)
lookup fields (deprecated; use more specific methods instead)
special template class to simplify handling of ITX/PEAR
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
if(!array_key_exists('StateId', $_REQUEST)) $id