24 include_once
"./Services/Certificate/classes/class.ilCertificateAdapter.php";
46 parent::__construct();
56 return CLIENT_WEB_DIR .
"/course/certificates/" . $this->
object->getId() .
"/";
70 $insert_tags =
array();
71 foreach ($vars as
$id => $caption) {
72 $insert_tags[
"[" .
$id .
"]"] = $caption;
89 include_once
'./Services/User/classes/class.ilObjUser.php';
92 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
98 $insert_tags =
array();
99 foreach ($vars as
$id => $caption) {
100 $insert_tags[
"[" .
$id .
"]"] = $caption;
114 $vars[
"COURSE_TITLE"] = $this->lng->txt(
"crs_title");
116 $template =
new ilTemplate(
"tpl.il_as_tst_certificate_edit.html",
true,
true,
"Modules/Test");
118 foreach ($vars as
$id => $caption) {
124 $template->setVariable(
"PH_INTRODUCTION", $this->lng->txt(
"certificate_ph_introduction"));
148 return $this->
object->getId();
161 if (!is_array($a_usr_ids)) {
162 $a_usr_ids =
array($a_usr_ids);
164 if (!is_array($a_obj_ids)) {
165 $a_obj_ids =
array($a_obj_ids);
167 foreach ($a_usr_ids as $usr_id) {
168 foreach ($a_obj_ids as $obj_id) {
169 self::$has_certificate[$usr_id][$obj_id] =
false;
173 include_once
"Services/Certificate/classes/class.ilCertificate.php";
175 $obj_active = ilCertificate::areObjectsActive($a_obj_ids);
177 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
179 foreach (
$data as $rec) {
180 if ($obj_active[$rec[
"obj_id"]]) {
181 self::$has_certificate[$rec[
"usr_id"]][$rec[
"obj_id"]] =
true;
198 self::_preloadListData($a_usr_id, $a_obj_id);
200 if (isset(self::$has_certificate[$a_usr_id][$a_obj_id])) {
201 return self::$has_certificate[$a_usr_id][$a_obj_id];
__construct($object)
ilTestCertificateAdapter contructor
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static getDateTimeOfPassed($a_obj_id, $a_usr_id)
getCertificateVariablesForPreview()
Returns an array containing all variables and values which can be exchanged in the certificate...
if(!array_key_exists('StateId', $_REQUEST)) $id
static getPassedUsersForObjects(array $a_obj_ids, array $a_usr_ids)
Test certificate adapter.
static _preloadListData($a_usr_ids, $a_obj_ids)
Get certificate/passed status for all given objects and users.
getCertificateVariablesForPresentation($params=array())
Returns an array containing all variables and values which can be exchanged in the certificate The va...
special template class to simplify handling of ITX/PEAR
static _hasUserCertificate($a_usr_id, $a_obj_id)
Check if user has certificate for course.
getBaseVariablesDescription($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable descriptions.
Create styles array
The data for the language used.
getAdapterType()
Returns the adapter type This value will be used to generate file names for the certificates.
Create new PHPExcel object
obj_idprivate
getCertificatePath()
Returns the certificate path (with a trailing path separator)
Adapter class to provide certificate data for the certificate generator.
getCertificateVariablesDescription()
Returns a description of the available certificate parameters.
static _lookupFields($a_user_id)
lookup fields (deprecated; use more specific methods instead)
getCertificateID()
Returns a certificate ID This value will be used to generate unique file names for the certificates...
getBaseVariablesForPreview($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable dummys.
getBaseVariablesForPresentation($a_user_data, $a_last_access=null, $a_completion_date=false)
Get variable values.