4 require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php';
35 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
45 $questionId, $answerIndex
49 return $specificAnswerFeedbackTestPresentationHTML;
61 if( !$this->questionOBJ->getSelfAssessmentEditingMode() )
64 $header->setTitle($this->lng->txt(
'feedback_answers'));
69 $propertyLabel = $this->questionOBJ->prepareTextareaOutput(
73 $propertyPostVar =
"feedback_answer_$index";
76 $propertyLabel , $propertyPostVar, $this->questionOBJ->isAdditionalContentEditingModePageObject()
91 if (!$this->questionOBJ->getSelfAssessmentEditingMode())
95 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
104 $value = $this->questionOBJ->prepareTextareaOutput(
123 if( !$this->questionOBJ->isAdditionalContentEditingModePageObject() )
128 $this->questionOBJ->getId(), $index, $form->
getInput(
"feedback_answer_$index")
144 require_once
'Services/RTE/classes/class.ilRTE.php';
146 $res = $this->db->queryF(
147 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s AND answer = %s",
148 array(
'integer',
'integer'), array($questionId, $answerIndex)
151 while(
$row = $this->db->fetchAssoc(
$res) )
157 return $feedbackContent;
171 require_once
'Services/RTE/classes/class.ilRTE.php';
173 if( strlen($feedbackContent) )
184 'feedback' => array(
'text', $feedbackContent),
185 'tstamp' => array(
'integer', time())
188 'feedback_id' => array(
'integer', $feedbackId),
197 'feedback_id' => array(
'integer', $feedbackId),
198 'question_fi' => array(
'integer', $questionId),
199 'answer' => array(
'integer', $answerIndex),
200 'feedback' => array(
'text', $feedbackContent),
201 'tstamp' => array(
'integer', time())
218 if( $isAdditionalContentEditingModePageObject )
226 $this->db->manipulateF(
227 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
228 array(
'integer'), array($questionId)
241 $res = $this->db->queryF(
242 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
243 array(
'integer'), array($originalQuestionId)
246 while(
$row = $this->db->fetchAssoc(
$res) )
251 'feedback_id' => array(
'integer', $nextId),
252 'question_fi' => array(
'integer', $duplicateQuestionId),
253 'answer' => array(
'integer',
$row[
'answer']),
254 'feedback' => array(
'text',
$row[
'feedback']),
255 'tstamp' => array(
'integer', time())
258 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
276 $this->db->manipulateF(
277 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($originalQuestionId)
281 $res = $this->db->queryF(
282 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($duplicateQuestionId)
286 while(
$row = $this->db->fetchAssoc(
$res) )
291 'feedback_id' => array(
'integer', $nextId),
292 'question_fi' => array(
'integer', $originalQuestionId),
293 'answer' => array(
'integer',
$row[
'answer']),
294 'feedback' => array(
'text',
$row[
'feedback']),
295 'tstamp' => array(
'integer',time())
311 $res = $this->db->queryF(
312 "SELECT feedback_id FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s AND answer = %s",
313 array(
'integer',
'integer'), array($questionId, $answerIndex)
318 while(
$row = $this->db->fetchAssoc(
$res) )
320 $feedbackId =
$row[
'feedback_id'];
338 $res = $this->db->queryF(
339 "SELECT feedback_id, answer FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
340 array(
'integer'), array($questionId)
343 $feedbackIdByAnswerIndexMap = array();
345 while(
$row = $this->db->fetchAssoc(
$res) )
347 $feedbackIdByAnswerIndexMap[
$row[
'answer'] ] = $row[
'feedback_id'];
350 return $feedbackIdByAnswerIndexMap;
372 return $this->questionOBJ->getAnswers();
386 return $answer->getAnswertext();
409 return $pageObjectId;
423 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
433 $questionId, $answerIndex
437 return $specificAnswerFeedbackExportPresentation;
451 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
466 foreach($answerIndexes as $answerIndex)