24include_once
"./Services/Certificate/classes/class.ilCertificateAdapter.php";
47 $lng->loadLanguageModule(
'certificate');
57 return CLIENT_WEB_DIR .
"/course/certificates/" . $this->
object->getId() .
"/";
73 $insert_tags = array();
74 foreach($vars as $id => $caption)
76 $insert_tags[
"[".$id.
"]"] = $caption;
95 include_once
'./Services/User/classes/class.ilObjUser.php';
98 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
104 $insert_tags = array();
105 foreach($vars as $id => $caption)
107 $insert_tags[
"[".$id.
"]"] = $caption;
123 $vars[
"COURSE_TITLE"] =
$lng->txt(
"crs_title");
125 $template =
new ilTemplate(
"tpl.il_as_tst_certificate_edit.html", TRUE, TRUE,
"Modules/Test");
126 $template->setCurrentBlock(
"items");
127 foreach($vars as $id => $caption)
129 $template->setVariable(
"ID", $id);
130 $template->setVariable(
"TXT", $caption);
131 $template->parseCurrentBlock();
134 $template->setVariable(
"PH_INTRODUCTION",
$lng->txt(
"certificate_ph_introduction"));
136 return $template->get();
158 return $this->
object->getId();
173 if (!is_array($a_usr_ids))
175 $a_usr_ids = array($a_usr_ids);
177 if (!is_array($a_obj_ids))
179 $a_obj_ids = array($a_obj_ids);
181 foreach ($a_usr_ids as $usr_id)
183 foreach ($a_obj_ids as $obj_id)
185 self::$has_certificate[$usr_id][$obj_id] =
false;
189 include_once
"Services/Certificate/classes/class.ilCertificate.php";
194 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
196 foreach(
$data as $rec)
198 if($obj_active[$rec[
"obj_id"]])
200 self::$has_certificate[$rec[
"usr_id"]][$rec[
"obj_id"]] =
true;
219 if (isset(self::$has_certificate[$a_usr_id][$a_obj_id]))
221 return self::$has_certificate[$a_usr_id][$a_obj_id];
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.
static areObjectsActive(array $a_obj_ids)
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...
__construct(&$object)
ilTestCertificateAdapter contructor
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.
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)
_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