24include_once
"./Services/Certificate/classes/class.ilCertificateAdapter.php";
46 $lng->loadLanguageModule(
'certificate');
56 return CLIENT_WEB_DIR .
"/exercise/certificates/" . $this->
object->getId() .
"/";
74 $insert_tags = array();
75 foreach($vars as $id => $caption)
77 $insert_tags[
"[".$id.
"]"] = $caption;
96 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
98 include_once
'Modules/Exercise/classes/class.ilExerciseMembers.php';
109 foreach($vars as $id => $caption)
111 $insert_tags[
"[".$id.
"]"] = $caption;
127 $vars[
"RESULT_PASSED"] =
$lng->txt(
"certificate_ph_passed_exercise");
128 $vars[
"RESULT_MARK"] =
$lng->txt(
"certificate_ph_mark");
129 $vars[
"EXERCISE_TITLE"] =
$lng->txt(
"certificate_ph_exercisetitle");
131 $template =
new ilTemplate(
"tpl.certificate_edit.html", TRUE, TRUE,
"Modules/Exercise");
132 $template->setCurrentBlock(
"items");
133 foreach($vars as $id => $caption)
135 $template->setVariable(
"ID", $id);
136 $template->setVariable(
"TXT", $caption);
137 $template->parseCurrentBlock();
140 $template->setVariable(
"PH_INTRODUCTION",
$lng->txt(
"certificate_ph_introduction"));
142 return $template->get();
150 $visibility->addOption(
new ilRadioOption(
$lng->txt(
"certificate_visibility_always"), 0));
151 $visibility->addOption(
new ilRadioOption(
$lng->txt(
"certificate_visibility_passed_exercise"), 1));
152 $visibility->addOption(
new ilRadioOption(
$lng->txt(
"certificate_visibility_never"), 2));
153 $visibility->setValue($form_fields[
"certificate_visibility"]);
154 if (count(
$_POST)) $visibility->checkInput();
155 $form->addItem($visibility);
160 $form_fields[
"certificate_visibility"] =
$_POST[
"certificate_visibility"];
165 $form_fields[
"certificate_visibility"] = $this->
object->getCertificateVisibility();
170 $this->
object->saveCertificateVisibility($form_fields[
"certificate_visibility"]);
192 return $this->
object->getId();
Adapter class to provide certificate data for the certificate generator.
getBaseVariablesForPresentation($a_user_data, $a_last_access=null, $a_completion_date=false)
Get variable values.
getBaseVariablesForPreview($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable dummys.
getUserCompletionDate($a_user_id, $a_object_id=null)
Get completion for user.
getBaseVariablesDescription($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable descriptions.
Exercise certificate adapter.
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...
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.
saveFormFields(&$form_fields)
Allows to save additional adapter form fields This method will be called when the certificate editor ...
getCertificateVariablesDescription()
Returns a description of the available certificate parameters.
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.
getCertificateVariablesForPresentation($params=array())
Returns an array containing all variables and values which can be exchanged in the certificate The va...
getAdapterType()
Returns the adapter type This value will be used to generate file names for the certificates.
__construct(&$object)
ilTestCertificateAdapter contructor
_lookupStatus($a_obj_id, $a_user_id)
Lookup current status (notgraded|passed|failed)
_lookupMark($a_usr_id, $a_obj_id)
_lookupFields($a_user_id)
lookup fields (deprecated; use more specific methods instead)
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public