ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Adapter class to provide certificate data for the certificate generator. More...
Public Member Functions | |
__construct () | |
ilCertificateAdapter constructor. More... | |
getCertificatePath () | |
Returns the certificate path (with a trailing path separator) More... | |
getCertificateVariablesForPreview () | |
Returns an array containing all variables and values which can be exchanged in the certificate. More... | |
getCertificateVariablesForPresentation ($params=array()) | |
Returns an array containing all variables and values which can be exchanged in the certificate The values should be calculated from real data. More... | |
getCertificateVariablesDescription () | |
Returns a description of the available certificate parameters. More... | |
getAdapterType () | |
Returns the adapter type This value will be used to generate file names for the certificates. More... | |
getCertificateID () | |
Returns a certificate ID This value will be used to generate unique file names for the certificates. More... | |
addAdditionalFormElements (&$form, $form_fields) | |
Allows to add additional form fields to the certificate editor form This method will be called when the certificate editor form will built using the ilPropertyFormGUI class. More... | |
addFormFieldsFromPOST (&$form_fields) | |
Allows to add additional form values to the array of form values evaluating a HTTP POST action. More... | |
addFormFieldsFromObject (&$form_fields) | |
Allows to add additional form values to the array of form values evaluating the associated adapter class if one exists This method will be called when the certificate editor form will be shown and the content of the form has to be retrieved from wherever the form values are saved. More... | |
saveFormFields (&$form_fields) | |
Allows to save additional adapter form fields This method will be called when the certificate editor form is complete and the form values will be saved. More... | |
deleteCertificate () | |
Is called when the certificate is deleted Add some adapter specific code if more work has to be done when the certificate file was deleted. More... | |
getCertificateFilename ($params=array()) | |
Set the name of the certificate file This method will be called when the certificate will be generated. More... | |
getUserIdForParams ($a_params) | |
Get user id for params. More... | |
Protected Member Functions | |
getBaseVariablesDescription ($a_enable_last_access=true, $a_enable_completion_date=true) | |
Get variable descriptions. More... | |
getBaseVariablesForPreview ($a_enable_last_access=true, $a_enable_completion_date=true) | |
Get variable dummys. More... | |
getBaseVariablesForPresentation ($a_user_data, $a_last_access=null, $a_completion_date=false) | |
Get variable values. More... | |
getUserCompletionDate ($a_user_id, $a_object_id=null) | |
Get completion for user. More... | |
Protected Attributes | |
$lng | |
Adapter class to provide certificate data for the certificate generator.
Definition at line 12 of file class.ilCertificateAdapter.php.
ilCertificateAdapter::__construct | ( | ) |
ilCertificateAdapter constructor.
Definition at line 22 of file class.ilCertificateAdapter.php.
References $DIC, $params, array, getAdapterType(), getCertificateID(), getCertificatePath(), getCertificateVariablesDescription(), getCertificateVariablesForPresentation(), and getCertificateVariablesForPreview().
ilCertificateAdapter::addAdditionalFormElements | ( | & | $form, |
$form_fields | |||
) |
Allows to add additional form fields to the certificate editor form This method will be called when the certificate editor form will built using the ilPropertyFormGUI class.
Additional fields will be added at the bottom of the form.
object | $form | An ilPropertyFormGUI instance |
array | $form_fields | An array containing the form values. The array keys are the names of the form fields |
Definition at line 88 of file class.ilCertificateAdapter.php.
ilCertificateAdapter::addFormFieldsFromObject | ( | & | $form_fields | ) |
Allows to add additional form values to the array of form values evaluating the associated adapter class if one exists This method will be called when the certificate editor form will be shown and the content of the form has to be retrieved from wherever the form values are saved.
array | $form_fields | A reference to the array of form values |
Definition at line 112 of file class.ilCertificateAdapter.php.
ilCertificateAdapter::addFormFieldsFromPOST | ( | & | $form_fields | ) |
Allows to add additional form values to the array of form values evaluating a HTTP POST action.
This method will be called when the certificate editor form will be saved using the form save button.
array | $form_fields | A reference to the array of form values |
Definition at line 100 of file class.ilCertificateAdapter.php.
ilCertificateAdapter::deleteCertificate | ( | ) |
Is called when the certificate is deleted Add some adapter specific code if more work has to be done when the certificate file was deleted.
Definition at line 132 of file class.ilCertificateAdapter.php.
|
abstract |
Returns the adapter type This value will be used to generate file names for the certificates.
Referenced by __construct().
|
protected |
Get variable descriptions.
bool | $a_enable_last_access | |
bool | $a_enable_completion_date |
Definition at line 156 of file class.ilCertificateAdapter.php.
References array.
Referenced by ilCourseCertificateAdapter\getCertificateVariablesDescription(), ilExerciseCertificateAdapter\getCertificateVariablesDescription(), ilSkillCertificateAdapter\getCertificateVariablesDescription(), ilTestCertificateAdapter\getCertificateVariablesDescription(), and ilSCORMCertificateAdapter\getCertificateVariablesDescription().
|
protected |
Get variable values.
array | $a_user_data | |
datetime | $a_last_access | |
datetime | $a_completion_date |
Definition at line 245 of file class.ilCertificateAdapter.php.
References $old, array, ilDatePresentation\formatDate(), IL_CAL_DATE, IL_CAL_DATETIME, IL_CAL_UNIX, ilUtil\prepareFormOutput(), ilDatePresentation\setUseRelativeDates(), time, and ilDatePresentation\useRelativeDates().
Referenced by ilTestCertificateAdapter\getCertificateVariablesForPresentation(), ilSkillCertificateAdapter\getCertificateVariablesForPresentation(), ilCourseCertificateAdapter\getCertificateVariablesForPresentation(), ilExerciseCertificateAdapter\getCertificateVariablesForPresentation(), and ilSCORMCertificateAdapter\getCertificateVariablesForPresentation().
|
protected |
Get variable dummys.
bool | $a_enable_last_access | |
bool | $a_enable_completion_date |
Definition at line 197 of file class.ilCertificateAdapter.php.
References $old, array, ilDatePresentation\formatDate(), IL_CAL_DATE, IL_CAL_UNIX, ilUtil\prepareFormOutput(), ilDatePresentation\setUseRelativeDates(), time, and ilDatePresentation\useRelativeDates().
Referenced by ilTestCertificateAdapter\getCertificateVariablesForPreview(), ilSkillCertificateAdapter\getCertificateVariablesForPreview(), ilExerciseCertificateAdapter\getCertificateVariablesForPreview(), ilSCORMCertificateAdapter\getCertificateVariablesForPreview(), and ilCourseCertificateAdapter\getCertificateVariablesForPreview().
ilCertificateAdapter::getCertificateFilename | ( | $params = array() | ) |
Set the name of the certificate file This method will be called when the certificate will be generated.
Definition at line 142 of file class.ilCertificateAdapter.php.
|
abstract |
Returns a certificate ID This value will be used to generate unique file names for the certificates.
Referenced by __construct().
|
abstract |
Returns the certificate path (with a trailing path separator)
Referenced by __construct().
|
abstract |
Returns a description of the available certificate parameters.
The description will be shown at the bottom of the certificate editor text area.
Referenced by __construct().
|
abstract |
Returns an array containing all variables and values which can be exchanged in the certificate The values should be calculated from real data.
The $params parameter array should contain all necessary information to calculate the values.
array | $params | An array of parameters to calculate the certificate parameter values |
Referenced by __construct().
|
abstract |
Returns an array containing all variables and values which can be exchanged in the certificate.
The values will be taken for the certificate preview.
Referenced by __construct().
|
protected |
Get completion for user.
int | $a_user_id | |
int | $a_object_id |
Definition at line 310 of file class.ilCertificateAdapter.php.
References ilLPStatus\_lookupStatusChanged().
Referenced by ilTestCertificateAdapter\getCertificateVariablesForPresentation(), ilExerciseCertificateAdapter\getCertificateVariablesForPresentation(), and ilSCORMCertificateAdapter\getCertificateVariablesForPresentation().
ilCertificateAdapter::getUserIdForParams | ( | $a_params | ) |
ilCertificateAdapter::saveFormFields | ( | & | $form_fields | ) |
Allows to save additional adapter form fields This method will be called when the certificate editor form is complete and the form values will be saved.
array | $form_fields | A reference to the array of form values |
Definition at line 123 of file class.ilCertificateAdapter.php.
|
protected |
Definition at line 17 of file class.ilCertificateAdapter.php.