26 $this->lng = $DIC[
'lng'];
27 $this->lng->loadLanguageModule(
'certificate');
152 $this->lng->loadLanguageModule(
"certificate");
154 return $this->lng->txt(
"certificate_file_basename") .
".pdf";
167 "USER_LOGIN" => $this->lng->txt(
"certificate_ph_login"),
168 "USER_FULLNAME" => $this->lng->txt(
"certificate_ph_fullname"),
169 "USER_FIRSTNAME" => $this->lng->txt(
"certificate_ph_firstname"),
170 "USER_LASTNAME" => $this->lng->txt(
"certificate_ph_lastname"),
171 "USER_TITLE" => $this->lng->txt(
"certificate_ph_title"),
172 "USER_SALUTATION" => $this->lng->txt(
"certificate_ph_salutation"),
173 "USER_BIRTHDAY" => $this->lng->txt(
"certificate_ph_birthday"),
174 "USER_INSTITUTION" => $this->lng->txt(
"certificate_ph_institution"),
175 "USER_DEPARTMENT" => $this->lng->txt(
"certificate_ph_department"),
176 "USER_STREET" => $this->lng->txt(
"certificate_ph_street"),
177 "USER_CITY" => $this->lng->txt(
"certificate_ph_city"),
178 "USER_ZIPCODE" => $this->lng->txt(
"certificate_ph_zipcode"),
179 "USER_COUNTRY" => $this->lng->txt(
"certificate_ph_country"),
180 "USER_MATRICULATION" => $this->lng->txt(
"certificate_ph_matriculation")
183 if ($a_enable_last_access) {
184 $vars[
"USER_LASTACCESS"] = $this->lng->txt(
"certificate_ph_lastaccess");
187 $vars[
"DATE"] = $this->lng->txt(
"certificate_ph_date");
188 $vars[
"DATETIME"] = $this->lng->txt(
"certificate_ph_datetime");
190 if ($a_enable_completion_date) {
191 $vars[
"DATE_COMPLETED"] = $this->lng->txt(
"certificate_ph_date_completed");
192 $vars[
"DATETIME_COMPLETED"] = $this->lng->txt(
"certificate_ph_datetime_completed");
227 if ($a_enable_last_access) {
234 if ($a_enable_completion_date) {
259 $gender = $a_user_data[
'gender'];
260 if (is_string($gender) && strlen(trim($gender)) > 0 && strtolower($gender) !==
'n') {
261 $salutation = $this->lng->txt(
"salutation_" . $gender);
265 if ($a_user_data[
"birthday"]) {
269 $country = $a_user_data[
"sel_country"];
271 $this->lng->loadLanguageModule(
"meta");
272 $country = $this->lng->txt(
"meta_c_" . $country);
274 $country = $a_user_data[
"country"];
279 "USER_FULLNAME" =>
ilUtil::prepareFormOutput(trim($a_user_data[
"title"] .
" " . $a_user_data[
"firstname"] .
" " . $a_user_data[
"lastname"])),
294 if ($a_last_access) {
302 if ($a_completion_date) {
307 $vars[
"DATETIME_COMPLETED_UNIX"] = $dateTime->get(
IL_CAL_UNIX);
325 $a_object_id = $this->
object->getId();
327 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
339 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...
hasAdditionalFormElements()
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 formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static useRelativeDates()
check if relative dates are used
if(isset($_POST['submit'])) $form
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 ...
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.
getUserIdForParams($a_params)
Get user id for params.
Adapter class to provide certificate data for the certificate generator.
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)