24 include_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;
94 $user_id = $params[
"user_id"];
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();
148 $visibility =
new ilRadioMatrixInputGUI($lng->txt(
"certificate_visibility"),
"certificate_visibility");
150 0 => $lng->txt(
"certificate_visibility_always"),
151 1 => $lng->txt(
"certificate_visibility_passed_exercise"),
152 2 => $lng->txt(
"certificate_visibility_never")
155 $visibility->setValue($form_fields[
"certificate_visibility"]);
156 if (count(
$_POST)) $visibility->checkInput();
157 $form->addItem($visibility);
162 $form_fields[
"certificate_visibility"] =
$_POST[
"certificate_visibility"];
167 $form_fields[
"certificate_visibility"] = $this->
object->getCertificateVisibility();
172 $this->
object->saveCertificateVisibility($form_fields[
"certificate_visibility"]);
194 return $this->
object->getId();