4 require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssMultiOptionQuestionFeedback.php';
31 if( !$this->questionOBJ->getSelfAssessmentEditingMode() )
34 $header->setTitle($this->lng->txt(
'feedback_answers'));
37 require_once
'./Services/Form/classes/class.ilRadioGroupInputGUI.php';
38 require_once
'./Services/Form/classes/class.ilRadioOption.php';
42 $feedback->addOption(
new ilRadioOption($this->lng->txt(
'feedback_checked'), 2));
43 $feedback->addOption(
new ilRadioOption($this->lng->txt(
'feedback_correct'), 3));
48 $propertyLabel = $this->questionOBJ->prepareTextareaOutput(
52 $propertyPostVar =
"feedback_answer_$index";
55 $propertyLabel , $propertyPostVar, $this->questionOBJ->isAdditionalContentEditingModePageObject()
72 if (!$this->questionOBJ->getSelfAssessmentEditingMode())
75 $this->questionOBJ->getSpecificFeedbackSetting()
80 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
89 $value = $this->questionOBJ->prepareTextareaOutput(
110 if( !$this->questionOBJ->isAdditionalContentEditingModePageObject() )
117 $this->questionOBJ->getId(), $index, $form->
getInput(
"feedback_answer_$index")
144 $this->db->update($this->getSpecificQuestionTableName(),
145 array(
'feedback_setting' => array(
'integer', $specificFeedbackSetting)),
146 array(
'question_fi' => array(
'integer', $questionId))
168 $res = $this->db->queryF(
169 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($originalQuestionId)
172 while(
$row = $this->db->fetchAssoc(
$res) )
177 'feedback_id' => array(
'integer', $nextId),
178 'question_fi' => array(
'integer', $duplicateQuestionId),
179 'answer' => array(
'integer',
$row[
'answer']),
180 'feedback' => array(
'text',
$row[
'feedback']),
181 'tstamp' => array(
'integer', time())
184 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
207 $this->db->manipulateF(
208 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
209 array(
'integer'), array($originalQuestionId)
213 $res = $this->db->queryF(
214 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
215 array(
'integer'), array($duplicateQuestionId)
219 while(
$row = $this->db->fetchAssoc(
$res) )
224 'feedback_id' => array(
'integer', $nextId),
225 'question_fi' => array(
'integer', $originalQuestionId),
226 'answer' => array(
'integer',
$row[
'answer']),
227 'feedback' => array(
'text',
$row[
'feedback']),
228 'tstamp' => array(
'integer',time())
235 $res = $this->db->queryF(
236 "SELECT feedback_setting FROM {$this->getSpecificQuestionTableName()} WHERE question_fi = %s",
237 array(
'integer'), array($sourceQuestionId)
242 $this->db->update( $this->getSpecificQuestionTableName(),
243 array(
'feedback_setting' => array(
'integer',
$row[
'feedback_setting']) ),
244 array(
'question_fi' => array(
'integer', $targetQuestionId) )