41 if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
43 $header->setTitle($this->
lng->txt(
'feedback_answers'));
48 new ilRadioOption($this->
lng->txt(
'feedback_all'), self::FEEDBACK_SETTING_ALL)
51 new ilRadioOption($this->
lng->txt(
'feedback_checked'), self::FEEDBACK_SETTING_CHECKED)
54 new ilRadioOption($this->
lng->txt($this->questionOBJ->getSpecificFeedbackAllCorrectOptionLabel()), self::FEEDBACK_SETTING_CORRECT)
57 $feedback->setRequired(
true);
66 $propertyPostVar =
"feedback_answer_$index";
71 $this->questionOBJ->isAdditionalContentEditingModePageObject()
79 if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
81 $this->questionOBJ->getSpecificFeedbackSetting()
85 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
103 $feedback_setting = $form->
getInput(
'feedback_setting');
108 if ($feedback_setting ===
'') {
114 if (!$this->questionOBJ->isAdditionalContentEditingModePageObject()) {
117 $this->questionOBJ->getId(),
120 (
string) ($form->
getInput(
"feedback_answer_$index") ??
'')
143 [
'feedback_setting' => [
'integer', $specificFeedbackSetting]],
144 [
'question_fi' => [
'integer', $questionId]]
151 parent::cloneSpecificFeedback($source_question_id, $target_question_id);
156 $res = $this->db->queryF(
157 "SELECT feedback_setting FROM {$this->getSpecificQuestionTableName()} WHERE question_fi = %s",
159 [$source_question_id]
162 $row = $this->db->fetchAssoc(
$res);
164 if ($this->db->numRows(
$res) < 1) {
170 [
'feedback_setting' => [
'integer', $row[
'feedback_setting']] ],
171 [
'question_fi' => [
'integer', $target_question_id] ]
initSpecificFormProperties(ilPropertyFormGUI $form)
initialises a given form object's specific form properties relating to this question type
isSaveableInPageObjectEditingMode()
returns the fact that the feedback editing form is saveable in page object editing mode,...
getSpecificQuestionTableName()
const FEEDBACK_SETTING_CHECKED
const FEEDBACK_SETTING_ALL
const FEEDBACK_SETTING_CORRECT
cloneSpecificFeedback(int $source_question_id, int $target_question_id)
duplicates the SPECIFIC feedback relating to the given original question id and saves it for the give...
saveSpecificFeedbackSetting(int $questionId, int $specificFeedbackSetting)
saves the given specific feedback setting for the given question id to the db.
completeSpecificFormProperties(ilPropertyFormGUI $form)
completes a given form object with the specific form properties required by this question type
cloneSpecificFeedbackSetting(int $source_question_id, int $target_question_id)
saveSpecificFormProperties(ilPropertyFormGUI $form)
saves a given form object's SPECIFIC form properties relating to this question type
buildAnswerOptionLabel(int $index, $answer)
getSpecificAnswerFeedbackContent(int $question_id, int $question_index, int $answer_index)
getAnswerOptionsByAnswerIndex()
saveSpecificAnswerFeedbackContent(int $question_id, int $question_index, int $answer_index, string $feedback_content)
getSpecificAnswerFeedbackPageObjectId(int $question_id, int $question_index, int $answer_index)
returns a useable page object id for specific answer feedback page objects for the given question id ...
buildFeedbackContentFormProperty(string $label, string $post_var, bool $as_non_editable)
builds and returns a form property gui object with the given label and postvar that is addable to pro...
getSpecificAnswerFeedbackPageObjectType()
getPageObjectNonEditableValueHTML(string $page_object_type, int $page_object_id)
returns html content to be used as value for non editable value form properties in feedback editing f...
This class represents an option in a radio group.