4require_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;
170 require_once
'Services/RTE/classes/class.ilRTE.php';
172 $res = $this->db->queryF(
173 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
174 array(
'integer'), array($questionId)
177 $allFeedbackContents =
'';
179 while(
$row = $this->db->fetchAssoc(
$res) )
184 return $allFeedbackContents;
198 require_once
'Services/RTE/classes/class.ilRTE.php';
200 if( strlen($feedbackContent) )
211 'feedback' => array(
'text', $feedbackContent),
212 'tstamp' => array(
'integer', time())
215 'feedback_id' => array(
'integer', $feedbackId),
224 'feedback_id' => array(
'integer', $feedbackId),
225 'question_fi' => array(
'integer', $questionId),
226 'answer' => array(
'integer', $answerIndex),
227 'feedback' => array(
'text', $feedbackContent),
228 'tstamp' => array(
'integer', time())
245 if( $isAdditionalContentEditingModePageObject )
253 $this->db->manipulateF(
254 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
255 array(
'integer'), array($questionId)
268 $res = $this->db->queryF(
269 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
270 array(
'integer'), array($originalQuestionId)
273 while(
$row = $this->db->fetchAssoc(
$res) )
278 'feedback_id' => array(
'integer', $nextId),
279 'question_fi' => array(
'integer', $duplicateQuestionId),
280 'answer' => array(
'integer',
$row[
'answer']),
281 'feedback' => array(
'text',
$row[
'feedback']),
282 'tstamp' => array(
'integer', time())
285 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
303 $this->db->manipulateF(
304 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($originalQuestionId)
308 $res = $this->db->queryF(
309 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($duplicateQuestionId)
313 while(
$row = $this->db->fetchAssoc(
$res) )
318 'feedback_id' => array(
'integer', $nextId),
319 'question_fi' => array(
'integer', $originalQuestionId),
320 'answer' => array(
'integer',
$row[
'answer']),
321 'feedback' => array(
'text',
$row[
'feedback']),
322 'tstamp' => array(
'integer',time())
338 $res = $this->db->queryF(
339 "SELECT feedback_id FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s AND answer = %s",
340 array(
'integer',
'integer'), array($questionId, $answerIndex)
345 while(
$row = $this->db->fetchAssoc(
$res) )
347 $feedbackId =
$row[
'feedback_id'];
365 $res = $this->db->queryF(
366 "SELECT feedback_id, answer FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
367 array(
'integer'), array($questionId)
370 $feedbackIdByAnswerIndexMap = array();
372 while(
$row = $this->db->fetchAssoc(
$res) )
374 $feedbackIdByAnswerIndexMap[
$row[
'answer'] ] =
$row[
'feedback_id'];
377 return $feedbackIdByAnswerIndexMap;
399 return $this->questionOBJ->getAnswers();
413 return $answer->getAnswertext();
436 return $pageObjectId;
450 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
460 $questionId, $answerIndex
464 return $specificAnswerFeedbackExportPresentation;
478 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
493 foreach($answerIndexes as $answerIndex)
getSpecificAnswerFeedbackTestPresentation($questionId, $answerIndex)
returns the html of SPECIFIC feedback for the given question id and answer index for test presentatio...
getAllSpecificAnswerFeedbackContents($questionId)
returns the SPECIFIC feedback content for a given question id and answer index.
completeSpecificFormProperties(ilPropertyFormGUI $form)
completes a given form object with the specific form properties required by this question type
getSpecificAnswerFeedbackContent($questionId, $answerIndex)
returns the SPECIFIC answer feedback content for a given question id and answer index.
getSpecificAnswerFeedbackExportPresentation($questionId, $answerIndex)
returns the generic feedback export presentation for given question id either for solution completed ...
deleteSpecificAnswerFeedbacks($questionId, $isAdditionalContentEditingModePageObject)
deletes all SPECIFIC answer feedback contents (and page objects if required) for the given question i...
getSpecificAnswerFeedbackPageObjectId($questionId, $answerIndex)
returns a useable page object id for specific answer feedback page objects for the given question id ...
duplicateSpecificFeedback($originalQuestionId, $duplicateQuestionId)
duplicates the SPECIFIC feedback relating to the given original question id and saves it for the give...
syncSpecificFeedback($originalQuestionId, $duplicateQuestionId)
syncs the SPECIFIC feedback from a duplicated question back to the original question
initSpecificFormProperties(ilPropertyFormGUI $form)
initialises a given form object's specific form properties relating to this question type
getAnswerOptionsByAnswerIndex()
returns the answer options mapped by answer index (can be overwritten by concrete question type class...
getSpecificFeedbackTableName()
returns the table name for specific feedback
getSpecificAnswerFeedbackIdByAnswerIndexMap($questionId)
returns an array mapping feedback ids to answer indexes for all answer options of question
specificAnswerFeedbackExists($answerIndexes)
importSpecificAnswerFeedback($questionId, $answerIndex, $feedbackContent)
imports the given feedback content as specific feedback for the given question id and answer index
const TABLE_NAME_SPECIFIC_FEEDBACK
table name for specific feedback
saveSpecificAnswerFeedbackContent($questionId, $answerIndex, $feedbackContent)
saves SPECIFIC answer feedback content for the given question id and answer index to the database.
buildAnswerOptionLabel($index, $answer)
builds an answer option label from given (mixed type) index and answer (can be overwritten by concret...
getSpecificAnswerFeedbackId($questionId, $answerIndex)
returns the SPECIFIC answer feedback ID for a given question id and answer index.
saveSpecificFormProperties(ilPropertyFormGUI $form)
saves a given form object's specific form properties relating to this question type
getPageObjectXML($pageObjectType, $pageObjectId)
returns the xml of page object with given type and id
getPageObjectNonEditableValueHTML($pageObjectType, $pageObjectId)
returns html content to be used as value for non editable value form properties in feedback editing f...
createPageObject($pageObjectType, $pageObjectId, $pageObjectContent)
creates a new page object with given page object id and page object type and passed page object conte...
duplicatePageObject($pageObjectType, $originalPageObjectId, $duplicatePageObjectId, $duplicatePageObjectParentId)
duplicates the page object with given type and original id to new page object with same type and give...
getSpecificAnswerFeedbackPageObjectType()
returns the type for specific feedback page objects defined in local constant
ensurePageObjectDeleted($pageObjectType, $pageObjectId)
ensures a no more existing page object for given type and id
getPageObjectContent($pageObjectType, $pageObjectId)
returns the content of page object with given type and id
buildFeedbackContentFormProperty($label, $postVar, $asNonEditable)
builds and returns a form property gui object with the given label and postvar that is addable to pro...
static _replaceMediaObjectImageSrc($a_text, $a_direction=0, $nic=IL_INST_ID)
replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...