4 require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php';
36 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
49 return $specificAnswerFeedbackTestPresentationHTML;
61 if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
63 $header->setTitle($this->lng->txt(
'feedback_answers'));
67 $propertyLabel = $this->questionOBJ->prepareTextareaOutput(
72 $propertyPostVar =
"feedback_answer_$index";
77 $this->questionOBJ->isAdditionalContentEditingModePageObject()
92 if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
94 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
100 $value = $this->questionOBJ->prepareTextareaOutput(
119 if (!$this->questionOBJ->isAdditionalContentEditingModePageObject()) {
122 $this->questionOBJ->getId(),
125 $form->
getInput(
"feedback_answer_$index")
142 require_once
'Services/RTE/classes/class.ilRTE.php';
144 $res = $this->db->queryF(
145 "SELECT * FROM {$this->getSpecificFeedbackTableName()} 146 WHERE question_fi = %s AND question = %s AND answer = %s",
147 array(
'integer',
'integer',
'integer'),
148 array($questionId, $questionIndex, $answerIndex)
151 while (
$row = $this->db->fetchAssoc(
$res)) {
156 return $feedbackContent;
169 require_once
'Services/RTE/classes/class.ilRTE.php';
171 $res = $this->db->queryF(
172 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
177 $allFeedbackContents =
'';
179 while (
$row = $this->db->fetchAssoc(
$res)) {
183 return $allFeedbackContents;
198 require_once
'Services/RTE/classes/class.ilRTE.php';
200 if (strlen($feedbackContent)) {
210 'feedback' => array(
'text', $feedbackContent),
211 'tstamp' => array(
'integer', time())
214 'feedback_id' => array(
'integer', $feedbackId),
221 'feedback_id' => array(
'integer', $feedbackId),
222 'question_fi' => array(
'integer', $questionId),
223 'question' => array(
'integer', $questionIndex),
224 'answer' => array(
'integer', $answerIndex),
225 'feedback' => array(
'text', $feedbackContent),
226 'tstamp' => array(
'integer', time())
243 if ($isAdditionalContentEditingModePageObject) {
244 require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssSpecificFeedbackIdentifierList.php';
246 $feedbackIdentifiers->load($questionId);
248 foreach ($feedbackIdentifiers as $identifier) {
251 $identifier->getFeedbackId()
256 $this->db->manipulateF(
257 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
273 $res = $this->db->queryF(
274 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
276 array($originalQuestionId)
279 while (
$row = $this->db->fetchAssoc(
$res)) {
283 'feedback_id' => array(
'integer', $nextId),
284 'question_fi' => array(
'integer', $duplicateQuestionId),
285 'question' => array(
'integer',
$row[
'question']),
286 'answer' => array(
'integer',
$row[
'answer']),
287 'feedback' => array(
'text',
$row[
'feedback']),
288 'tstamp' => array(
'integer', time())
291 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
308 $this->db->manipulateF(
309 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
311 array($originalQuestionId)
315 $res = $this->db->queryF(
316 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
318 array($duplicateQuestionId)
322 while (
$row = $this->db->fetchAssoc(
$res)) {
326 'feedback_id' => array(
'integer', $nextId),
327 'question_fi' => array(
'integer', $originalQuestionId),
328 'question' => array(
'integer',
$row[
'question']),
329 'answer' => array(
'integer',
$row[
'answer']),
330 'feedback' => array(
'text',
$row[
'feedback']),
331 'tstamp' => array(
'integer',time())
347 $res = $this->db->queryF(
348 "SELECT feedback_id FROM {$this->getSpecificFeedbackTableName()} 349 WHERE question_fi = %s AND question = %s AND answer = %s",
350 array(
'integer',
'integer',
'integer'),
351 array($questionId, $questionIndex, $answerIndex)
356 while (
$row = $this->db->fetchAssoc(
$res)) {
357 $feedbackId =
$row[
'feedback_id'];
370 $row = $this->db->fetchAssoc($this->db->queryF(
371 "SELECT COUNT(feedback_id) cnt FROM {$this->getSpecificFeedbackTableName()} 372 WHERE question_fi = %s AND feedback_id = %s",
373 array(
'integer' ,
'integer'),
374 array($this->questionOBJ->getId(), $feedbackId)
377 return (
bool)
$row[
'cnt'];
388 return self::TABLE_NAME_SPECIFIC_FEEDBACK;
399 return $this->questionOBJ->getAnswers();
413 return $answer->getAnswertext();
432 if (!$pageObjectId) {
436 return $pageObjectId;
451 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
464 return $specificAnswerFeedbackExportPresentation;
479 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
491 return (
bool) strlen(
createPageObject($pageObjectType, $pageObjectId, $pageObjectContent)
creates a new page object with given page object id and page object type and passed page object conte...
getSpecificAnswerFeedbackPageObjectId($questionId, $questionIndex, $answerIndex)
returns a useable page object id for specific answer feedback page objects for the given question id ...
getAnswerOptionsByAnswerIndex()
returns the answer options mapped by answer index (can be overwritten by concrete question type class...
getPageObjectNonEditableValueHTML($pageObjectType, $pageObjectId)
returns html content to be used as value for non editable value form properties in feedback editing f...
getSpecificAnswerFeedbackPageObjectType()
returns the type for specific feedback page objects defined in local constant
isSpecificAnswerFeedbackId($feedbackId)
getSpecificFeedbackTableName()
returns the table name for specific feedback
saveSpecificAnswerFeedbackContent($questionId, $questionIndex, $answerIndex, $feedbackContent)
saves SPECIFIC answer feedback content for the given question id and answer index to the database...
importSpecificAnswerFeedback($questionId, $questionIndex, $answerIndex, $feedbackContent)
imports the given feedback content as specific feedback for the given question id and answer index ...
getAllSpecificAnswerFeedbackContents($questionId)
returns the SPECIFIC feedback content for a given question id and answer index.
specificAnswerFeedbackExists()
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...
duplicateSpecificFeedback($originalQuestionId, $duplicateQuestionId)
duplicates the SPECIFIC feedback relating to the given original question id and saves it for the give...
buildAnswerOptionLabel($index, $answer)
builds an answer option label from given (mixed type) index and answer (can be overwritten by concret...
const TABLE_NAME_SPECIFIC_FEEDBACK
table name for specific feedback
getPageObjectContent($pageObjectType, $pageObjectId)
returns the content of page object with given type and id
getSpecificAnswerFeedbackTestPresentation($questionId, $questionIndex, $answerIndex)
returns the html of SPECIFIC feedback for the given question id and answer index for test presentatio...
foreach($_POST as $key=> $value) $res
if(isset($_POST['submit'])) $form
completeSpecificFormProperties(ilPropertyFormGUI $form)
completes a given form object with the specific form properties required by this question type ...
duplicatePageObject($pageObjectType, $originalPageObjectId, $duplicatePageObjectId, $duplicatePageObjectParentId)
duplicates the page object with given type and original id to new page object with same type and give...
initSpecificFormProperties(ilPropertyFormGUI $form)
initialises a given form object's specific form properties relating to this question type ...
deleteSpecificAnswerFeedbacks($questionId, $isAdditionalContentEditingModePageObject)
deletes all SPECIFIC answer feedback contents (and page objects if required) for the given question i...
getPageObjectXML($pageObjectType, $pageObjectId)
returns the xml of page object with given type and id
ensurePageObjectDeleted($pageObjectType, $pageObjectId)
ensures a no more existing page object for given type and id
getSpecificAnswerFeedbackContent($questionId, $questionIndex, $answerIndex)
returns the SPECIFIC answer feedback content for a given question id and answer index.
buildFeedbackContentFormProperty($label, $postVar, $asNonEditable)
builds and returns a form property gui object with the given label and postvar that is addable to pro...
getSpecificAnswerFeedbackId($questionId, $questionIndex, $answerIndex)
returns the SPECIFIC answer feedback ID for a given question id and answer index. ...
getSpecificAnswerFeedbackExportPresentation($questionId, $questionIndex, $answerIndex)
returns the generic feedback export presentation for given question id either for solution completed ...
saveSpecificFormProperties(ilPropertyFormGUI $form)
saves a given form object's specific form properties relating to this question type ...
syncSpecificFeedback($originalQuestionId, $duplicateQuestionId)
syncs the SPECIFIC feedback from a duplicated question back to the original question ...