5 include_once
"./Services/Certificate/classes/class.ilCertificateAdapter.php";
28 $this->skill = $a_skill;
29 $this->skill_level_id = $a_skill_level_id;
30 parent::__construct();
31 $this->lng->loadLanguageModule(
'skmg');
41 return CLIENT_WEB_DIR .
"/certificates/skill/" . $this->skill->getId() .
42 "/" . $this->skill_level_id .
"/";
59 $vars[
"SKILL_TRIGGER_TITLE"] =
ilUtil::prepareFormOutput($this->skill->getTriggerTitleForCertificate($this->skill_level_id));
63 $insert_tags = array();
64 foreach ($vars as
$id => $caption) {
65 $insert_tags[
"[" .
$id .
"]"] = $caption;
80 $this->lng->loadLanguageModule(
'certificate');
82 $user_data =
$params[
"user_data"];
87 $vars[
"SKILL_TRIGGER_TITLE"] =
ilUtil::prepareFormOutput($this->skill->getTriggerTitleForCertificate($this->skill_level_id));
90 $achievement_date = ilBasicSkill::lookupLevelAchievementDate($user_data[
"usr_id"], $this->skill_level_id);
91 if ($achievement_date !==
false) {
100 $vars[
"DATE_COMPLETED"] =
"";
101 $vars[
"DATETIME_COMPLETED"] =
"";
104 foreach ($vars as
$id => $caption) {
105 $insert_tags[
"[" .
$id .
"]"] = $caption;
118 $this->lng->loadLanguageModule(
"skmg");
121 $vars[
"SKILL_TITLE"] = $this->lng->txt(
"skmg_cert_skill_title");
122 $vars[
"SKILL_LEVEL_TITLE"] = $this->lng->txt(
"skmg_cert_skill_level_title");
123 $vars[
"SKILL_TRIGGER_TITLE"] = $this->lng->txt(
"skmg_cert_skill_trigger_title");
127 foreach ($vars as
$id => $caption) {
133 $template->setVariable(
"PH_INTRODUCTION", $this->lng->txt(
"certificate_ph_introduction"));
216 $basename = parent::getCertificateFilename(
$params);
218 $user_data =
$params[
"user_data"];
219 if (!is_array($user_data)) {
220 $short_title = $this->skill->getShortTitleForCertificate();
221 return strftime(
"%y%m%d", time()) .
"_" . $this->lng->txt(
"certificate_var_user_lastname") .
"_" . $short_title .
"_" . $basename;
223 return strftime(
"%y%m%d", time()) .
"_" . $user_data[
"lastname"] .
"_" .
$params[
"short_title"] .
"_" . $basename;
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
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...
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...
if(!array_key_exists('StateId', $_REQUEST)) $id
getCertificateFilename($params=array())
Set the name of the certificate file This method will be called when the certificate will be generate...
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
getCertificatePath()
Returns the certificate path (with a trailing path separator)
if(isset($_POST['submit'])) $form
special template class to simplify handling of ITX/PEAR
getBaseVariablesDescription($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable descriptions.
getCertificateID()
Returns a certificate ID This value will be used to generate unique file names for the certificates...
addFormFieldsFromPOST(&$form_fields)
Allows to add additional form values to the array of form values evaluating a HTTP POST action...
saveFormFields(&$form_fields)
Allows to save additional adapter form fields This method will be called when the certificate editor ...
__construct($a_skill, $a_skill_level_id)
Contructor.
Skill certificate adapter.
Adapter class to provide certificate data for the certificate generator.
deleteCertificate()
Is called when the certificate is deleted Add some adapter specific code if more work has to be done ...
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.
getCertificateVariablesForPreview()
Returns an array containing all variables and values which can be exchanged in the certificate...
getAdapterType()
Returns the adapter type This value will be used to generate file names for the certificates.