ILIAS
release_4-3 Revision
|
Adapter class to provide certificate data for the certificate generator. More...
Public Member Functions | |
getCertificatePath () | |
Returns the certificate path (with a trailing path separator) | |
getCertificateVariablesForPreview () | |
Returns an array containing all variables and values which can be exchanged in the certificate. | |
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. | |
getCertificateVariablesDescription () | |
Returns a description of the available certificate parameters. | |
getAdapterType () | |
Returns the adapter type This value will be used to generate file names for the certificates. | |
getCertificateID () | |
Returns a certificate ID This value will be used to generate unique file names for the certificates. | |
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. | |
addFormFieldsFromPOST (&$form_fields) | |
Allows to add additional form values to the array of form values evaluating a HTTP POST action. | |
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. | |
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. | |
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. | |
getCertificateFilename ($params=array()) | |
Set the name of the certificate file This method will be called when the certificate will be generated. | |
getUserIdForParams ($a_params) | |
Get user id for params. |
Protected Member Functions | |
getBaseVariablesDescription ($a_enable_last_access=true, $a_enable_completion_date=true) | |
Get variable descriptions. | |
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. | |
getUserCompletionDate ($a_user_id, $a_object_id=null) | |
Get completion for user. |
Adapter class to provide certificate data for the certificate generator.
Definition at line 12 of file class.ilCertificateAdapter.php.
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 |
Reimplemented in ilSCORMCertificateAdapter, ilTestCertificateAdapter, ilSkillCertificateAdapter, and ilExerciseCertificateAdapter.
Definition at line 72 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 |
Reimplemented in ilSCORMCertificateAdapter, ilTestCertificateAdapter, ilSkillCertificateAdapter, and ilExerciseCertificateAdapter.
Definition at line 98 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 |
Reimplemented in ilSCORMCertificateAdapter, ilTestCertificateAdapter, ilSkillCertificateAdapter, and ilExerciseCertificateAdapter.
Definition at line 85 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.
Reimplemented in ilSCORMCertificateAdapter, and ilSkillCertificateAdapter.
Definition at line 120 of file class.ilCertificateAdapter.php.
|
abstract |
Returns the adapter type This value will be used to generate file names for the certificates.
Reimplemented in ilSCORMCertificateAdapter, ilTestCertificateAdapter, ilSkillCertificateAdapter, ilExerciseCertificateAdapter, and ilCourseCertificateAdapter.
|
protected |
Get variable descriptions.
bool | $a_enable_last_access | |
bool | $a_enable_completion_date |
Definition at line 145 of file class.ilCertificateAdapter.php.
References $lng.
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 240 of file class.ilCertificateAdapter.php.
References $lng, ilDatePresentation\formatDate(), IL_CAL_DATE, IL_CAL_DATETIME, IL_CAL_UNIX, ilUtil\prepareFormOutput(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().
Referenced by ilSkillCertificateAdapter\getCertificateVariablesForPresentation(), ilCourseCertificateAdapter\getCertificateVariablesForPresentation(), ilExerciseCertificateAdapter\getCertificateVariablesForPresentation(), ilTestCertificateAdapter\getCertificateVariablesForPresentation(), and ilSCORMCertificateAdapter\getCertificateVariablesForPresentation().
|
protected |
Get variable dummys.
bool | $a_enable_last_access | |
bool | $a_enable_completion_date |
Definition at line 189 of file class.ilCertificateAdapter.php.
References $lng, ilDatePresentation\formatDate(), IL_CAL_DATE, IL_CAL_UNIX, ilUtil\prepareFormOutput(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().
Referenced by ilSkillCertificateAdapter\getCertificateVariablesForPreview(), ilSCORMCertificateAdapter\getCertificateVariablesForPreview(), ilTestCertificateAdapter\getCertificateVariablesForPreview(), ilExerciseCertificateAdapter\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.
Reimplemented in ilSCORMCertificateAdapter, and ilSkillCertificateAdapter.
Definition at line 131 of file class.ilCertificateAdapter.php.
References $lng.
|
abstract |
Returns a certificate ID This value will be used to generate unique file names for the certificates.
Reimplemented in ilSCORMCertificateAdapter, ilTestCertificateAdapter, ilSkillCertificateAdapter, ilExerciseCertificateAdapter, and ilCourseCertificateAdapter.
|
abstract |
Returns the certificate path (with a trailing path separator)
Reimplemented in ilCourseCertificateAdapter, ilExerciseCertificateAdapter, ilTestCertificateAdapter, ilSCORMCertificateAdapter, and ilSkillCertificateAdapter.
|
abstract |
Returns a description of the available certificate parameters.
The description will be shown at the bottom of the certificate editor text area.
Reimplemented in ilSCORMCertificateAdapter, ilTestCertificateAdapter, ilSkillCertificateAdapter, ilExerciseCertificateAdapter, and ilCourseCertificateAdapter.
|
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 |
Reimplemented in ilSCORMCertificateAdapter, ilTestCertificateAdapter, ilExerciseCertificateAdapter, ilCourseCertificateAdapter, and ilSkillCertificateAdapter.
|
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.
Reimplemented in ilCourseCertificateAdapter, ilExerciseCertificateAdapter, ilTestCertificateAdapter, ilSCORMCertificateAdapter, and ilSkillCertificateAdapter.
|
protected |
Get completion for user.
int | $a_user_id | |
int | $a_object_id |
Definition at line 313 of file class.ilCertificateAdapter.php.
References ilLPStatus\_lookupStatusChanged().
Referenced by ilExerciseCertificateAdapter\getCertificateVariablesForPresentation(), ilTestCertificateAdapter\getCertificateVariablesForPresentation(), and ilSCORMCertificateAdapter\getCertificateVariablesForPresentation().
ilCertificateAdapter::getUserIdForParams | ( | $a_params | ) |
Get user id for params.
@return |
Reimplemented in ilSCORMCertificateAdapter, and ilTestCertificateAdapter.
Definition at line 329 of file class.ilCertificateAdapter.php.
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 |
Reimplemented in ilSCORMCertificateAdapter, ilTestCertificateAdapter, ilSkillCertificateAdapter, and ilExerciseCertificateAdapter.
Definition at line 110 of file class.ilCertificateAdapter.php.