26 $this->lng = $DIC[
'lng'];
27 $this->lng->loadLanguageModule(
'certificate');
149 $this->lng->loadLanguageModule(
"certificate");
151 return $this->lng->txt(
"certificate_file_basename").
".pdf";
164 "USER_LOGIN" => $this->lng->txt(
"certificate_ph_login"),
165 "USER_FULLNAME" => $this->lng->txt(
"certificate_ph_fullname"),
166 "USER_FIRSTNAME" => $this->lng->txt(
"certificate_ph_firstname"),
167 "USER_LASTNAME" => $this->lng->txt(
"certificate_ph_lastname"),
168 "USER_TITLE" => $this->lng->txt(
"certificate_ph_title"),
169 "USER_SALUTATION" => $this->lng->txt(
"certificate_ph_salutation"),
170 "USER_BIRTHDAY" => $this->lng->txt(
"certificate_ph_birthday"),
171 "USER_INSTITUTION" => $this->lng->txt(
"certificate_ph_institution"),
172 "USER_DEPARTMENT" => $this->lng->txt(
"certificate_ph_department"),
173 "USER_STREET" => $this->lng->txt(
"certificate_ph_street"),
174 "USER_CITY" => $this->lng->txt(
"certificate_ph_city"),
175 "USER_ZIPCODE" => $this->lng->txt(
"certificate_ph_zipcode"),
176 "USER_COUNTRY" => $this->lng->txt(
"certificate_ph_country"),
177 "USER_MATRICULATION" => $this->lng->txt(
"certificate_ph_matriculation")
180 if($a_enable_last_access)
182 $vars[
"USER_LASTACCESS"] = $this->lng->txt(
"certificate_ph_lastaccess");
185 $vars[
"DATE"] = $this->lng->txt(
"certificate_ph_date");
186 $vars[
"DATETIME"] = $this->lng->txt(
"certificate_ph_datetime");
188 if($a_enable_completion_date)
190 $vars[
"DATE_COMPLETED"] = $this->lng->txt(
"certificate_ph_date_completed");
191 $vars[
"DATETIME_COMPLETED"] = $this->lng->txt(
"certificate_ph_datetime_completed");
226 if($a_enable_last_access)
234 if($a_enable_completion_date)
260 if (strlen($a_user_data[
"gender"]))
262 $salutation = $this->lng->txt(
"salutation_" . $a_user_data[
"gender"]);
266 if($a_user_data[
"birthday"])
271 $country = $a_user_data[
"sel_country"];
274 $this->lng->loadLanguageModule(
"meta");
275 $country = $this->lng->txt(
"meta_c_".$country);
279 $country = $a_user_data[
"country"];
284 "USER_FULLNAME" =>
ilUtil::prepareFormOutput(trim($a_user_data[
"title"] .
" " . $a_user_data[
"firstname"] .
" " . $a_user_data[
"lastname"])),
308 if($a_completion_date)
330 $a_object_id = $this->
object->getId();
332 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
344 return $a_params[
"user_id"];
addFormFieldsFromPOST(&$form_fields)
Allows to add additional form values to the array of form values evaluating a HTTP POST action...
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getUserCompletionDate($a_user_id, $a_object_id=null)
Get completion for user.
addFormFieldsFromObject(&$form_fields)
Allows to add additional form values to the array of form values evaluating the associated adapter cl...
addAdditionalFormElements(&$form, $form_fields)
Allows to add additional form fields to the certificate editor form This method will be called when t...
getCertificateVariablesForPreview()
Returns an array containing all variables and values which can be exchanged in the certificate...
__construct()
ilCertificateAdapter constructor.
getCertificateID()
Returns a certificate ID This value will be used to generate unique file names for the certificates...
getCertificateVariablesDescription()
Returns a description of the available certificate parameters.
deleteCertificate()
Is called when the certificate is deleted Add some adapter specific code if more work has to be done ...
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used
getCertificateFilename($params=array())
Set the name of the certificate file This method will be called when the certificate will be generate...
saveFormFields(&$form_fields)
Allows to save additional adapter form fields This method will be called when the certificate editor ...
static formatDate(ilDateTime $date)
Format a date public.
getBaseVariablesDescription($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable descriptions.
static _lookupStatusChanged($a_obj_id, $a_user_id)
Lookup status changed.
Create styles array
The data for the language used.
getUserIdForParams($a_params)
Get user id for params.
Adapter class to provide certificate data for the certificate generator.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
getCertificateVariablesForPresentation($params=array())
Returns an array containing all variables and values which can be exchanged in the certificate The va...
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.
getAdapterType()
Returns the adapter type This value will be used to generate file names for the certificates.
getCertificatePath()
Returns the certificate path (with a trailing path separator)