24 include_once
"./Services/Certificate/classes/class.ilCertificateAdapter.php";
45 parent::__construct();
55 return CLIENT_WEB_DIR .
"/exercise/certificates/" . $this->
object->getId() .
"/";
73 $insert_tags =
array();
74 foreach($vars as $id => $caption)
76 $insert_tags[
"[".$id.
"]"] = $caption;
95 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
97 include_once
'Modules/Exercise/classes/class.ilExerciseMembers.php';
108 foreach($vars as $id => $caption)
110 $insert_tags[
"[".$id.
"]"] = $caption;
126 $vars[
"RESULT_PASSED"] = $lng->txt(
"certificate_ph_passed_exercise");
127 $vars[
"RESULT_MARK"] = $lng->txt(
"certificate_ph_mark");
128 $vars[
"EXERCISE_TITLE"] = $lng->txt(
"certificate_ph_exercisetitle");
130 $template =
new ilTemplate(
"tpl.certificate_edit.html", TRUE, TRUE,
"Modules/Exercise");
131 $template->setCurrentBlock(
"items");
132 foreach($vars as $id => $caption)
134 $template->setVariable(
"ID", $id);
135 $template->setVariable(
"TXT", $caption);
136 $template->parseCurrentBlock();
139 $template->setVariable(
"PH_INTRODUCTION", $lng->txt(
"certificate_ph_introduction"));
141 return $template->get();
148 $visibility =
new ilRadioGroupInputGUI($lng->txt(
"certificate_visibility"),
"certificate_visibility");
150 $visibility->addOption(
new ilRadioOption($lng->txt(
"certificate_visibility_passed_exercise"), 1));
151 $visibility->addOption(
new ilRadioOption($lng->txt(
"certificate_visibility_never"), 2));
152 $visibility->setValue($form_fields[
"certificate_visibility"]);
153 if (count(
$_POST)) $visibility->checkInput();
154 $form->addItem($visibility);
159 $form_fields[
"certificate_visibility"] =
$_POST[
"certificate_visibility"];
164 $form_fields[
"certificate_visibility"] = $this->
object->getCertificateVisibility();
169 $this->
object->saveCertificateVisibility($form_fields[
"certificate_visibility"]);
191 return $this->
object->getId();
getCertificateVariablesDescription()
Returns a description of the available certificate parameters.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
This class represents an option in a radio group.
__construct(&$object)
ilTestCertificateAdapter contructor
getUserCompletionDate($a_user_id, $a_object_id=null)
Get completion for user.
getCertificateVariablesForPreview()
Returns an array containing all variables and values which can be exchanged in the certificate...
addFormFieldsFromPOST(&$form_fields)
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current status (notgraded|passed|failed)
special template class to simplify handling of ITX/PEAR
getCertificateVariablesForPresentation($params=array())
Returns an array containing all variables and values which can be exchanged in the certificate The va...
addAdditionalFormElements(&$form, $form_fields)
getBaseVariablesDescription($a_enable_last_access=true, $a_enable_completion_date=true)
Get variable descriptions.
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
getAdapterType()
Returns the adapter type This value will be used to generate file names for the certificates.
Adapter class to provide certificate data for the certificate generator.
addFormFieldsFromObject(&$form_fields)
static _lookupFields($a_user_id)
lookup fields (deprecated; use more specific methods instead)
getCertificatePath()
Returns the certificate path (with a trailing path separator)
static _lookupMark($a_usr_id, $a_obj_id)
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.
getCertificateID()
Returns a certificate ID This value will be used to generate unique file names for the certificates...
saveFormFields(&$form_fields)
Exercise certificate adapter.