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();
149 $visibility =
new ilRadioGroupInputGUI($lng->txt(
"certificate_visibility"),
"certificate_visibility");
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();